Task attributes
Survey mappings can check Twilio Flex task attributes as a condition for creating new survey interactions. In addition, mappings can use Twilio attributes to populate survey parameters.
The following excerpt shows a sample of the properties of a Twilio Flex Task object and the associated task variables in Mindful:
Twilio Flex Task object | Mindful Feedback task variables |
---|---|
There is a lot of information about the Twilio Flex task shown in the data structure below. Mindful Feedback pulls this object apart and creates task variables that can be assessed in the survey mapping conditions.
| You will see all of the derived task variables available in the dropdown menu that appears when using a task variable. The screenshot below shows the available task variables. These correspond either directly to an attribute of the task object (eg: startTime, id, queueSID) or they are derived (eg: agentID, duration). |
Predefined Twilio Flex Task Variables
The following table explains all of the predefined task variables.
Name | Short description | Notes |
---|---|---|
id | Task SID | The Twilio task SID
|
startTime | Start Time | The time the Twilio task first started (when the customer arrived at the contact center) |
endTime | End Time | The time the Twilio task ended (when the customer left the task and the agent marked it as complete) |
duration | Task Duration in Seconds | The number of seconds between the startTime and endTime. |
queueId | Initial Queue SID | The Twilio Flex queue SID for the first queue the customer went through during the task |
queueName | Initial Queue Name | The Twilio Flex queue name for the first queue the customer went through during the task |
callerNumber | Caller Number | The telephone number of the caller |
firstAgentID | Mindful Agent ID of the first agent | The Mindful Feedback Agent ID corresponding to the first agent that handled the task
|
firstAgentEmail | Email of first Agent | The Twilio Flex email address of the agent that first handled the conversation |
agentID | Mindful Agent ID of the last Agent | The Mindful Feedback Agent ID corresponding to the last agent that handled the task. |
agentEmail | Email of last Agent | The Twilio Flex email address of the agent that last handled the task |
status | Status | The status of the Twilio Flex task |
priority | Priority | The priority of the Twilio Flex task |
workflowName | Twilio Flex Workflow name | The name of the Twilio Flex workflow that was utilized by the task |
workflowId | Twilio Flex Workflow SID | The Workflow SID for the Twilio Flex workflow that was utilized by this task |
channel | Twilio Flex Channel | The name of the Twilio Flex channel utilized by this task |
transferred | Caller was transferred | A flag, that when set to 1, means the task was transferred at least once. This will be 0 if no transfer occurred. |
callSid | Twilio Flex Call SID | The call SID for the Twilio Flex call associated with this task |
You are not limited to using the predefined task variables. Any value from the attributes property of a task object can be referenced simply by using the property name. For example:
Text"attributes": {
"SDX_CustomerName:" "Alexander"
"SDX_external_ref": "CA3a6..."
"SDX_phone_number": "+61404873642"
"SDX_respondent_language": "en-US"
"SDX_survey_sip_token": "7fd830d0-7efd..."
}
To use a custom property, type the property name into the task variable field.
To learn more:
- Refer to the introduction of this section for more information about task attributes.
- Refer to Adding Survey Interactions to learn more about using Twilio Flex task attributes to create new interactions.