Variables

Variables

 

XCALLY section

Tools → Variables

On this page

Overview

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, WhatsApp and so on).

In addition to these, you can create custom variables that can be used within the entire XCALLY 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 pop-up displayed for agents.

For more information about all the Asterisk Variables that can be used see here, while you can explore the page for the XCALLY variable list on the different channels.

Variables section

This page describes the Variables configuration on the New Client Experience, available from version 3.41.0. We recommend using the New Experience web interface to take full advantage of the latest features.

You can find the Variables section under the Tools menu. When you click on it, you can see all the already existing Variables.

image-20241015-100253.png

You can edit or delete a variable clicking the three dots button (⋮) next to the variable of interest.

Furthermore, under Tools → Variables section 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

Create a Variable

To create a variable:

  1. Click the Add button, under Tools → Variables

  1. Enter the variable name and optional description

  2. Click Add Variable

After the variable is created, you can view it in the list of variables.

How to use Variables 

You can use XCALLY standard variables and custom variables in your 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 assign a value to a variable — either a constant (string, number, etc.) or another variable (Asterisk or custom).
In Cally Square, when assigning one variable to another, make sure to enclose the variable name in curly brackets {} within the Set block.

Set configuration in Cally Square block:

  • variable: enter the variable name

  • value: enter the variable within {}

Example:

  • variable: callernumber

  • value: {CALLERID(num)}

After the block is executed, the variable will contain the caller number.

 

 

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

Set application configuration under routes section:

  • variable: enter the variable name

  • value: enter the variable within ${ }

Example:

  • variable: callernumber

  • value: ${CALLERID(num)}

After the block is executed, the variable will contain the caller number.

 

Variable Syntax

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

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

  • Triggers, Templates and Jscripty: {{variablename}}

  • Cally Square projects: {variablename}

  • Outbound, Inbound and Internal routes: ${variablename}

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

Example of Motion Phonebar CTI URL action in Voice Triggers:

Example of a Template content:

Example of Jscripty field (under Jscripty → Builder):

Example of Motion Phonebar CTI URL action in Voice Triggers:

Example of a Template content:

Example of Jscripty field (under Jscripty → Builder):

  • Action: Motion Bar

  • Type: CTI URL

  • URL: https://your-server-IP?order={{ordernum}}&queue={{queue}}

Content:

  • CALLER NAME: {{calleridname}}

  • CALLER NUMBER: {{calleridnum}}

  • QUEUE: {{queue}}

Text:

Hello {{contact.firstName}}

 

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

You must enter the variable inside {{ }} to display the content in the template.

You must enter the variable inside {{ }} to customize the content of the script, and show the value when displayed to 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:

  • Output: The order number is {ordernum}

 

  • Arguments: Order number ${ordernum}

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

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.

FAQ