V3 Motion Variable List

V3 Motion Variable List

This page is under revision

What’s about

On this page, you can find the list of Standard Variables available in XCALLY Motion application.

Remember that the variable field name must be exactly as mentioned in the database tables.

 

Contact Variables

These are variables related to cm_contacts, valid for all channels. The field is the name of a contact's field in Contact Manager.

Title

Variable

Description

Title

Variable

Description

Contact ID

id

Unique identifier of contact

Contact First Name

firstName

Contact’s First Name

Contact Last Name

lastName

Contact’s Last Name

Postal Code

postalCode

Numerical or alphanumeric string representing a postal (ZIP) code

Contact city

city

Contact’s city

Contact country

country

Contact’s country

Contact Date of Birth

dateOfBirth

Contact’s Date of Birth (Day, Month, Year)

Contact primary phone number

phone

Main phone number of the contact

Contact mobile phone number

mobile

Contact mobile phone number

Contact email

email

Contact’s email address

Agent ID

UserId

Agent managing contact

Scheduled At date and time

scheduledat

scheduledat timestamp (used by Motion Bull)

Created At date and time

createdAt

Contact creation timestamp

Updated At date and time

updatedAt

Contact update timestamp

Deleted At date and time

deletedAt

Contact deletion timestamp

Contact company ID

CompanyId

External company reference

Contact Manager List ID

ListId

ID of Contact Manager List in which contact is saved

Contact Additional Phones

AdditionalPhones

Contact Additional Phones

List Variables

These are variables related to cm_lists, valid for all channels.

Title

Variable

Description

Title

Variable

Description

List ID

id

Unique identifier of list

List name

name

list name

List prefix

dialPrefix

Prefix added to phone numbers before dialing

Created At date and time

createdAt

List creation timestamp

Updated At date and time

updatedAt

List update timestamp

 

Voice Channel

Inbound Call

Title

Variable

Description

Title

Variable

Description

Unique ID

uniqueid

unique identifier associated with each call

Caller Number

calleridnum

parameter indicating the caller's telephone number

Caller Name

calleridname

parameter indicating the name associated with the caller's telephone number

Queue

queue

this variable indicates the destination queue or group of agents that handled the call

Hold Time

holdtime

indicates the time spent on hold during call handling

Talk Time

talktime

indicates the total time spent in conversation

Connected Time

agentconnectAt

indicates the moment when an agent connects to the incoming call and becomes active in handling it

Called Time

agentcalledAt

indicates the moment when an agent was called to handle an incoming call

DNID

destexten

used to identify the destination extension or department to which the call was routed

Destination caller ID number

destcalleridnum

used to identify the Agent’s internal extension to which the call was routed

Destination caller ID name

destcalleridname

used to identify the Agent’s name to which the call was routed

Destination channel

destchannel

indicates the final channel where the call is connected

Context

context

indicates the used context

Complete Time

agentcompleteAt

provides information on the time when the agent finished interaction with the caller and ended the call

No Answer Time

agentringnoanswerAt

indicates the moment when an agent was called but did not answer within a certain time interval

Recording URL

Available for Zendesk, Salesforce, Sugar CRM, Freshdesk and Zoho integrations.

recordingURL

indicates the URL or access path to the audio recording of the call

Outbound Call

Title

Variable

Description

Title

Variable

Description

Unique ID

uniqueid

unique identifier associated with each call

Route ID

routeId  

unique identifier associated with the route

Destination

destination  

value of destination phone number

Out Prefix

prefix  

value of outprefix (if present)

Caller Number

calleridnum

used to specify the caller ID number: it allows the caller to check the number that appears on the recipient's caller ID display

Caller Name

calleridname

used to specify the caller ID name: it allows the caller to customize the name associated with the caller ID number

Called Number

destcalleridnum

used to specify the recipient's phone number or the number to which the call is being directed

Called Name

destcalleridname

used to specify the recipient's name

Start Time

starttime

used to indicate the start time or initiation time of the call. It represents the moment when the outbound call was first initiated or placed

Answer Time

answertime

used to indicate the time when the call was answered. It represents the moment when the call was picked up or connected

Complete Time

endtime

used to indicate the time when the call ended. It represents the moment when the call was terminated, either by the caller or the recipient.

Recording URL

recordingURL

indicates the URL or access path to the audio recording of the call

Motion Bull

The Motion Bull variables must be used with all lowercase characters in the triggers within {{ }}, while in the Square projects they must be used with all uppercase characters within { }

Title

Variable

Description

Title

Variable

Description

Queue Campaign ID

xmd-voicequeueid

Available for Queue Campaign to identify a voice queue

IVR Campaign ID

xmd-campaignid

Available for IVR Campaign to identify the id of IVR

Caller ID

xmd-callerid

Refers to the caller ID information.
In "Caller Name"<Caller Number> format

Contact ID

xmd-contactid

Used to uniquely identify and reference a specific contact or customer

Contact's Fields

xmd-{name_field}

name_field is the name of a contact's field in Contact Manager.
You have to replace the field with e.g. xmd-firstname, xmd-phone, xmd-email and so on

Contact's Custom Fields

xmd-cf_{ID}

ID is the custom field's ID.
You have to replace the field: if e.g. the contact has a custom field with ID=5, the variable name will be xmd-cf_5.

 

Chat Channel

Account

With this data you can retrieve variables related to the chat website account.

Title

Variable

Note

Title

Variable

Note

Chat website ID

id

Unique identifier of chat website

Chat website name

name

Name of the Chat website

Website Address

address

Chat website address

List ID

ListId

ID of Contact Manager List involved in the account

Interaction

At the first contact with a new customer, the interaction object is created, which acts as a “container”.
A high-level interaction variable is then created which contains general data e.g. creation date and contact ID, but other variables such as the body message will not be present at interaction level, but within the message itself.

Title

Variable

Description

Title

Variable

Description

Interaction ID

id

Unique identifier of interaction

Interaction status

closed

True if the interaction is closed

Interaction close timestamp

closedAt

Timestamp of close action

Disposition

disposition

Interaction disposition

Second Level disposition

secondDisposition

Interaction second level disposition

Third Level disposition

thirdDisposition

Interaction third level disposition

Note

note

Interaction note

Agent ID

UserId

To identify agent involved in conversation

Contact ID

ContactId

Unique identifier for customer

Website ID

ChatWebsiteId

identifier to the specific website where there is the snippet and the chat conversation takes place

Customer Browser

browserName

browserVersion

Information on browser used by the customer

Customer OS

osName

osVersion

Information on OS used by the customer

Customer Device

deviceModel

deviceVendor

deviceType

Information on device used by the customer

Customer Referer

referer

Referer page of the customer

Customer IPs

customerIp

List of IPs used by the customer to reach the webchat

First Read timestamp

read1stAt

Datetime of first read message

Last Read timestamp

lastMsgAt

Datetime of last read message

Last Message Direction

lastMsgDirection

Direction (in or out) of the last message

Interaction create timestamp

createdAt

Creation timestamp when a chat conversation was started

Interaction update timestamp

updatedAt

Update timestamp when a WhatsApp interaction was updated

Queue ID

queueId

To identify queue involved in chat channel

Agent interface

interface

Refers to a data structure that represents the chat interface through which users interact with the chat application

Message

Title

Variable

Description

Title

Variable

Description

Message ID

id

Unique identifier of message

Text message

body

The body message

Message status

read

True if the message is read

Message direction

direction

Used to indicate the direction of the chat message (in / out)

ReadAt

readAt

Timestamp of when a message was marked as read

Provider Name

providerName

Name of provider used in chat channel

Chat Website ID

ChatWebsiteId

Identifier to the specific website where there is the snippet
and the chat conversation takes place

Chat Interaction ID

ChatInteractionId

Unique identifier of interaction

Agent ID

UserId

To identify agent involved in message exchange

Contact ID

ContactId

Unique identifier for customer

Message create timestamp

createdAt

Creation timestamp when a chat message was sent

Interaction update timestamp

updatedAt

Update timestamp when a chat interaction was updated

Translation Source Language

translationSourceLanguage

Original language of a message auto detected by the translation service

Translation target language

translationTargetLanguage

Language into which a message is translated

Message Traslation

messageTranslation

Actual translation of the message, null means no translation

Email Channel

Account

Title

Variable

Note

Title

Variable

Note

Account ID

id

Unique identifier of account

Account name

name

Name of the email account

Email Service

service

Service of the email Account (e.g. Gmail, Hotmail, Yahoo…)

Email Address

email

Email address of the configured account

List ID

ListId

ID of Contact Manager List involved in the account

 

Interaction

Title

Variable

Note

Title

Variable

Note

Interaction ID

id

Unique identifier of interaction

Interaction status

closed

True if the interaction is closed

Interaction close timestamp

closedAt

Timestamp of close action

Disposition

disposition

Interaction disposition

Second level disposition

secondDisposition

Interaction second level disposition

Third level disposition

thirdDisposition

Interaction third level disposition

Note

note

Interaction note

Reply Message ID

inReplyTo

Identifier or message ID of the email being replied to

To

to

To property of the latest message

Cc

cc

Cc property of the latest message

Subject

subject

Subject property of the latest message

Attachment

attach

Number of attachments in the latest message

First Read timestamp

read1stAt

Datetime of first read message

Email substatus

substatus

Email inserted substatus

Substatus timestamp

substatusAt

Datetime of inserted substatus

First Message Direction

firstMsgDirection

Direction (in or out) of the first message

Last Read timestamp

lastMsgAt

Datetime of last read message

Last Message Direction

lastMsgDirection

Direction (in or out) of the last message

Agent ID

UserId

To identify agent involved in email channel

Contact ID

ContactId

Unique identifier for customer

Email Account ID

MailAccountId

Identifier associated with a specific email account

Interaction create timestamp

createdAt

Creation timestamp when email was created or received

Interaction update timestamp

updatedAt

Update timestamp when a email interaction was updated

Transfer Account ID

TransferAccountId

Mail account previously associated with this interaction

Transfer User ID

TransferUserId

User with role agent previously associated with this interaction

Transfer Mail Queue ID

TransferMailQueueId

Mail_queue previously associated with this interaction

Transferred timestamp

transferredAt

Time when this interaction was transferred into another account, queue or user

Last Reopened timestamp

lastReopenedAt

Date when the interaction was reopened

Rescheduled At timestamp

rescheduledAt

Time when the interaction was rescheduled

Rescheduled To timestamp

rescheduledTo

Time when the interaction needs to be appear as new

Rescheduled As Unassigned

rescheduledAsUnassigned

When reschedule time is reached, set if the interaction be unassigned

Message

Title

Variable

Note

Title

Variable

Note

Message ID

id

Unique identifier of message

Text message

body

The body message

Message status

read

True if the message is read

Message direction

direction

Used to indicate the direction of the email (in / out)

Provider Message ID

messageId

ID assigned by Email provider

From

from

Refers to the sender's information in an email message

To

to

Refers to the recipient(s) of an email message

Cc

cc

Refers to the secondary recipients of an email message

Bcc

bcc

To include hidden recipients in an email message

Subject

subject

Subject of email message

Message sent timestamp

sentAt

Timestamp when message was sent

Read At datetime

readAt

Timestamp when message was read

Attachment

attach

Number of attachments in the latest message

Email Account ID

MailAccountId

Identifier associated with a specific email account

Email Interaction ID

MailInteractionId

Unique identifier of interaction

Agent ID

UserId

To identify agent involved in email exchange

Contact ID

ContactId

Unique identifier for customer

Message create timestamp

createdAt

Creation timestamp when a message was sent

Message update timestamp

updatedAt

Timestamp when a message was updated

Translation Source Language

translationSourceLanguage

Original language of a message auto detected by the translation service

Translation target language

translationTargetLanguage

Language into which a message is translated

Message Traslation

messageTranslation

Actual translation of the message, null means no translation

SMS Channel

Account

Title

Variable

Note

Title

Variable

Note

Account ID

id

Unique identifier of account

Account name

name

Name of the sms account

SMS phone number

phone

Phone number used for sms account

SMS Provider

type

SMS Provider used for the account (e.g. twilio, skebby, clicksend…)

List ID

ListId

ID of Contact Manager List involved in the account

 

Interaction

Title

Variable

Note

Title

Variable

Note

Interaction ID

id

Unique identifier of interaction

Interaction status

closed

True if the interaction is closed

Interaction close timestamp

closedAt

Timestamp of close action

Disposition

disposition

Interaction disposition

Second level disposition

secondDisposition

Interaction second level disposition

Third level disposition

thirdDisposition

Interaction third level disposition

Note

note

Interaction note

Customer mobile phone number

phone

Mobile phone number of the contact

First Message Direction

firstMsgDirection

Direction (in or out) of the first message

Last Message Direction

lastMsgDirection

Direction (in or out) of the last message

First Read timestamp

read1stAt

Datetime of first read message

Last Read timestamp

lastMsgAt

Datetime of last read message

Agent ID

UserId

To identify agent involved in sms channel

Contact ID

ContactId

Unique identifier for customer

Sms Account ID

SmsAccountId

Identifier associated with a specific sms account

Queue ID

queueId

To identify queue involved in sms channel

Interaction create timestamp

createdAt

Creation timestamp when sms was received or sent

Interaction update timestamp

updatedAt

Update timestamp when a sms interaction was updated

Last Reopened At

lastReopenedAt

Date when the interaction was reopened

Message 

Title

Variable

Note

Title

Variable

Note

Message ID

id

Unique identifier of message

Text message

body

The body message

Message status

read

True if the message is read

Message direction

direction

Used to indicate the direction of the sms (in / out)

Provider Message ID

messageId

ID assigned by Sms provider

Customer mobile phone number

phone

Mobile phone number of the contact

Read At

readAt

Timestamp of when a message was marked as read

Sms Account ID

SmsAccountId

Identifier associated with a specific sms account

Sms Interaction ID

SmsInteractionId

Unique identifier of interaction

Agent ID

UserId

To identify agent involved in sms exchange

Contact ID

ContactId

Unique identifier for customer

Message create timestamp

createdAt

Creation timestamp when a sms was sent

Message update timestamp

updatedAt

Creation timestamp when a sms was updated

Translation Source Language

translationSourceLanguage

Original language of a message auto detected by the translation service

Translation target language

translationTargetLanguage

Language into which a message is translated

Message Traslation

messageTranslation

Actual translation of the message, null means no translation


Openchannel

Account

Title

Variable

Note

Title

Variable

Note

Account ID

id

Unique identifier of account

Account name

name

Name of the sms account

List ID

ListId

ID of Contact Manager List involved in the account

 

Interaction

Title

Variable

Note

Title

Variable

Note

Interaction ID

id

Unique identifier of interaction

Interaction status

closed

True if the interaction is closed

Interaction close timestamp

closedAt

Timestamp of close action

Disposition

disposition

Interaction disposition

Second level disposition

secondDisposition

Interaction second level disposition

Third level disposition

thirdDisposition

Interaction third level disposition

Note

note

Interaction note

Agent ID

UserId

To identify agent involved in openchannel

Contact ID

ContactId

Unique identifier for customer

Openchannel Account ID

OpenchannelAccountId

Identifier associated with a specific open channel account

Queue ID

queueId

To identify queue involved in openchannel

First Message Direction

firstMsgDirection

Direction (in or out) of the first message

Last Message Direction

lastMsgDirection

Direction (in or out) of the last message

First Read timestamp

read1stAt

Datetime of first read message

Last Read timestamp

lastMsgAt

Datetime of last read message

Interaction create timestamp

createdAt

Creation timestamp when openchannel interaction was received or sent

Interaction update timestamp

updatedAt

Update timestamp when a openchannel interaction was updated

Last Reopened At

lastReopenedAt

Date when the interaction was reopened

Message 

Title

Variable

Note

Title

Variable

Note

Message ID

id

Unique identifier of message

Text message

body

The body message

Message status

read

True if the message is read

Message direction

direction

Used to indicate the direction of the message (in / out)

Openchannel Account ID

OpenchannelAccountId

Identifier associated with a specific open channel account

Openchannel Interaction ID

OpenchannelInteractionId

Unique identifier of interaction

Agent ID

UserId

To identify agent involved in openchannel interactions

Contact ID

ContactId

Unique identifier for customer

Read At

readAt

Timestamp of when a message was marked as read

Message create timestamp

createdAt

Creation timestamp when a open channel message was sent

Read At

updatedAt

Update timestamp when a open channel message was updated

Integration ID

integrationId

Unique identifier of integration within the system

Translation Source Language

translationSourceLanguage

Original language of a message auto detected by the translation service

Translation target language

translationTargetLanguage

Language into which a message is translated

Message Traslation

messageTranslation

Actual translation of the message, null means no translation

 

WhatsApp Channel

Account

Title

Variable

Note

Title

Variable

Note

Account ID

id

Unique identifier of account

Account name

name

Name of the WhatsApp account

WhatsApp account phone number

phone

Mobile phone number of the WhatsApp Account

Phone number ID

phone_number_id

WhatsApp Account Phone number ID

Recontact Template ID

recontactTemplateId

Recontact template ID inserted in account configuration

Account type

type

Account type (twilio, sinchv2, meta or kaleyra)

List ID

ListId

ID of Contact Manager List involved in the account

Interaction

Title

Variable

Note

Title

Variable

Note

Interaction ID

id

Unique identifier of interaction

Interaction status

closed

True if the interaction is closed

Interaction close timestamp

closedAt

Timestamp of close action

Disposition

disposition

Interaction disposition

Second level disposition

secondDisposition

Interaction second level disposition

Third level disposition

thirdDisposition

Interaction third level disposition

Note

note

Interaction note

Customer mobile phone number

phone

Mobile phone number of the contact

First Message Direction

firstMsgDirection

Direction (in or out) of the first message

Last Message Direction

lastMsgDirection

Direction (in or out) of the last message

First Read timestamp

read1stAt

Datetime of first read message

Last Read timestamp

lastMsgAt

Datetime of last read message

Agent ID

UserId

To identify agent involved in WhatsApp channel

Contact ID

ContactId

Unique identifier for customer

WhatsApp Account ID

WhatsAppAccountId

Identifier associated with a specific WhatsApp account

Interaction create timestamp

createdAt

Creation timestamp when WhatsApp was received or sent

Interaction update timestamp

updatedAt

Update timestamp when a WhatsApp interaction was updated

Last Reopened At

lastReopenedAt

Date when the interaction was reopened

Queue ID

queueId

To identify queue involved in WhatsApp channel

Campaign ID

campaign_id

Unique identifier for campaign

Messages

Title

Variable

Note

Title

Variable

Note

Message ID

id

Unique identifier of message

Text message

body

The body message

Message direction

direction

Used to indicate the direction of the WhatsApp message (in / out)

Provider Message ID

messageId

ID assigned by WhatsApp provider

Customer mobile phone number

phone

Mobile phone number of the contact

WhatsApp Account ID

WhatsappAccountId

Identifier associated with a specific WhatsApp account

WhatsApp Interaction ID

WhatsappInteractionId

Unique identifier of interaction

Agent ID

UserId

To identify agent involved in WhatsApp interactions

Contact ID

ContactId

Unique identifier for customer

Message create timestamp

createdAt

Creation timestamp when a WhatsApp message was sent

Message update timestamp

updatedAt

Update timestamp when a WhatsApp message was updated

Message status

read

True if the message is read

Read At

readAt

Timestamp of when a message was marked as read.

Template ID

templateId

Unique identifier of template

Translation Source Language

translationSourceLanguage

Original language of a message auto detected by the translation service

Translation target language

translationTargetLanguage

Language into which a message is translated

Message Traslation

messageTranslation

Actual translation of the message, null means no translation

How to retrieve variable

You can retrieve variables related to the interaction, message, account and so on in different ways, based on where you need to obtain them.

Triggers: the structure can be changed, according to the condition being invoked

image-20250326-133501.png

Conditions

structure

Interaction (Opened/Closed/sustatus for mail channel)

{{name_field}}

Message (Incoming, outgoing, accepted, rejected)

{{name_field}}

Account

{{name_field}}

 

Email Template

image-20250326-141702.png

On email channel, the template, for example to create the signature, has to have this structure:

  • {{account.name_field}}

  • {{interaction.name_field}}

  • {{contact.name_field}}

  • {{message.name_field}}

replacing name_field with the information you need (e.g. account.name / interaction.id / account.name and so on)

Canned answers

image-20250326-143343.png

For canned answers of all textual channels, the structure must be:

  • {{account.name_field}}

  • {{interaction.name_field}}

  • {{contact.name_field}}

  • {{user.name_field}}

replacing name_field with the information you need (e.g. interaction.id / account.name and so on)

Notifications

image-20250326-141913.png

The Administrator can customize the notification of a new interaction to show the Agent information about the source, the sender, the recipient queue and so on.
The Setting section of the Notification is under the general settings of a channel account and allows to: enable/disable the notification sound, enable/disable the notification shake effect and define notification contents and style in the Template section (by choosing which information to show about the specific interaction using XCALLY Motion variables with syntax {{variablename}})

So the structure must be:

  • {{account.name_field}}

  • {{interaction.name_field}}

  • {{contact.name_field}}

  • {{message.name_field}}

  • {{queue.name_field}}

replacing name_field with the information you need (e.g. interaction.id / account.name and so on)

Consider that if you insert this structure in notification
{{#queue}}Queue: {{queue.name}}{{/queue}}
only if (#) the queue variable exists, the template renders the queue variable

Routing

image-20250326-143039.png

You can use variables also in routing of the different channels, by selecting for example as application auto reply, Gotoif or system.
In these cases, the structure must be ${name_field} replacing name_field with the information you need.

 

Also we recommend using <`> (backtick) instead of the <'> (apostrophe) to avoid potential errors that can arise with the genitive Saxon case.
Here is an example:

`{{body}}`.indexOf("this is some text in the body") > -1

If you want to render unescaped HTML, use the triple mustache: {{{name}}}. You can also use & to unescape a variable

 

 

Related content