In the Thrio System, in the Workflow and Rest API can interact with workitem objects. These workitem objects have fields that users can extract and manipulate. Users can extract information from the fields to do something, use fields to test and use javascript functions.
JavaScript expression that returns the last 10 digits of the incoming phone number
workitem.from.slice(-10)
If the variable name is a substring of a string then the variable is indicated by the dollar sign and curly braces (${<variable name>}). This will indicate to the system to grab the value of the from field of the workitem object ${workitem.from}. The previous annotation $V. is deprecated and will be removed in a future release. When using strings in condition, they must be enclosed between quotes.
Enclose string between quotes when used in condition
'InboundCall'
All fields are read-only with the exception of the data field. A field is a string, number, or boolean. A workitem object is made of many fields. A data field returns an object the user can modify which is the only thing a user can manipulate. That data field will also contain fields assigned at different part of the application when passing context to it.
The following are the fields of the workitem, their description and possible values. All fields are in read-only mode to the exception of the data field. That field is an object that can store the different fields.
Object representing the acknowledgment email that was sent automatically.
String representing the username of the user that has the workitem assigned to him.
Unix timestamp in milliseconds when the workitem was assigned to a user. You can create a JavaScript date by using the new Date(workitem.assignedAt) function.
Contains all the business events defined in the system. You can access the specific business event by adding the name. For example, if a business event called holiday is defined you can validate if it falls inside the time range or not by calling workitem.businessEvents.holiday. As the Business Events name is used in a variable, there can’t be any spaces or dashes/spaces in it’s name. It will return true if the current time falls inside the time range specified in the Time Events that are contained in the business event or will return false if the current time falls outside the time range.
Unique ID for the call assigned by the telco.
Campaign ID the workitem belongs to.
The category ID assigned by the system to the workitem.
When using the “Queue Data” component, this object will be populated with the information from the queue(s) specified. The object is composed of:
JSON representation of the channelAvailability field
"channelAvailability": {
"availableAgents" : 5,
"loggedAgents" : 9,
"chat": {
"estimatedWaitTimeInSeconds": 30
}
"email": {
"estimatedWaitTimeInSeconds": 30
}
"social": {
"estimatedWaitTimeInSeconds": 30
}
"sms": {
"estimatedWaitTimeInSeconds": 30
}
"voice": {
"estimatedWaitTimeInSeconds": 30
}
}
The channel type for this workitem. Possible values are:
Array of objects containing the chat communication between the user and the customer. The object is composed of:
Contact object if a contact was assigned to the workitem. The fields of the contact depends on the implementation that was done.
Address (phone number, email address or userId) that was received or sent based on the workitem type. Similar to to and from but the system assigns it based on the type.
Unique ID for the contact if a contact was assigned to the workitem.
Object containing the current chat message(s) between the user and the customer. The object is composed of:
Object containing the current SMS message(s) between the user and the customer. The object is composed of:
Data field that holds custom fields received or created in the workflow.
Unix timestamp in milliseconds when the workitem was dialed.
Contains the last digit that has been entered in a Play and Collect Digits or a Get Digits component.
Unix timestamp in milliseconds when the workitem was dispositioned by an agent or the system.
Unique ID for the disposition if a workitem was dispositioned.
Name of the disposition.
Note entered when the workitem was dispositioned.
Object holding the email received by the campaign. The object is composed of:
Address (phone number, email address or userId) that was received or sent the workitem based on the workitem type.
Language detected or assigned for this workitem.
Lead object if the workitem is of type PredictiveCall, PredictiveSMS or ProgressiveCall. The fields of the lead depends on the implementation that was done.
Unix timestamp in milliseconds when the workitem was offered to a user.
Owner of the workitem. Possible values are:
Unique ID of the current owner of the workitem.
Represents the time the callback was scheduled for.
Priority assigned to the workitem.
Unix timestamp in milliseconds when the workitem entered a queue.
Queue IDs representing the queues that could have answered the workitem.
A region as defined by the system where this workitem has been processed.
Object holding the email response. The object is composed of:
Queue ID representing the queue that answered the workitem.
Array of objects containing the SMS communication between the user and the customer. The object is composed of:
State if the workitem. Possible values are:
Unique ID of the survey currently assigned to the workitem. This surveyId can be change in the workflow by using the survey component.
Complete survey result entered by the customer.
Unix timestamp in milliseconds when the workitem was terminated.
Array of strings that will be presented to the user when a workitem is presented to the user.
Deprecated, use BussinessEvents instead of verifying if the workitem can be process / answer or not. Object containing the current time. The object is composed of:
"time": {
"currentHour" : 10,
"currentMin" : 50,
"currentSec" : 0,
"currentDayOfWeek" : 5,
"currentDayOfMonth" : 11,
"currentYear" : 2019
}
Address (phone number, email address or userId) that was received or sent based on the workitem type.
Indicates the current type of the workitem. Possible values are:
Unique ID for the workitem assigned by the Thrio.
The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.
A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!
Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.