Add a New Rule

Procedure


Step 1

In the Management Portal navigation bar, choose New Digital Channels to launch the default console.

Step 2

Choose Groups > Events and Rules.

Step 3

Click Add New Rule on the top-right corner of the screen.

The Configure Rule page appears.
Step 4

Enter the Rule Name.

Step 5

Choose the condition from the Fire When drop-down list. The rules trigger automatically based on a certain preconfigured condition. The list includes the following conditions that are allowed in a Rule:

  • Message arrives: Rule is triggered for an inbound message.

  • Inbound message contains: Rule is triggered when an inbound message contains a configured word. On selection of this condition, a text box is displayed. Enter the word (max 30 characters) in the given text field.

  • Outbound message contains: Rule is triggered when an outbound message contains a configured word. On selection of this condition, a text box is displayed. Enter the word (max 30 characters) in the given text field.

  • Chat is put on hold: Rule is triggered when the chat is put on hold. Select an option, whether to trigger the rule Manually, By API, or By System.

  • Chat off-hold: Rule is triggered when a chat comes out of the on hold status. Select an option, whether to trigger rule Manually, By API, or By System. This rule is currently not supported in Webex Contact Center.

  • Chat is closed: Rule is triggered when the chat is closed. Select an option, whether to trigger rule Manually, By API, or By System. You’ll need to choose By API for this rule to work on your tenant.

  • Chat assigned: Rule is triggered when a chat is assigned to an agent. Select an option, whether to trigger rule Manually or By API or By System. You’ll need to choose By API for this rule to work on your tenant.

  • Chat is flagged: Rule is triggered when the chat is flagged. This rule is currently not supported in Webex Contact Center.

  • Customer not attended: Rule is triggered when the chat is idle for a pre-configured duration. On selection of this condition, a drop-down list with time values such as 5/10/15/20/30/60/90 minutes appears. Select the time duration from the drop-down list.

  • Logout by user: Rule is triggered when the agent logs out of the chat console manually. This rule is currently not supported in Webex Contact Center.

  • Logout by system: Rule is triggered when the agent logs out of the chat console automatically. This rule is currently not supported in Webex Contact Center.

  • Chat is accepted: Rule triggers when the agent accepts a chat.

  • Agent is idle: Rule triggers when the agent is idle (not handling any chat). This rule is currently not supported in Webex Contact Center.

  • Chat created: Rule triggers automatically when a chat is created. A post request can be made (third-party URL), whenever a chat is created. You need to choose By API for this rule to work on your tenant.

  • Chat idle: Rule triggers automatically when a chat is Idle. On selection of this condition, a drop-down list displays time values such as 5/10/15/20/30/60/90 minutes.

  • Chat resume: Rule triggers automatically when a chat resumes.

  • Chat is picked up from queue: Rule triggers automatically when a chat is picked from the queue. This rule is currently not supported in Webex Contact Center.

  • Chat reopened: Rule triggers when a chat is reopened. Select an option, whether to trigger rule Manually or By API or By System. You’ll need to choose By API for this rule to work on your tenant.

  • Message sent: Rule triggers when a message is sent.

Step 6

Choose one of the following methods:

  • Get

  • Put

  • Post

  • Patch

  • Delete

Step 7

Enter the URL in the given field that is called when the event is triggered.

Step 8

Choose the type of response format in the Expected Response Format field as JSON.

You can choose to pass the payload using either Key Value Pair or Custom Payload.

If you select the Key Value Pair radio button, the key value pair settings appear on the screen.

Step 9

Check the Form Encode Request Body checkbox to pass the form encoded parameters in the request body. Otherwise, you can configure the parameters and pass them in the API requests.

Step 10

To add parameters, follow these steps:

  1. Click Add Param.

    The Add Parameter pop-up window appears.
  2. Choose Header/Query Param/Request Body from the Pass Through drop-down list.

  3. Enter the Parameter Name.

  4. Choose the Value from the drop-down list.

  5. Click Add.

Step 11

Choose the Custom Payload radio button to pass the payload in JSON format.

The parameters should prefix with @@ and close in curly {} braces in the data field.

Step 12

Click Save Rule to save the configured rule.

Step 13

You can configure Rules through JavaScript code. To do this, turn on the On/Off JavaScript Rule toggle button on the top-right corner of the Configure Rule page.

Step 14

Click Save Rule.