wave background

Harnessing the strength of Teleopti WFM, Part 1: Getting connected to the system, and your team

Teleopti WFM Software

This week the blog takes a technical turn as Robin Karlsson, Technical Lead at Teleopti, walks us through how best to use Teleopti WFM’s API. This is the first of three blogs from Robin on harnessing the strength of Teleopti WFM for integrations.

APIIn order to create integrations with other systems there is an API available in the Teleopti WFM product. Indeed, some of our customers are already using it for schedule exports or agent synchronization. So as to showcase the possibilities that come with using the API I’ll guide you through a three-part blog series, the first of which will have us establishing a connection with the API and extracting some details on the agents in a certain team.

The second blog post will cover the creation of a small application where team leaders will be able to update some basic details for the agents. The third and last blog post in the series will cover a brand new feature that enables an integration where the schedule information is always up to date.

To be able to connect to the API, you’ll require some sort of client that can understand and talk with web services. The specification of the API is available at an endpoint using a standard called WSDL. I’ll use our demo environment in the cloud in this series, but you can use any environment you might have at hand. You’ll need to have a valid user account for Teleopti WFM to be able to use the functions mentioned further on in this post.

Throughout the blog post I’ll use C# syntax in the example code, but the basic principles are the same for Java or any other client language you want to use.

Firstly, we need to make the reference to the database you’ll be using here display as ‘tenant’ on the result, together with the business units that are available for the current user. That response from the web service call will also tell you if your password has expired or is about to expire when a password policy is in place.

var service = new TeleoptiCccLogOnServiceClient();
var result = service.LogOnAsApplicationUser(“user”,”pw”);
if (result.IsAuthenticated) {
var businessUnit = result.AvailableBusinessUnits.First();
var tenant = result.Tenant;

After the verification that the user’s Teleopti WFM authentication details were fine we need to select the business unit to use further on. As we don’t keep state of users on the server side, the business unit can be altered on each new request. The business unit to work with is included in the header information of every web service call.

Now we’re ready to perform some real operations. In Teleopti WFM we have the concept of groupings of people; some are included dynamic ones, and others are custom created groupings. We will use the included dynamic grouping for business hierarchy. That one will give us all the teams, and the employees within them, that we have access to for a given day. The unique identifier for business hierarchy is hardcoded to be “6CE00B41-0722-4B36-91DD-0A3B63C545CF”. The code below will use that to get a list of all available teams for Today.

var organizationService = new TeleoptiOrganizationService();
var availableTeams = organizationService.GroupPageGroupsByQuery(new GroupPageGroupAtDateQueryDto { GroupPageId = new Guid(“6CE00B41-0722-4B36-91DD-0A3B63C545CF”), QueryDate = new DateOnlyDto { DateTime = DateTime.Today } });

The QueryDate parameter will be used to filter out information that is based on different date ranges. Team membership in Teleopti WFM is based on dates. To get only the teams which currently have the team members that we have access to, we specify the date to search for as today’s date.

To find detailed information about the employees in the given team, we must create a new query using the team information from the query above.

var employees = organizationService.GetPersonsByQuery(new GetPersonsByGroupPageGroupQueryDto { GroupPageGroupId = team.Id.Value, QueryDate = new DateOnly { DateTime = DateTime.Today } });

Each employee is given in the form of a PersonDto object. To see what exact information that includes, you can use the chm-file from the SDK Toolkit provided by Teleopti – or simply use the auto-completion feature in your development environment to check what’s available.

Stay tuned for the next part of the series, where we’ll be updating some basic information for the employees! As will be the case for every part of this series, you’ll find the sample code on Teleopti’s official GitHub repository, available at https://github.com/Teleopti/sdk-sample.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact me I want to know more