Skip to content Skip to footer

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.

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:

ParameterHow many?TypeDescription
Events0 to 4EnumWhen 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
URL1StringThe URL for this HTTP request.

This parameter can be set to User-configurable.
Body1StringThe body of the outbound HTTP request.

This parameter can be set to User-configurable.
Content Type1EnumOne of: JSON, TEXT/PLAIN or TEXT/HTML.
Replace Placeholders0 or 1BooleanWhether 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.
Method1EnumThe 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 Headers0 or 50Optional headers for the HTTP request.
Name0 or 1StringThe name of the header in the HTTP request.

This parameter can be set to User-configurable.
Value0 or 1StringThe value to assign to the header.

This parameter can be set to User-configurable.

The following branches can be taken:

BranchHow many?Description
Next1The branch to take if the HTTP request succeeds.
Failed1The branch to take if the HTTP request fails. Failure is indicated by any response code in the range 400 to 599.