Variables

What is a Variable?


  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 are able to create your 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 phonebar popup displayed for agents.


This section explains mainly how to create and use custom variables.



On this page:



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



The Variables section

You can find the Variables section under Tools menu:




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 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 Name or description and click on Save.


Delete Variables

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:

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


Variable Syntax


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


In Triggers, Templates and Jscripty, variables are referenced using the following syntax:

{{VARIABLENAME}}


The following picture shows an example of Motion Phonebar CTI URL action in Voice Triggers.

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

The following picture shows an example of a template.

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


In Cally Square projects, variables are referenced using the following syntax:

{VARIABLENAME}




In Outbound, Inbound and Internal routes, variables are referenced using the following syntax:

${VARIABLENAME}




Unless the value of a custom variable is set (e.g. within the dialplan or cally square application) it will have an empty value.


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 {}. 

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


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


Note that you have to specify the variable name in the variable field and the variable within ${ } in the Value field.


Related pages