Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Paneltitle

 

XCALLY section

Tools → Variables

On this page

:

Table of Contents

What is a Variable?

Image Removed  A variable
minLevel1
maxLevel2
outlinefalse
stylenone
typelist
printablefalse

📋 What’s about?

A variable (blue star) 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 can 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 XCALLY Phonebar popup displayed for agents.

Warninginfo

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


(blue star) The Variables section

You can find the Variables section under Tools  the Tools menu:

Image RemovedImage Added
Image Removed

image-20240613-102139.pngImage Added


Create a Variable

To create a variable, click on New Variable button Image Removed(blue star)

Image RemovedImage Added

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

Image Added

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.

Image Removed
Image Added

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

Image Removed
Image Added

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

Image Removed

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 Image Removedbutton:

Image Removed

Image Addedbutton:

image-20240613-102231.pngImage Added

🪛 Variables on New Client Experience

Status
colourYellow
titleAVAILABLE FROM VERSION 3.41.0

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

image-20241015-100253.pngImage Added

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 Phonebar or web pop-up displayed for agents

    • to pass custom parameters to a web or windows 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 {}. 

Image Added

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: 

Image Added
  • 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:

Panel
bgColor#FFFAE6#E6FCFF

{{VARIABLENAMEvariablename}}

Cally Square projects:

Panel
bgColor#E3FCEF#F4F5F7

{VARIABLENAMEvariablename}

OutboundInbound and Internal routes:

Panel
bgColor#DEEBFF#EAE6FF

${VARIABLENAMEvariablename}

Tip

 

Scenario:

TIP: If necessary, you can pass the variables without encoding special characters using three brackets:
{{{var}}}
where var was previously set as show_variable=1

Note

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

Example of Motion Phonebar CTI URL action in Voice Triggers:

Example of a Template:

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

Image Removed
Image Added
Image Removed
image-20241021-160405.pngImage Added

Image Removed
image-20241003-103607.jpgImage Added

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:

Image Removed
Image Added
Image Removed
Image Added
Note

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.

Image RemovedThe same operation can be performed in Inbound or Internal routes using the set application as follows: Image RemovedNote that you have to specify the variable name in the variable field and the variable within ${ } in the Value field.

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

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

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}})

Image Added