Out of the box Ytica provides analytics on top of data in Twilio TaskRouter. You can provide additional data to give business people more options when building reports theirand dashboards.

Enhance Agent Data

You can provide additional details about agent data in worker attributes that you can customize in Twilio. This data enhance the Agents dataset in Analytics Data Model.

Note that we have a different naming convention than Twilio has. While Twilio uses the term Worker we use Agent. You can learn more about differences between Ytica and Twilio naming in Twilio Data in Ytica article or check our Dictionary to learn how we call all things in Ytica.

The below code sample shows example you can fill into Worker attributes in Twilio either using Twilio Console or API. Unknown agent attributes will be silently ignored. You can use your own attributes alongside Ytica's.

{
    "agents": {
"full_name": "Mary Smith",
"department": "Sales",
"email": "mary.smith@company.com",
"location": "London",
"manager": "Adam Shepherd",
"phone": "+15555555555",
"role": "Agent - Level 2",
"state": "Active",
"team_id": null,
"team_name": "Sales 2",
"team_name_in_hierarchy": "London ▸ Sales ▸ Sales 2"
    }
}

For more details on what properties are supported and what values they can have check Custom Data via Platform Integration. For documentation of the individual agent attributes see Agents Dataset in Analytics Data Model.

Option 1: Setup Agents via TaskRouter API

You can use Twilio TaskRouter API to set the worker attributes. You can do this by doing a POST request for all workers you want to enhance with such data. This is recommended method as it can be automatic and well integrated with the rest of your systems.

POST /v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}

Check Twilio Documentation at https://www.twilio.com/docs/api/taskrouter/workers

Option 2: Setup Agent via Twilio Console

You can setup agent details also manually in Twilio Console. 

We do not recommend using this method in a production deployment especially if you have higher number of agents as it requires manual work and may be error prone. This method is useful for quickly evaluating whether worker attributes work well for you.

To edit worker attributes:

  • Go to Twilio Console Workspaces. Login to Twilio Console if necessary.
  • Click on the workspace where the agents you want to setup are.
  • Click Workers in the left navigation
  • Click on the agent you want to setup.
  • Edit Attributes so the properties you want to provide us are there.
  • Click Save
  • Congratulations. We should now receive more details about your agents. Note that you need to wait until the next data load to Ytica. These loads may happen daily or hourly depending on your plan.

You can repeat the steps above for all agents that you need.

Dual Channel Recording

Enable Dual Channel Recording in Twilio to take advantage of Audio and Speech Analytics.

If you use TwiML scripts for triggering recording you have to change them to tell Twilio it should record the channels separately. This is done by adding "-dual" postfix to record attribute.

Check Twilio documentation for setting up dual-channel recording.

Add Links to Recordings

You can send links to recordings in Twilio that are related to a given task. This enables your users to listen to calls in Ytica's Player and lets us perform Speech Analytics on top of the recordings. To attach a recording add object conversations  to the task attributes. Then put an array segment_link to the object conversations  with a list of URLs to the related recordings. Usually you will have one recording.

"conversations": {
    "segment_link": [
        "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/REXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"]
    ]
}

You can send the segment_link  after the task is completed via a task update when the link to the recording becomes available in Twilio or when you move to a location of your choice.

The link has to the audio has to be publicly accessible. The authorization information has to be part of the link URL either in the URL path or in the URL query.

Adding links to recordings is done programmatically using Twilio API or Twilio SDK.

Add Customer Data

Ytica links conversations to a customer based on a phone number or other contact information. You can set additional task attributes to provide details about the customer.

With additional customer data you can segment and filter by demographics in Ytica.

"customers" : {
    "name" : "John Doe",
    "customer_link" : "https://crm.company.com/customer/123",
    "category" : "VIP",
    "customer_manager" : "Financial Partners Corp.",
    "email" : "john.doe@gmail.com",
    "gender" : "Male",
    "market_segment" : "Pensioners",
    "organization" : "Prosperity Inc.",
    "phone" : "+44xxxxxxxxx",
    "year_of_birth" : "1947",
    "zip" : "ZC000000",
    "acquisition_cost" : 150,
    "business_value" : 7500
  }
Did this answer your question?