Workflows

Workflow

A workflow is your central hub for managing messages to subscribers. Here, you unify different communication channels under one entity, simplifying the coordination of your multi-channel messaging.

Global workflow metadata

This will contain general information regarding the workflow itself. Let's explore the different aspects of it.

Workflow name

The name you give to a workflow helps recognize it when you want to activate it. After creating the workflow, a simplified version of its name, called a "Trigger ID," is created. For instance, if you name a workflow "Test Notification," its Trigger ID, will be "test-notification."

Workflow Category

To efficiently organize your workflows, you can designate a category for them after creating it in the workflow settings. This allows you to create multiple workflows under a single category for seamless organization.

Workflow status

For simple management and ease of use, you can conveniently switch a workflow's active status on or off directly from the workflow settings.

Create workflow

Here, you can initiate the creation of a new flow, which will guide you to the flow builder space.

Flow builder space

Here, you'll find the heart of your communication strategy. You can build your flow using integrated channels and apply various actions to suit your specific requirements.

Exploring Trigger Options

  • You have the flexibility to test triggers by using the "Run a Test" button, simulating as if you sent it from your API.
  • Alternatively, you can implement triggers by copying and pasting code snippets from the "Get snippet" button directly into your application's codebase.

Building Your Flow

• Begin building your flow by simply dragging and dropping specific channels.
• Alternatively, add channels directly from the "plus" button to construct your flow node by node, tailored to your specific requirements.
• Deleting nodes or channels is made easy—you can remove them directly from the node or channel framework.

Node Naming

• Enhance clarity by giving each node a descriptive name, specifying its function. For example, you can name a node as "send SMS for transaction alert."

Content Creation

• Effortlessly compose content for each channel, tailoring it to the content type supported by each channel.

Message Content

• Create tailored content for each channel with ease, adapting it to the unique content type supported by each channel:

  • SMS Content: Compose SMS messages directly within the workflow builder using a dedicated text box.
  • Voice Content: Easily create Text-to-Speech (TTS) messages within the workflow builder.
  • WhatsApp Content: Craft text messages or select templates right from the workflow builder interface.
  • Email Content: Effortlessly compose emails, including customizable subject lines, sender names, clickable buttons to specific URLs, and customizable Preheaders. Preview your email in both web and mobile formats before sending.
  • Custom Variables: Utilize {{handlebars}} syntax to incorporate custom variables for personalized messages on each channel.

Trigger

After a workflow is created, a trigger key will be automatically generated for it.

Digest

Digest Action

The digest action collects multiple trigger events, aggregates them into a single message, and delivers it to the subscriber. This becomes useful when a user needs to be notified of many activities and you don't want to send notifications for each activity.

Digest Node

After adding a digest node in the flow builder space, each node that will be below the digest node will be only triggered once in the specified digest interval.

For example, if we have two nodes (Email and SMS) after the digest node and one node (WhatsApp) before the digest node in the workflow. For this workflow, if we trigger 10 events within the digest interval, the WhatsApp step will be executed 10 times, and email and SMS will be executed only 1 time with digested events data.

Digest Key

By default, Omni-Link digests events based on the subscriberId. Users can utilize a single custom key or a group of custom keys. Multiple keys can be specified as comma-separated values. When custom keys are used, Omni-Link Studio will digest events based on a combination of the subscriberId and all specified custom keys.
Digest Types

Regular Digest

Regular Digest digests events for specified time interval. After the time interval is complete, the digest node forwards digested events to the next node.

Scheduled Digest

It digests events at specified intervals. For example, events are digested within a defined time interval, and once that interval elapses, the workflow proceeds to the next step. This process repeats at regular intervals.

Writing digest templates

As part of the digested template, you will have access to these properties:

PropertyDescription
step.eventsAn array of all the events aggregated under this digest. This will be the "payload" object passed to each (trigger.event) sent in the digest period.
step.total_countThe number of total events in this digest.
step.digestA (boolean) flag to indicate if we are in a digest mode right now.

Let's look at a handlebars syntax example for the following triggers:

curl --location 'https://example.com/v1/events/trigger' \
--header 'Authorization: ApiKey <API KEY FROM SETTINGS PAGE>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "workflow-name",
    to: "123",
    "payload": {
        "name": "Hello",
    }
}'

curl --location 'https://example.com/v1/events/trigger' \
--header 'Authorization: ApiKey <API KEY FROM SETTINGS PAGE>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "workflow-name",
    to: "123",
    "payload": {
        "name": "World",
    }
}'

After these two triggers, digest variables are as follows:

PropertyDescription
step.events[ { "name" : "Hello" }, { "name": "World" } ][ { "name" : "Hello" }, { "name": "World" } ]
step.total_count2
step.digestue

Using the following template:

Total events in digest: {{step.total_count}}

{{#if step.digest}}
  {{#each step.events}}
    <div>This is {{name}} payload event</div>
  {{/each}}
{{else}}
  Not a digested template
{{/if}}

It will render as:

Total events in digest: 2 This is Hello payload event This is World payload event.

Delay

Delay Action

The delay action awaits a specified amount of time before moving on to trigger the following steps of the workflow.

Delay Node

After adding a delay node in the flow builder space, the immediate next step will only be triggered after the specified period of time has elapsed.

Delay Types

Regular Delay

Regular Delay will determine how long it will take before triggering the next step.You can specify the amount and time interval unit that best suits your needs.

Scheduled Delay

Scheduled Delay allows delaying up to a future date before continuation of steps execution. All steps after delay node will be triggered only after said date.
Note: Date must be in ISO date format of YYYY-MM-DDThh:mm:ss.SSSZ

Step Filter

Workflow step filtering lets you tailor notification flow by setting criteria for delivery. Use this filter to send only relevant notifications, enhancing communication efficiency.

Types of filter

  • Payload: You can specify a list of keywords or values that the payload field must match for the notification to be delivered.
  • Subscriber: You can filter which subscriber should receive notifications based on subscriber information.
  • Webhook: You can use this feature to provide information about subscribers from specified webhook response and use that information to filter the notification flow.

Steps to set filter

  • Add a node on which you need to apply a filter.
  • Add a filter to the node to specify the criteria that must be met for the notification to be delivered.
  • You can easily add one filter or multiple filters, you will need to choose a logical condition between AND and OR. This will determine how the filters are applied to the notification.
  • Click on Create Rule to specify the criteria that must be met for the notification to be delivered. You can use the payload, subscriber, or webhook field as the basis for your rule.

Filter elements

  • On field : This specifies which field the rule should be applied to, such as Payload, Subscriber, or Webhook response.
  • Key field : This specifies the object key that the rule should be applied to. For example, if the On field is Subscriber, the Key field might be name, email etc.
  • Operator field : This specifies the comparison operator to use when evaluating the rule. Options include Equal, Not equal , Larger , Smaller , Larger or equal, Smaller or equal , Contains, Not contains and Is Defined.
  • Value field : This specifies the value to compare to the object key value using the selected operator.

Filtering with Webhook

To filter notifications based on a webhook response, you will need to create a webhook that accepts POST requests and returns a one-level object. The webhook should be set up to receive object the following parameters:

  • subscriber - This is an object containing information about the subscriber that the notification is being sent to.
  • payload - This is an object containing the payload of the trigger that initiated the notification.
  • identifier - workflow identifier is a unique identifier for the notification template being used.
  • providerId - provider identifier is a unique identifier for the communication provider you used on this notification.
  • channel - The channel identifier specifies the type of notification channel that was used to send the notification.

Previous step filter

A powerful workflow automation tool that enables you to seamlessly respond to channel status outcomes from any previous workflow steps. You can set specific conditions based on these outcomes to trigger the next step, ensuring your notifications are sent in an effective way.

To configure the Previous Step Filter, follow these steps:

  1. Inside the channel node, locate and click on the "Filter" button.
  2. Click the "Create Rule" button.
  3. From the list of filter types, select "Previous Step."
  4. Choose the specific previous channel node you want to monitor for conditions.
  5. Specify the status you want to act upon from the dropdown list.

Filter Status in Activity Feed

  • Select the workflow to check the filter status for.
  • A new popup window titled "Execution Details" will appear.
  • Within this popup, locate and click on the workflow step row to open the details for the corresponding step.
  • On this screen, you can monitor channel status along with filter details if any.