Jump to: navigation, search

Interceptor Block

GAAP350 Help InterceptorBlock.png

You can use Interceptor blocks to add branching to a callflow. Although not as powerful as a Script block, Interceptor blocks are easier to read and change.

You must set up one or more rules within an Interceptor block in order to branch the callflow. You can also call a web service before applying these rules, which allows you to gather some back-end data mid-call without having to resort to a Script block or separate prebuilt callflow module.

Important

Do not use the Interceptor block for catching hangups. Use the Scripting.EndCallNotification.WebServiceURL option to configure the end-of-call service.

Adding this block to the callflow

To add and configure Interceptor blocks in a callflow:

  1. Drag and drop an Interceptor block onto the appropriate position in the callflow.
  2. Click the Interceptor block to view its properties.
  3. In the Interceptor Rules tab, configure one or more rules to apply to the Interceptor block. The block applies these rules in the order they are listed. To configure a rule:
    1. Select one of the following conditions to check:
      • Variable – Select any variable (including attached data fields).
      • Dialled Number – The number the caller dialled (DNIS).
      • CLI – The number from which the caller has called, if available.
      • Test Call Flag – Check whether this is a test or production call.
      • Recent Failure Flag – Check whether there has been a recent failure in the callflow (for example, a block that exited with recognition failure or error.
      • Random Percentage – Specify a percentage of callers to follow the path you are configuring. For example, you can specify a value of 50 to direct 50 percent of callers down a particular path, to help split the volume of traffic between two phone transfer points.
      • Last Result – Check the result from the last block, typically success, error, or agent.
      • Number of Calls – Specify the number of calls by this CLI today or in the last one, two, or four weeks.
      • Date - Check for a specific date.
      • Time - Check for a specific time.
      • Date and Time - Check for a specific date and time.
      • Current Day of the Week - Check for a specified day of the week.
    2. Apply a rule to the condition. For example, if you selected Random Percentage, you must configure a value or range or values to apply. Or, if you selected Date, you must specify a date.
    3. Specify a path name to follow if the condition is met.
    4. Specify a path name to follow if the condition is not met.
  4. (Optional) Click Add Another Rule to configure another rule, following the same process documented above.
  5. In the Integration tab, you can specify a web service to call before applying the rules in the Interceptor Rules tab. Any variables in the call session, as well as the CLI and call session ID, are passed to the web service. The web service then returns information to Genesys Intelligent Automation to allow it to set variables in the callflow.
    Important
    You can pass URLs as an absolute path (e.g., http://URL/path) or as a session variable (e.g., [var:URLvariable]).

    To specify a web service:

    • Web Service for Test Calls - Enter the URL for the web service to use for test calls.
    • Web Service for Production Calls - Enter the URL for the web service to use for production calls.
    • Web Service Timeout - Enter the number of milliseconds to wait before the call to the web service times out due to a lack of response from the service.
    • Web Service Behavior - If enabled, the Interceptor block ignores any errors returned by the web service.
  6. Click Update.

Example

You can set up an Interceptor block to do a lookup at the beginning of a call based on the CLI (which is automatically passed in), plus any information that has been stored against the CLI from a previous call (for example, a customer account number). You can then use the result to find out how many orders the caller has previously made (using a variable passed back by the web service), and route them to a reward line if they are calling to make their 100th order.

  1. Drag and drop an Interceptor block onto the callflow.
  2. Click the Interceptor block to view its properties.
  3. Open the Integration tab and enter the URL for a Sales Order web service.
  4. Any variables already gathered from the call up are passed into the web service, such as the CLI and customer account number. Therefore, you can open the Interceptor Rules tab and add the following rule:
    GAAP350 Help InterceptorBlockExample.png
  5. Click Update.
  6. The Interceptor block automatically creates the reward and success paths and accompanying Message blocks. Name these blocks Reward and Order line, respectively.
    GAAP350 Help InterceptorBlockExample2.png
  7. Open the reward path Message block.
  8. In the Prompts tab, enter a message according the result of the web service call. For example: Looking at your account, I see that today’s order means you have ordered [number:TotalOrders] times with us. As a reward, you will receive a 50 percent discount on today’s order. Now onto the order menu.
  9. Any calls that do not meet the interceptor rule follow the success path. Open the success path Message block and configure it accordingly.

Sample web service data contract

This section describes the flow of data between an Interceptor block and a customer’s web service. This web service allows a back-end system to look up known information about the current caller.

Depending on the call steps, this information might include:

  • Basic call information - Passed with all web service requests in Intelligent Automation (for example, cli and sessionid).
  • Variables:
    • Captured during the call so far, such as an account number spoken by the caller, or variables set within Script blocks.
    • Information previously stored against the caller’s CLI.

Request

You can make web service requests using HTTP POST, passing any string variables in the call session, plus the cli and sessionid fields.

A typical URL might be:

http://localhost:8080/fish-services/test/GetAccountDetails.jsp

A typical HTTP POST body might be:

cli=02890571100&sessionid=1234%2D3AAF%2D3372&favouriteMenu=Sales

Response

The XML response specifies zero or more variables to be set in the call session.

When specifying variables in the response, you can indicate that you want some or all key-value pairs to be attached to the call via the CTI (where the platform supports it) by doing one of the following:

  • Include an optional attach attribute with a value of true
  • Set as the CLI data by including an optional remember attribute with a value of true.

A typical XML response might be:

<interceptorResults>
       <variables>
              <variable name="AccountNumber" value="12345" attach="true"/>
              <variable name="PIN" value="1234"/>
              <variable name="Segment" value="Gold" attach="true" remember="true"/>
       </variables>
</interceptorResults>

A lookup in which you do not want to set any variables might be:

<interceptorResults/>
Important
Intelligent Automation treats HTTP response codes other than 200 as errors.
This page was last edited on August 10, 2020, at 06:41.
Comments or questions about this documentation? Contact us for support!