Simple JSON
This node type provides simple JSON-encode capabilities. It will create a JSON string that contains a single object with multiple name/value pairs.
This node type provides simple JSON-encode capabilities. It will create a JSON string that contains a single object with multiple name/value pairs.
Note: The JSON string formed by this node might typically be provided as the Body parameter to a subsequent REST Query or Prepare REST Request node. See REST Query or Prepare REST Request.
Instead of providing a value directly in the node parameter for a particular name/value pair, a number of placeholders may be specified instead. Where the resulting JSON string is used in a subsequent REST request node (see above), the system replaces these placeholders with the appropriate values when the REST request is sent.
The following parameters can be set:
Parameter | How many? | Type | Description |
JSON Output String | 1 | String | The variable in which to store the resulting JSON string. |
Integers | 0 to 20 | ||
Name | String | The name for this name/value pair. This parameter can be set to User-configurable. | |
Value | Integer | The value for the name/value pair. This parameter can be set to User-configurable. | |
Strings | 0 to 20 | ||
Name | String | The name for this name/value pair. This parameter can be set to User-configurable. | |
Value | String | The value for the name/value pair. This parameter can be set to User-configurable. | |
Booleans | 0 to 20 | ||
Name | String | The name for this name/value pair. This parameter can be set to User-configurable. | |
Value | Boolean | The value for the name/value pair. This parameter can be set to User-configurable. | |
Placeholders | 0 to 20 | ||
Name | String | The name for this name/value pair. This parameter can be set to User-configurable. | |
Value | Enum | The placeholder to set as the value for this name/value pair. One of: Time, Event, Agent Username or Queue Name. These will be replaced as follows: Agent External ID – replaced with the External ID value as configured for an agent’s user account, in the Administrator Portal Agent Username – replaced with the username of the agent who is being called Event – replaced with one of the following strings: AGENT_RINGING, AGENT_ANSWERED, TRANSFER_RINGING, or TRANSFER_ANSWERED Queue Name – replaced with the name of the queue on which the current call resides or, in the case of an attended queue consult/transfer, the name of the target queue Time – replaced with a string in ISO 8601 compatible format. |
The following branch can be taken:
Branch | How many? | Description |
Success | 1 | This branch is always taken. |
REST Query
This node type is used to send an arbitrary HTTP request to an external HTTP server. It might be used, for example, to retrieve details from an external CRM system or to inform an external system that a call has arrived.
This node type is used to send an arbitrary HTTP request to an external HTTP server. It might be used, for example, to retrieve details from an external CRM system or to inform an external system that a call has arrived.
This node allows, for example, external systems to be notified of or passed information pertaining to Contact calls, such as individual customer interactions, statistics, etc. for monitoring, configuration and data-analysis purposes.
If the Replace Placeholders parameter is set to true, the system will replace any placeholders found in the body text with the appropriate values when the request is sent. Supported placeholders are: ##agentExternalId##, ##agentUsername##, ##event##, ##queueName## and ##time##. For convenience, a Simple JSON node can be used to construct a JSON string that includes these placeholders as values. These placeholders will be replaced as follows:
- ##agentExternalId## – replaced with the External ID value as configured for an agent’s user account, in the Administrator Portal.
- ##agentUsername## – replaced with the username of the agent who is being called
- ##event## – replaced with one of the following strings: AGENT_RINGING, AGENT_ANSWERED, TRANSFER_RINGING, or TRANSFER_ANSWERED
- ##queueName## – replaced with the name of the queue on which the current call resides or, in the case of an attended queue consult/transfer, the name of the target queue
- ##time## – replaced with a string in ISO 8601 compatible format.
If required, you can modify the header when sending a HTTP request (for example, for authentication purposes) and add additional headers. If the response to the REST request contains a JSON body, the node type allows for specified parts of that data to be read out into provided variables.
Note: Unlike the Prepare REST Request node, this node type sends the HTTP request immediately.
Note: If required, some of the parameters for this node type can be set to User-configurable so that they can accept values specified by a company administrator. For more information, see Adding user-configurable values.
The following parameters can be set:
Parameter | How many? | Type | Description | |
URL | 1 | String | The URL for this HTTP request.This parameter can be set to User-configurable. | |
Body | 1 | String | The body of the outbound HTTP request.This parameter can be set to User-configurable. | |
Content Type | 1 | Enum | One of: JSON, TEXT/PLAIN or TEXT/HTML. | |
Replace Placeholders | 0 or 1 | Boolean | Whether or not placeholder tags are replaced in the body of the HTTP request at the point when the HTTP request is sent. The placeholders are defined above. This parameter can be set to User-configurable. | |
Method | 1 | Enum | The HTTP method to use for the request. One of: POST, GET, DELETE or PUT. Note: If the HTTP method is set to GET, the Body parameter is omitted. | |
Request Headers | 0 to 50 | Optional headers for the HTTP request. | ||
Name | 0 or 1 | String | The name of the header in the HTTP request. This parameter can be set to User-configurable. | |
Value | 0 or 1 | String | The value to assign to the header. This parameter can be set to User-configurable. | |
Response Data | Optional values for different parameter types that can be set from a JSON response body. If the HTTP response contains a JSON body, these optional parameters allow parts of that JSON data to be read into the provided variables. | |||
Integer Parameters | 0 to 50 | |||
Variable | 0 or 1 | Integer | The variable into which to place the read value. | |
Path | 0 or 1 | String | The path of the value to read. See the example below.This parameter can be set to User-configurable. | |
Default | 0 or 1 | Integer | The value to write to the variable if no value is found at the given path. This parameter can be set to User-configurable. | |
Float Parameters | 0 to 50 | |||
Variable | 0 or 1 | Float | The variable into which to place the read value. | |
Path | 0 or 1 | String | The path of the value to read. See the example below. This parameter can be set to User-configurable. | |
Default | 0 or 1 | Float | The value to write to the variable if no value is found at the given path. This parameter can be set to User-configurable. | |
String Parameters | 0 to 50 | |||
Variable | 0 or 1 | String | The variable into which to place the read value. | |
Path | 0 or 1 | String | The path of the value to read. See the example below. This parameter can be set to User-configurable. | |
Default | 0 or 1 | String | The value to write to the variable if no value is found at the given path.This parameter can be set to User-configurable. | |
Boolean Parameters | 0 to 50 | |||
Variable | 0 or 1 | Boolean | The variable into which to place the read value. | |
Path | 0 or 1 | String | The path of the value to read. See the example below. This parameter can be set to User-configurable. | |
Default | 0 or 1 | Boolean | The value to write to the variable if no value is found at the given path. This parameter can be set to User-configurable. |
Note: If the external HTTP server does not return a value or if the type of returned value is incompatible with the call-flow variable type, (for example, the server returns the string “hello” in the response body in a Path that is assigned to a Boolean parameter, the Default parameter value is used and the Next branch is taken.
The following branches can be taken:
Branch | How many? | Description |
Next | 1 | The branch to take if the HTTP request succeeds. |
Failed | 1 | The branch to take if the HTTP request fails. Failure is indicated by any response code in the range 400 to 599. |
Example usage of the JSON path #
An HTTP REST request is sent to an external HTTP server, which returns the following JSON:
{ "result": { "success": true, "details": { "code": 100, "message": "Success" } }, "data": [ { "name": "Alice", "age": 27 }, { "name": "Bob", "age": 47 } ] }
Given the above data, the following paths would result in the following values being written to the provided variable:
Path | Type | Value |
result.success | Boolean | true |
result.details.message | String | Success |
data.0.name | String | Alice |
Data.1.age | Integer | 47 |
This data is then passed to a Compare String node, which directs the call as appropriate.
Prepare REST Request
This node type is used to prepare an arbitrary HTTP request to be sent to an external platform. Any prepared requests will be sent when the specified agent-related events occur.
This node type is used to prepare an arbitrary HTTP request to be sent to an external platform. Any prepared requests will be sent when the specified agent-related events occur.
The HTTP request is only sent when triggered by a specific event, such as when an agent is being alerted to an incoming call or when they answer a call. Multiple REST queries can be prepared for the same event.
This node allows, for example, external systems to be notified of or passed information pertaining to Contact calls, such as individual customer interactions, statistics, etc. for monitoring, configuration and data-analysis purposes.
If the Replace Placeholders parameter is set to true, the system will replace any placeholders found in the body text with the appropriate values when the request is sent. Supported placeholders are: ##agentExternalId##, ##agentUsername##, ##event##, ##queueName## and ##time##. For convenience, a Simple JSON node can be used to construct a JSON string that includes these placeholders as values. These placeholders will be replaced as follows:
- ##agentExternalId## – replaced with the External ID value as configured for an agent’s user account, in the Administrator Portal.
- ##agentUsername## – replaced with the username of the agent who is being called
- ##event## – replaced with one of the following strings: AGENT_RINGING, AGENT_ANSWERED, TRANSFER_RINGING, or TRANSFER_ANSWERED
- ##queueName## – replaced with the name of the queue on which the current call resides or, in the case of an attended queue consult/transfer, the name of the target queue
- ##time## – replaced with a string in ISO 8601 compatible format.
If required, you can modify the header when sending a HTTP request (for example, for authentication purposes) and add additional headers.
Note: Unlike the REST Query node, this node type does not send the HTTP request immediately, but instead stores the request details so that the request can be sent when a particular event (or a set of events) occurs.
Note: If required, some of the parameters for this node type can be set to User-configurable so that they can accept values specified by a company administrator. For more information, see Adding user-configurable values.
Note: Only the ports below can be used to setup the node:
- 80 (http)
- 443 (https)
- 25 (smtp)
- 465 (smtps)
- 587 (smtp)
- 110 (pop)
- 995 (pops)
- 143 (imap)
- 993 (imaps)
The following parameters can be set:
Parameter | How many? | Type | Description |
Events | 0 to 4 | Enum | When this HTTP request should be sent: Agent Ringing – As soon as the agent’s phone starts to ring Agent Answered – As soon as the agent answers a call Transfer Ringing – As soon as the phone starts to ring for a consulted party or one to which a call has been transferred Transfer Answered – As soon as the consulted party or one to which a call has been transferred answers the call |
URL | 1 | String | The URL for this HTTP request. This parameter can be set to User-configurable. |
Body | 1 | String | The body of the outbound HTTP request. This parameter can be set to User-configurable. |
Content Type | 1 | Enum | One of: JSON, TEXT/PLAIN or TEXT/HTML. |
Replace Placeholders | 0 or 1 | Boolean | Whether or not placeholder tags are replaced in the body of the HTTP request at the point when the HTTP request is sent. The placeholders are defined above. This parameter can be set to User-configurable. |
Method | 1 | Enum | The HTTP method to use for the request. One of: POST, GET, DELETE or PUT. Note: If the HTTP method is set to GET, the Body parameter is omitted. |
Request Headers | 0 or 50 | Optional headers for the HTTP request. | |
Name | 0 or 1 | String | The name of the header in the HTTP request. This parameter can be set to User-configurable. |
Value | 0 or 1 | String | The value to assign to the header. This parameter can be set to User-configurable. |
The following branches can be taken:
Branch | How many? | Description |
Next | 1 | The branch to take if the HTTP request succeeds. |
Failed | 1 | The branch to take if the HTTP request fails. Failure is indicated by any response code in the range 400 to 599. |