V3 Variables

 

What’s about?

A variable is a container that has a name and a value. XCALLY Motion has a list of standard variables that can be used to access information about Omni Channel Interactions (Voice Calls, Web Chat, Email and so on).

In addition to these, you can create custom variables that can be used within the entire Motion system. For example, you can create a variable named order and use it in a Cally Square project to add logic to your IVR flow or customize the XCALLY Phonebar popup displayed for agents.

For more information about all the Asterisk Variables that can be used see here.


The Variables section

You can find the Variables section under the Tools menu:

 

image-20240613-102139.png

 


Create a Variable

To create a variable, click on New Variable button 

Enter variable Name and Description then click on Add Variable. After the variable is created, you can view it in the list of variables.

Edit or Delete a Variable

Find the variable from the variables list (you can use the search box on the top-right of the page to filter) and Click on Edit Variable. 
Edit the Name or description and click on Save.

To delete a single variable, find the variable in the variables list and click Delete Variable:

To delete multiple variables, select the list of variables by marking the checkbox on the left side, click on Delete button and click OK to confirm:

Export list of Variables

To export list of variables in CSV, select the list of variables to export by marking the checkbox on the left side and click on the icon Export button:

Variables on New Client Experience

AVAILABLE FROM VERSION 3.41.0

If you enable New Client Experience, you can view this visualisation, with the list of created variables:

you can:

  • search for a specific variable

  • clear all filters

  • manage columns, by selecting or not them

  • activate the advanced search for each field

  • create a new variable, by clicking on Add and indicate variable name

How to use Variables 

You can use Motion standard variables and custom variables in your Motion system according to your needs.

The following are some of the sections where variables can be used:

  • Triggers

    • to customize Phonebar or web pop-up displayed for agents

    • to pass custom parameters to a web or Windows application

    • to forward custom parameters in HTTP GET/POST request

  • Cally Square project:

    • to insert logic in the call flow

  • Routes Dialplan:

    • to insert logic in the call flow

  • Integrations

    • to pass custom information to 3rd party applications like Zendesk, Freshdesk...

  • Templates:

    • to customize the content with the values you need

  • Jscripty:

    • to customize contents in agent scripts

  • Email:

    • to customize the outbound email messages contents

Set a Variable

You can set (assign) the value of a variable to a constant (string, number, etc.) or another variable (Asterisk variables or custom variables). In Cally Square, if you want to set a variable to another variable, you have to put the variable inside {}. 

You need to insert as:

  • variable: the variable name

  • value: the variable within {}

In this example, we are setting callernumber variable to an Asterisk variable {CALLERID(num)} in Cally Square Set application.
After the setting, the variable contains the caller number.

 

The same operation can be performed in Inbound or Internal routes using the set application as follows: 

  • variable: the variable name

  • value: the variable within ${ }

Variable Syntax

The syntax you need to use to access the value of a variable slightly differs from section to section:

Triggers, Templates and Jscripty:

{{variablename}}

Cally Square projects:

{variablename}

OutboundInbound and Internal routes:

Example of Motion Phonebar CTI URL action in Voice Triggers:

Example of a Template:

Example of Jscripty (to design your script on Builder):

Example of Motion Phonebar CTI URL action in Voice Triggers:

Example of a Template:

Example of Jscripty (to design your script on Builder):

 

 

You must place the variable inside {{ }} to pass custom parameters in the URL query string.

You must place the variable inside {{ }} to display the content of the variable.

You must place the variable inside {{ }} to customize the content displayed for agents.

Example of a Cally Square Project:

Example of OutboundInbound and Internal routes:

Example of a Cally Square Project:

Example of OutboundInbound and Internal routes:

Jscripty

The syntax you need to use for Jscripty is always {{variablename}}
Depending on the variable you want to call up (at event, user or contact level), you can use these types of syntax:

Title

Variable

Note

Title

Variable

Note

Event field

{{name_field}}

name_field depends on the type of event.

For the full complete list, refer to the relative section:

User field

{{user.name_field}}

name_field is one of the following:

  • id

  • username

  • fullname

  • email

  • userpic

  • alias

Contact field

{{contact.name_field}}

name_field is name of a contact's field in Contact Manager.

Example: contact.firstName, contact.phone, contact.email and so on

It is available only when you reply to email or click to email.

Variables for Omni Channels

In this section you find the variables that can be used in OmniChannels Notifications, Templates, Routing, Canned Answers and App Zone.

The syntax that must be used to embed the variable within the template is as follows {{variablename}}

Example 1: 

Account: {{account.name}} 

Example 2 (for Notifications):

{{#queue}}Queue: {{queue.name}}{{/queue}}

In this case only if (#) the queue variable exists, the template renders the queue variable

Depending on the variable you want to call up (at user, account, queue,contact, interaction, message, list or body level), you can use these types of syntax:

Title

Variable

Note

Used by

Title

Variable

Note

Used by

User field

{{user.name_field}}

name_field is one of the following:

  • id

  • name

  • fullname

  • email

  • userpic

  • alias

  • internal (only for app zone)

  • interface (only for app zone)

  • Template

  • Routing

  • Canned Answer

  • App Zone

Account field

{{account.name_field}}

name_field is one of the following:

  • id

  • name

  • key

  • email (only for email)

  • Notification

  • Template

  • Routing

  • Canned Answer

Queue field

{{queue.name_field}}

name_field is one of the following:

  • id

  • name

  • Notification

  • Template

Contact field

{{contact.name_field}}

name_field is name of a contact's field in Contact Manager.

Example: contact.firstName, contact.phone, contact.email and so on

It is available only when you reply to email or click to email.

  • Notification

  • Routing

  • Canned Answer

Interaction

{{interaction.name_field}}

name_field is one of the following:

  • id

  • to (only for email)

  • cc (only for email)

  • subject (only for email)

  • substatus (only for email)

 

It is available only when you reply to email.

  • Notification

  • Template

  • Routing

  • Canned Answer

Message

{{message.name_field}}

name_field is one of the following:

  • id

  • subject (only for email)

  • from (only for email)

  • to (only for email)

  • body (only for email)

  • Notification

  • Template

  • Routing

List

{{list.name_field}}

name_field is one of the following:

  • id

  • name

  • description

  • Notification

  • Template

  • Routing

General Body Fields

{{name_field}}

name_field is one of the following:

  • from

  • first name

  • last name

  • Notification

  • Template

  • Routing

 

Customize Omni Channel Notification Alert with Variables

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

  • define notification contents and style in the Template section (by defining which information to show about the specific interaction using XCALLY Motion variables with syntax {{variablename}})