Rules

Rules enable you to automate simple tasks with if-then logic within a service.

Rules evaluate conditions, validate user inputs, and route the incoming messages to various communication channels. The rules also focus on decision making. A rule can either be a business rule or a set of sequential tasks with simple if-then logic.

You can configure rules on event triggers and associate them with various actions like sending a message or notifying a bot/HTTP service. A single rule is capable of supporting multiple actions.

You can also send extra parameters while configuring SMS requests.

Triggers

A trigger automatically launches a flow when a defined event occurs. Triggers are set up to automate tasks using actionable events. Triggers enable you to automate complex business processes, eliminating the need to manually run the flow every time.

You can configure any of the trigger categories for a service. A rule is triggered when events of the configured category meet the condition(s) defined within the rule.

  1. Select Trigger Category.
  2. Select the trigger event and add conditions.
  3. Set Conditions (optional).
    a. Choose an event parameter.
    b. Select a condition.
    c. Define a value.

You can build a condition using AND or OR logical operators. When you add AND to a condition, the whole expression must evaluate to true to qualify the condition. When you use OR in a statement, the statement is executed if any one of the conditions evaluates to true.

1012

Rule Triggers

Channels and Trigger Events

Each communication channel has a set of pre-defined events that can trigger a flow.

ChannelPossible Events
SMS Mobile Originated - MO
On Link Click
MMS* Mobile Originated - MO
RCS Incoming Attachment
Incoming Message
Location Response
Postback
Voice Inbound Call
Missed Call
Instagram Incoming Message
Postback
* Message Deleted
Email Incoming Message
Subscribe
* Unsubscribe
Mobile & Web App
(i.e., Push, Live Chat and In-App Messaging)
Custom Event
Geo Enter (Deprecated)
Geo Leave (Deprecated)
Incoming Message
Location Change_
Typing Indicator
Apple Messages for Business Conversation Closed
Incoming Message
Interactive Message
Typing Indicator
Messenger Incoming Message
On Link Click
* Postback
WhatsApp* Incoming Message
Enterprise Chat and Email (Deprecated)* Incoming Message

📘

Note

If +E.164 format is enabled for your tenant - all the numbers in the Destination field should follow the "+E.164" format.

This format displays the number with a "+" followed by the country code and the phone number.

+E.164 format is not applicable to the numbers in the Sender field.

This applies to the following channels: SMS, Voice, RCS, and WhatsApp

Integrations and Trigger Events

Every integration in⁣ Webex Connect has a different set of trigger events for a flow.

IntegrationPossible Events
CCSP (Deprecated) Agent Chat Initiated
Chat Closed
Chat Idle
Chat Opened
Chat Picked
Chat Reopened
Chat Transferred
Custom Event
* Incoming Message
Skype for Business (Deprecated)* Incoming Message From Skype
BOT (Deprecated) Custom Event
Handover
Milestone Reached
Notify
* Unhandled Message

Custom Trigger Events

CustomPossible Events
WebhookList of existing events
Custom EventList of existing events

Actions

You can select more than one action for an event. All actions are executed with equal priority when an event occurs.

Actions for a rule can be sending a message on any of the channels, notifying an external URL, or initiating a workflow. For sending an outbound message, you can either enter the message or use one of the existing templates while configuring the rule. Notifying URL can be entered directly on the UI and the flow to be triggered can be selected from the drop-down list. You can add multiple actions within a single rule.

The list of actions that can be associated with a rule is:

  • Send SMS
  • Send MMS
  • Send RCS Message
  • Initiate Voice Call
  • Send Push Notification
  • Live Chat/In-App Messaging
  • Send Messenger Message
  • Send WhatsApp Message
  • Notify URL
  • Invoke a Flow
  • Forward to Bot
  • Forward to BOT+CCSP
  • Forward to CCSP (Deprecated)
  • Skype For Business (Deprecated)

Notify URL

You can choose to notify a URL with the delivery report for your preferred channel. This field accepts only a valid URL or a variable. If an invalid URL is passed in an API request or via a variable, then such a request will not be considered eligible for retries.

Validations for Notify URL:

  • It is an optional field for all the channels. Send node can be executed without including these values.
  • The notify URL should be updated with the proper URL format. The system returns the error message when the Notify URL field is not updated correctly as ‘Invalid URL: field accepts only valid URL or variable.’
  • When you provide a space in front of the URL, the system displays the 'Invalid URL: field accepts only valid URLs or variables' error message.
  • When you provide space at the end of the URL, the system trims and ignores the space, and the URL receives DRs.
  • There is no maximum length validation defined.
  • Variables can be added to this field.

📘

Note

It is recommended to use a valid authorization ID; the failure of notification won’t be logged in Debug Logs.

Adding Actions to Rules

To add an action in rule, follow the procedure below:

  1. Select the required channel from Select Actions.
Screenshot of Adding Actions to Rules

Add New Rule

  1. Select the Event and required number from MMS drop-down.
Screenshot of Select Event and Conditions while adding a new rule

Select Event and Conditions

  1. Click Next.
  2. Enter the required details in the Enter Action Details page.
Screenshot of Enter Action Details to an event.

Enter Action Details

  1. The Confirm page is displayed. Enter the required details.
Screenshot of Add Details to schedule rule.

Add Details

  • Name: Enter the name for the event rule.
  • Start Date: Select the date on which you want the rule to be start.
  • Start Time: Select the time on which you want the rule to start.
  • End Date: Select the date on which you want the rule to be end.
  • End Time: Select the time on which you want the rule to stop.
  • Set a status for your rule: Select the required status Active/Inactive.
  • URL: Enter the URL to be notified when the rule is successfully executed.

📘

Note

You can add multiple actions.

  1. Click Complete and save rule.

Adding Actions to Rules for WhatsApp

To enable Notify URL Signature and Authorization, add an action in the rule and follow the procedure below:

  1. Select the required channel from Select Actions.

    Secreenshot of Select Action on Rules page.

    Select Actions

  2. Select the Event and required app from the WhatsApp drop-down.

    Select Event And Add Conditions

    Select Event And Add Conditions

  3. Click Next.

  4. Enter the required details in the Enter Action Details page.

    Screenshot for Enter Action Details - Notify URL

    Enter Action Details - Notify URL

  5. Select the Enable Notify URL Authorization checkbox and provide the associated details.

    Screenshot of Notify URL Authentication on Rule page.

    Enter Notify URL Authentication

  6. The Confirm page is displayed. Enter the required details.

    Add a New Rule

    Add New Rule

  7. Click Complete and save rule.