Supported Data Types
The data types that can be attached and presented to an Agent are:
Text: by providing a label and its value
Number: by providing a label and its value
Link : this data type can behave in the following way:
By providing a clickable label with a linked url. If clicked, the Agent opens the URL in a new Web Browser tab.
By adding an optional action “open_on_ring”. In this case the URL will automatically open in a new Web Browser tab when a call rings on the Agent Panel. Also this link will be clickable if the Agents closes it.
Besides these data types which hold data, there is another data type named multi that is used to organize the attached data in the user interface. If not used, then the attached data will be presented one label - value pair per row. If muti is used, then label - data pairs defined as an array under this type, will be presented in one row organized in multiple columns. Nested Multi types are not supported.
The following screenshot is provided as a visual reference on how attached data is presented in the Agent Panel.
JSON structure
All information attached to the call is provided to the API as a JSON payload. The following is an example that highlights the variables in magenta. This sample is related to the Agent Panel screenshot previously provided.
Code Block |
---|
[ { "label": "Zoho CRM", "type": "link", "value": "https://crm.zoho.com/crm/org870130696/search?searchword={{caller_id_number}}", "action": "open_on_ring" }, { "label": "Call Info Multi", "type": "multi", "value": [ { "label": "Customer ID", "type": "Text", "value":"{{customer_id}}" }, { "label": "Birth Year", "type": "Text", "value":"{{birth_year}}" } ] } ] |
An “attached” data object is defined by the following elements:
Required:
Label: This is the description of the content. This label is displayed in the agent panel next to the value.
Type: This is the type of content (text, number, link and multi)
Value: This is the value of the data object that contains the data. Please note a multi type is a container of data objects with types (text, number, link) and are defined in the JSON as an array.
Optional:
Action: The link data type is the only one that has an action, which is optional. The only action possible is open_on_ring. This action will make the Agent Panel auto pop-up the URL provided when the call is assigned to an Agent (that means it will auto pop-up even if the agent does not pick-up the call).
Info |
---|
Info |
---|
In the Sangoma IVR Builder, variables could be part of the values provided and are represented with the variable name inside double curly brackets {{the_variable}}.
Info |
---|
Note: The name is case sensitive. In execution time the variable will be substituted by the value that it holds. |
Sangoma IVR Builder also has some system variables, such as {{caller_id_number}}. This variable contains the phone number of the caller. More information about Sangoma IVR builder is available in the Sangoma KB. Links provided in the next section of this document
If you want to know more about JSON, please visit https://en.wikipedia.org/wiki/JSON
Sangoma IVR Builder
Invoking the API
To invoke the save_call_info API in a Sangoma IVR Builder Call Flow, you need to use the HTTP Component.
This component has the following fields that need to be configured:
Variable Name:
In this object you need to provide a variable name that will collect the result of the API Call even if you do not want to present the contents of that variable.
URL:
In this field you need to provide the URL of the API, in this case it is: https://tenant_URL/api/freeswitch/save_call_info/{{variable_call_uuid}}
You will need to change the tenant_URL to the URL of your tenant. The tenant name is the full string of the Sangoma CX URL till the first /
You will need to provide the system variable {{variable_call_uuid}}. This API requires the unique identifier of the call that will be attaching data to and this variable contains that information.
Method: select POST
Authentication: select No Auth
You do not need any Authentification because the API trusts the IVR which is part of the platform and your tenant.
Data: select JSON
In the multiline text box you need to provide the JSON payload that details the data that will be attached to the call and the actions if applicable.
Verify SSL: False
If you need more information about Sangoma IVR builder and how to design and publish Call flows, please review the following documentation available in our knowledgebase:
Page Properties | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
The Product owner can be found here https://sangoma.atlassian.net/wiki/spaces/PMGMT/overview.
|