Build Flows
Learn about creating automated workflows with triggers and actions in Experience and Workflow Studio.
Complete overview of the Flow Builder
Introduction to Experience and Workflow Studio
Navigate Flows page in Workflow Studio
A Flow is a sequence of nodes that defines an automated workflow. A flow begins with a trigger node, which sets the process in motion based on specific events, and is followed by a series of action nodes that define the subsequent steps. The Flow Builder is the place where you can design your automated flows. You can configure each node individually, build in business logic, and connect to other data sources.
Navigating the Flow Builder interface
The menu bar at the top of the window allows you to add a flow name and flow description. Simply click on the text to edit it inline.
If your flow encounters issues, the menu bar alerts you with an error message indicator. Clicking this provides a breakdown of issues, opening the affected nodes for immediate action.
The Flow builder itself is divided into two sections:
- The toolbar (left): Here you can browse and select different nodes. You can click the arrow in the top right to minimise or maximise the toolbar.
- The canvas (right): Here you can drag and drop nodes and build your flow. The canvas lets you configure, rearrange, and build your flows. You can use the zoom slider in the top right to change the zoom scale, and the undo and redo controls to reverse changes.
At the bottom right, you will find button(s), applicable per the state that your flow is in.
- Save draft and exit
- Save and active
- Activate new version
What is a node?
All Pendula flows are made up of nodes. Nodes are modular and configurable. Each node represents a step in the workflow, and can be a process (sending or receiving data) or an activity (a touchpoint with a customer, like an SMS conversation). When nodes are put together, they create the customer experiences we call flows. Let's take a look at each node type:
Trigger nodes
These start the flow. They are event based (when something happens, start the flow) and are configurable.
Messaging nodes
These nodes facilitate communication through channels such as SMS, email, and social messaging supporting both outbound messages and two-way conversations.
Data nodes
These nodes enable API interactions, allowing for the transmission and receipt of data between the flow and external systems.
Workflow nodes
These nodes manage flow logic, allowing decision making based on predefined conditions and branching into multiple pathways based on distinct criteria.
Anatomy of a node
- Guide Text: Positioned at the top, this text offers quick guidance or instructions specific to the node.
- Node Body: The central part of the node that displays the Node Name and Node Description, which provide identification and details about the node's functionality.
-
Node Actions Panel: Located below the node body, this panel includes several icons for managing the node:
- Settings: Opens the configuration modal for the node.
- Duplicate: Allows copying of the node along with its settings.
- Trash: Offers an option to delete the node, typically prompting a confirmation modal.
- Outcomes: Indicated on the node, these direct the flow's path depending on the node's operation. Standard nodes may show a connector tab instead.
- Drop zones: Highlighted areas on the canvas where nodes can be placed. These zones pulse to indicate where a node can be dropped.
- Exit Node: Marks the path where the experience ends , guiding to subsequent steps or endings in the workflow.
Configuring nodes
Either click the settings icon (the cog) that appears on hovering over a node, or double-click the node itself to view and configure the settings. Different nodes have different configuration options.
Node settings are divided into two sections:
- The details pane (left): Here you can edit the name, description and guide text. These details are available on every node.
- The configuration pane (right): Here, you can adjust the node-specific settings, which vary depending on the type of node you are configuring.
Node names, descriptions and guide text don't affect anything to do with configuration.
Node management
-
- Find the toolbar on the left of the Flow Builder. This section houses all available nodes.
- Use the search bar to find nodes by their name or description. The toolbar will dynamically filter to show nodes that match your search criteria.
- Browse through categories to find the node you need
-
All flows need a trigger node to start the flow.- Click and drag a node from the toolbar onto the canvas. The drop zones will pulse where you can drop that particular type of node.
- The node settings will open automatically after placing the node.
- Once configured, click Save to save your settings.
Remember, changes made on the Canvas are only saved when you click Save Draft or Save and Activate at the bottom of the page. Simply adjusting node settings does not automatically save the flow.
Nodes with multiple outcomes, such as the conversation node, will show helper paths on the canvas.
-
- Click and drag another node from the toolbar onto the canvas.
- The drop zones will pulse where you can drop that particular type of node.
-
- Hover your mouse over the node you wish to delete.
- Click on the bin icon that appears beneath it.
-
- Hover your mouse over the node you wish to duplicate.
- Click on the copy icon that appears beneath it. Note that this is not supported on all nodes. If the icon is not visible, the node cannot be copied.
The copied node will have "(Copy)" appended to the end of its name, and it will appear before the original node.
-
- To connect nodes and establish paths, drag from an outcome or the helper attached to the node if no outcomes are present.
- Drag the connector to the desired node, and release to create a new path.
You cannot remove a joined node path and orphan the child node; to remove a path you must delete the child node.
-
- Click and hold on a node to 'pick' it up. You'll notice you're now dragging an icon of the node.
- Drop zones will pulsate indicating where you can place the node. Drag, and drop on top of a helper zone to place it.
-
- In addition to the drop zones that appear when moving a node, you'll notice that other nodes on the canvas will pulsate in the same way. This means you can swap places with them!
- When you drag on top of one of these nodes, you'll notice two options, Swap and Replace. When hovering over the Swap side of the node, you'll notice it becomes highlighted. Simply drop the node here to swap them.
Ensure your merge fields are still valid by checking the merge field data explorer on the newly swapped nodes.
-
- Drag a node on to the Replace side of the node, and drop the dragged node.
- You will be prompted to confirm that you wish to replace the node configuration on the canvas with the one you're replacing it with.
Ensure your merge fields are still available by checking the merge field data explorer on the newly swapped nodes.
-
Errors within nodes can be detected through two primary indicators:
Within the Node
If a node encounters an error, a message statingThis node has some errors
will prominently display within the nodule's interface. This alert serves as a direct indication that the particular node requires your attention for troubleshooting.
Global Error View on Menu Bar
Additionally, the Flow Builder provides a holistic view of errors across all nodes in a flow via the menu bar. If errors are present, an alert will list them collectively. Each error message is designed to guide you to the problem area within the node.
For a detailed guide on understanding errors in Pendula, see Flow errors.
Working with Triggers in Workflow Studio
Introduction to Experience and Workflow Studio
Complete overview of the Flow Builder
A Flow is a sequence of nodes designed to execute an automated workflow.
An Experience is a unique journey of an individual recipient through a flow. Experiences are personalised paths shaped by the recipient's specific interactions and responses as they navigate through the nodes of a flow. This ensures that each recipient's engagement is tailored to their actions.
A Trigger is a type of node, defining the conditions that will trigger experiences for the flow. Triggers respond to defined events, such as receiving an inbound message or detecting a change in a CRM system, thereby activating the flow and commencing the sequence of actions.
Event-based triggers
These triggers await events such as incoming messages or system updates.
Inbound Message Trigger
Initiates a flow when a specific SMS message is received. It is configured to recognise predefined keywords or phrases within the text message, facilitating instantaneous engagement with customers.
For a detailed guide, see Inbound Message Trigger Node
Unmatched Message Trigger
Ensures that messages which do not match any active flows, are not lost. This trigger catches and handles all inbound messages that haven't been matched by other active triggers or conversation actions, maintaining a comprehensive customer communication loop.
For a detailed guide, see Unmatched Message Trigger
Webhook Trigger
Listens for data payloads sent from external systems to a specified URL. This trigger is essential for creating responsive workflows that integrate with a variety of external applications or services.
For a detailed guide, see Webhook Trigger
Amazon Kinesis Trigger
Starts a flow based on data received from an Amazon Kinesis stream. Amazon Kinesis is a scalable service from AWS that enables real-time processing of streaming large-scale data, which can be anything from log files to market data. When new data is detected in the stream specified for the trigger, it sets the flow into motion within Pendula.
For a detailed guide, see Amazon Kinesis Trigger
Advanced Integration
Pendula goes beyond basic integrations with a comprehensive Integrations Hub. For scenarios where an out-of-the-box integration is not available, the Studio allows Pendula users to create one-off custom integrations including systems like Salesforce, Hubspot, Zendesk and more.
For access to this feature, please reach out to our sales team who can provide more details and assist with enabling it for your account.
Setting up an event-based trigger
- Begin by selecting the most suitable event-based trigger within the Flow Builder. Depending on your flow's requirements, you might opt for the Inbound SMS Trigger, Webhook Trigger, or Unmatched Message Trigger.
- Define the specific conditions that will activate your trigger.
- For the Inbound SMS Trigger, specify the exact words or phrases within the SMS body that should initiate the flow. This involves creating rules or recipes that can identify specific keywords, phrases, or formatted text such as email addresses or mobile numbers within an incoming message. Each path in the trigger can include multiple rules or recipes. When a reply matches more than one rule, the highest priority path is triggered first. This functionality ensures that every matching inbound message correctly initiates the intended workflow.
- For the Webhook Trigger, the setup involves configuring the external system to interact with Pendula. This includes supplying the "POST URL" from Pendula, which is crucial for establishing a connection between the external application and the Pendula flow. Additionally, secure this connection by integrating the API key for authentication. While defining the exact JSON payload structure is optional, ensuring these elements are correctly configured is essential for triggering the workflow based on real-time data received from external applications.
- The Unmatched Message Trigger acts as a catch-all for messages that do not match other triggers, so no explicit conditions are required for it.
- Once you have defined the conditions, integrate your trigger with the subsequent steps in your flow. Each trigger should be connected to appropriate actions to ensure a cohesive and responsive experience.
All flows require a trigger node. You cannot have more than one trigger node.
You can replace a trigger node but you can’t duplicate or move one.
Deleting the trigger node will delete all nodes in the flow.
Working with Actions in Workflow Studio
Introduction to Experience and Workflow Studio
Complete overview of the Flow Builder
Actions are nodesInsert Definition Here that execute the subsequent steps after a triggersInsert Definition Here. These are nodes that execute subsequent steps, guiding the customer through a journey or handling data processes. Actions in the Flow Builder can be broadly categorised into messaging, data, and workflow nodes.
Messaging nodes
These nodes are responsible for sending communications to recipients. Each messaging node can be configured to send a specific message and, where applicable, respond based on customer interactions.
Outbound SMS
Sends a single SMS to a designated recipient. The node offers two outcome paths based on message delivery status—sent and not sent. Handle fallbacks and failures by tailoring experiences based on these outcomes.
Conversation
Handles two-way SMS interactions, enabling conversations that can adapt based on customer responses. Pendula’s industry-leading intent matching capability provides the user the ability to listen for any customer reply based on flexible rules, ranging from simple keywords to complex pre-built logic.
Outbound Email
Sends emails, which can be personalised and scheduled as part of the flow. Emails can be either built from scratch using email design pane or from importing HTML code.
Data nodes
Data nodes handle the flow's interactions with external data sources. This includes sending data to and receiving data from external APIs, allowing the flow to integrate seamlessly with other systems. These nodes are crucial for workflows that rely on dynamic data exchange.
Make a web request
Interacts with external services and APIs, allowing the flow to send data to or receive data from outside sources. It can be used to update a CRM record, log an event, or enrich the experience with external data.
Read more about integration-specific data nodes in the Integrations Hub.
Workflow nodes
Workflow nodes introduce logic and decision-making capabilities into the flow. These nodes ensure that the flow adapts and responds to varying inputs and scenarios.
Criteria Filter
Filters customers or data points based on predefined criteria, ensuring that only the relevant individuals or data proceed to the next step.
Criteria Split
Diverges the flow into different paths, each tailored to a specific customer segment or scenario.
Reporting Point
Marks a specific point in the workflow for reporting purposes, allowing for the collection of data on the flow’s performance.
Setting up an action
- Choose the appropriate action node from the Flow BuilderInsert Definition Here based on what needs to be accomplished in the subsequent steps following a trigger.
- Configure the node with the necessary details, whether it’s crafting a message template, defining API request parameters, setting criteria for filtering or splitting, or establishing timing for delays or reporting.
- Use any subsequent nodes to ensure a seamless flow of the automated workflow.
Action nodes execute in a predefined sequence, as determined during in the flow. This sequential execution allows for complex workflows that can adapt based on dynamic inputs and conditions. Action nodes offer the capability to integrate with various systems and services, enhancing the flow's utility and adaptability.
Working with Merge Fields in Workflow Studio
Complete overview of the Flow Builder
Merge fields are a powerful tool to personalise your communications and customer journeys, using either the customer data from your systems of record, from external systems (weather services, traffic services etc.) or from the outputs of a node (for example, the recipient’s mobile number from the Inbound message trigger node). In this article, you’ll learn about merge fields and ways you can use them to personalise messages and customer journeys.
What are merge fields?
Merge fields are dynamic values that are replaced with the recipient-specific value when a flow goes live. The recipient-specific value is determined by the data brought into the flow. A merge field can be identified through its bold appearance, like this: firstName.
For instance, to personalise a message using the customer's first name, your message could use the merge field: firstName. When a flow is live, the merge field references all the data stored against the corresponding firstName field in your systems, which is retrieved by a prior node in your flow. The recipient would receive a message with the merge field replaced with their name:
Using merge fields in flows
You can view merge fields available to reference via the merge field pop up, or through the data explorer in the merge field tab. You can either search, or traverse prior nodes to find the merge field you want to reference. Once found, simply click to either insert (in the merge field pop up) or copy to clipboard (in the merge field tab).
Important considerations when viewing available merge fields:
Each node will only display merge fields generated by previous nodes along the same branch. You cannot reference merge fields from a node on a separate branch.
You can only select merge fields from nodes if they have outputs and are on the 'common path' on the current node.
Merge field pop up
The merge field pop up is a handy way to search and insert merge fields straight into an input field. It also easily lets you know whether you can use a merge field in that particular field.
How to use the merge field pop up
- Click the merge field button. A search bar will appear.
- Type a value in the search bar. The value will only be searched against the path of the merge field itself, not the description nor example.
- Click the merge field you want to use to insert it, and voilà!
Merge field tab: Quick search
The merge field pop up is a handy way to search and insert merge fields straight into an input field. It also easily lets you know whether you can use a merge field in that particular field.
How to use the search bar
- Type a value in the search bar. The value will only be searched against the merge field itself, not the description nor example.
- Click to copy the merge field to your clipboard, and paste in the desired field.
Merge field tab: Explorer
The merge field explorer displays merge fields that can be referenced from nodes previous to this node.
How to use the merge field explorer
- In the first column, click on a node item to view the merge fields within. This column displays all the nodes you can copy merge fields from, in respect to this node's position in the flow.
- Click through the levels of data to select from, as indicated by a forward arrow icon. The merge field is indicated by a plus icon.
- Click to copy the merge field to your clipboard, and paste into desired field within the node's configuration settings.
Further applications & considerations
Merge fields are not limited to message bodies. They can also be used in other fields across the Flow BuilderInsert Definition Here, such as criteria split fields and recipient fields.
Merge fields affect character count
The character count in the message body will not accurately reflect the rendered version of the merge fields. For example, firstName can render as Lam
(3 characters) or Maddie
(6 characters).
Using merge fields with arrays
When using merge fields with arrays, Pendula currently defaults to rendering the first item in the array retrieved.
Use merge fields with arrays with caution, as you can't guarantee the array index exists in the database.
Using merge fields with a blank or non-existent value
If a merge field value is blank or non-existent in your data extension, it will simply render blank in the message to the recipient.
The exception to this is when you use merge fields for the sender email address or phone number. If the data for those fields does not exist, the message will not be sent.
Conditional logic & loops (Advanced)
Merge fields operates on the simple templating language called Handlebars. This templating language uses expressions, wrapped in double curly braces, to access values passed into the template. It supports conditional logic, loops, and helpers, enabling you to display specific blocks of information based on defined criteria.
For example, Betty, who had a timestamp against her visit, would receive a different message to Cody, who didn't.
If-else {{#if}}
If-else statements let you conditionally render blocks based on if-else logic arguments; if this, then do this. The {{#if}}
block argument checks whether a value exists in the block, as opposed to a return of false
, undefined
, null
, “”
, 0
or {}
.
Hey {{firstName}},
Thanks for your recent visit at Acme
{{#if webhookTrigger.date}}
on {{webhookTrigger.date}}
{{/if}}.
How did we go?
You can also use {{else}}
inside of {{#if}}
statements to determine what block will render if the initial{{#if}}
block returns a false value.
Hey {{firstName}},
Thanks for your recent visit at Acme
{{#if webhookTrigger.date}}
on {{webhookTrigger.date}}
{{else}}
with our team
{{/if}}.
How did we go?
The example above would render differently if the date stamp was recorded or not.
Unless {{#unless}}
You can use the unless
helper as the opposite of the if
helper. Its block will likewise be rendered if the expression returns a false
, undefined
, null
, “”
, 0
or {}
.
{{#unless hasActiveSubscription}} Hey {{firstName}}, Remember, your subscription has expired. Renew now to continue enjoying our services! {{/unless}}
For instances where more complex conditional logic is required, see Criteria Split Node.
For more information on using conditional logic with Handlebars, see here.
Merge field errors and warnings
Working with Merge Fields in Workflow Studio
This article delves into how to detect and resolve merge field errors and warnings within your flows. When configuring flows, you might encounter various errors and warnings related to merge fields. Errors, depicted by a red outline and exclamation symbol on the node, must be resolved to activate the flow. Warnings, indicated by orange guide text and symbols, suggest potential issues that could lead to operational failures but do not prevent flow activation. Recognising and addressing these alerts is crucial for the seamless execution of your flows.
What are 'Errors' and 'Warnings'
Before diving into specific error and warning messages, it's important to differentiate between the two:
- Errors: These are critical issues that will definitely cause failures on flow activation. Therefore, errors in your flow will prevent activation and must be resolved in order to allow activation.
- Warnings: Warnings, on the other hand, are cautionary. They indicate potential issues that may cause failures, but do not prevent flow activation. Warnings can be dismissed, but the risk something might go wrong will remain. Warnings should be addressed based on the potential impact.
Common merge field errors and warnings
Below is a table outlining common merge field errors and warnings you might encounter, along with explanations to help you understand and resolve them.
Error / warning message | What this means |
---|---|
Merge field {{ name }} in ‘input field’ is from a missing node. | The node referenced in the merge field path (node output key) has either been mistyped, or the node itself has been deleted. |
Merge field {{ name }} in ‘input field’ does not exist (not defined). | The field referenced in the merge field path has either been mistyped, or does not exist. Use the merge field explorer to copy and paste available merge fields. |
Merge field {{ name }} in ‘input field’ is from an unreachable node. | The node referenced in the merge field path (node output key) still exists somewhere in the flow, but is not reachable by the current node. Nodes can only reference merge fields from prior nodes that would have been part of a common experience (reachable nodes). The node could be on the wrong path, or in an unreachable position; e.g. ahead of the current node. |
Merge field {{ name}} in ‘input field’ must not use {{ }} syntax. | The input field that the merge field has been used in requires fields to be referenced without handlebars syntax {{ }}. Remove the {{ }} from the merge field. |
Merge field {{ name}} is not a supported value. | The merge field is referenced in a node that does not support this type of merge field. Merge fields referencing email attachments are currently only supported in the Outbound email node. Remove merge field. |
Must use a merge field in 'input field'. | The errored input field only accepts merge fields (without handlebars syntax {{ }}). Anything that is not a merge field cannot be used in this field. Only use merge fields. |
Must remove spaces in 'input field'. | The errored input field does not accept spaces on either end of the merge field. Check the input field and remove the spaces on either end of the merge field. |
Merge field {{ name }} is malformed. |
The merge field may not have correct {{ handlebars }} syntax (e.g. missing a brace) or there may be no field defined after the node output key. Check the braces.
When the merge field with hyphens or full stop is manually typed out, it must have a square bracket to be valid. For example, |
Merge field {{ name }} in ‘input field’ may not exist (not defined). | A field or object portion of the merge field may be mistyped, or a provided sample payload in a previous node does not contain the field or object. Check your sample payloads. |
Merge field {{ name }} in ‘input field’ may not exist (uses an array). | An array [] is used in the merge field and can have differing amounts of items depending on an individual experience. If an item in the list is referenced, but doesn’t exist for that experience, the individual experience will fail. |
Merge field {{ name }} in 'input field' is an array. | The merge field is referring to an array [], which could result in the rendering of the merge field as unformatted and/or undesired values that are within the array. Refer to a field instead. |
Merge field {{ name }} in 'input field' is an object. | The merge field is referring to an object, which could result in the rendering of the merge field as unformatted and/or undesired fields that are within the object. Refer to a field instead. |
Merge field {{ name }} in ‘input field’ must use {{ }} syntax. | The input field that the merge field has been used in requires handlebars syntax {{ }} for the merge field to dynamically populate. If handlebars are not added, the merge field will appear as-is (the text with braces). |
Merge field {{ name }} will remain as text. | The input field that the merge field has been used in does not accept the use of merge fields. The merge field will appear as-is (the text with braces). Remove the merge field. |
Working with Types: Formula, Fields and Values
Segmenting audience using Workflow nodes
Criteria Filter and Criteria Split Workflow Actions
Configuring nodes like Criteria Filter and Criteria Split involves selecting from various data types. This article elucidates these types—formulas, fields, booleans, strings, and numbers—and their application within node configurations.
Configuring criteria conditions
Criteria FilterInsert Definition Here and Criteria SplitInsert Definition Here nodes allows for the configuration of criteria using various data types. 'Field' or 'Formula' can be selected to define the source of the value for comparison, and an appropriate Value is then assigned. An Operator determines the relational condition, such as 'less than' or 'equals'. The type on the right-hand side—be it ‘Field’, ‘Formula’, ‘String’, ‘Number’, or ‘Boolean’—indicates the nature of the comparison parameter, complemented by the corresponding Value input for the condition.
Formula
Formulas allow you to calculate expressions in real-time, when criteria is being evaluated during an experience.Insert Definition Here
Formulas can be entered on the left or right hand side of an operator when the ‘formula’ type is selected. When the formula Value field is selected, a handy formula picker dropdown will appear to help you write formula expressions:
The following formulas and arguments are currently supported:
DateAdd("interval", number, instant)
Returns the result of adding the number of intervals to the given instant (e.g. add 5 days from now). An instant refers to a specific point in time that serves as a reference for calculating timestamps. This could be the current date and time or the start of an experience.
-
interval
— SECONDS, MINUTES, HOURS, DAYS -
number
— The number of intervals to add (e.g. 5). This can be negative. -
instant
— The instant to add to, representing a precise moment in time. This can be the current datetime returned byNow()
or the starting point of an experience returned byExperienceStart()
.
Now()
Returns the current datetime instant
To add 5 days to the current date and time, you would use DateAdd("DAYS", 5, NOW())
. This formula calculates a new datetime that is exactly five days from the exact moment the formula is evaluated.
ExperienceStart()
Returns the instant
the experience started (when the flow triggers for an individual recipient)
If you need to add 10 days to the moment an experience began, such as a user starting a trial or subscription, you would use DateAdd("DAYS", 10, ExperienceStart())
. This helps in scenarios where actions or reminders need to be scheduled based on the start of an experience.
Examples
Use Case | Formula Expression | Operator | Comparison Value | Description |
Follow-up reminder | DateAdd("DAYS", 30, Now()) |
less than or equal to | Current date | Triggers a reminder when the current date is equal to or has surpassed the 30-day follow-up date. |
Subscription renewal | DateAdd("DAYS", -10, ExperienceStart()) |
greater than or equal to | Subscription expiry date | Initiates a renewal reminder when the current date is within 10 days before the subscription expiry date. |
Post-trial engagement | DateAdd("DAYS", 14, ExperienceStart()) |
equal to | Trial end date | Engages users 14 days after their trial started, aligning with the trial end date for follow-up actions. |
Offer expiration | DateAdd("HOURS", -24, Now()) |
less than or equal to | Offer expiry date | Checks if an offer expired within the last 24 hours, potentially to offer an extension. |
Membership anniversary | DateAdd("YEARS", 1, ExperienceStart()) |
equal to | Current date | Annually checks if today matches the anniversary of the membership start date to trigger celebratory or renewal actions. |
Field
The Field
type allows referencing data directly from fields stored in your system, similar to how merge fields work. Begin typing in the input to search and select from available fields, which dynamically populate based on your system's data schema.
For example, using the field City
from your system of record, you could use the field type and add a value (for instance, Sydney
) to filter recipients based on whether their city is Sydney or not.
String
The String
type is used for text comparisons. It allows you to specify exact text to match against a field's value. For instance, you might pair the City
field with the string value Sydney
to target users specifically in that city.
Boolean
The Boolean
type supports true or false values, making it ideal for fields that store binary data, such as isActive
or emailVerified
. This type is essential for filtering recipients based on Boolean field conditions.
Number
The Number
type is utilised for numerical comparisons and can be used with fields that store numeric values, such as age, quantity, or thresholds. For example, setting a Number
type to 1234
allows you to target recipients based on numeric criteria like account numbers or identifiers.
Usage scenario: Offer expiry example
As an example, we can use Criteria filter to create an offer expiry period in the flow.
When a recipient replies to the original outbound SMS, the reply will come back into Pendula, and the split will check whether it was received before the expiry - i.e. was it received 2 days before or 2 days after the original messages sent?
In the criteria builder:
-
LHS Select type =
formula
-
Enter the formula =
DateAdd ("DAYS", 2, ExperienceStart())
(2 days from when the experience started)
-
Select operator =
less than
-
RHS Select type =
formula
-
Enter the formula
Now()
Essentially this checks that the inbound message was received less than 2 days ago and the recipient has replied, they can continue through the the ‘success’ path of the split.
Segmenting audience using Workflow nodes
Working with Actions in Workflow Studio
Segmentation enables targeting specific subsets of an audience at any point within a communication flow. Pendula supports this through Criteria Filter and Criteria Split nodes, which segment recipients based on real-time data.
Criteria nodes segment recipients by evaluating real-time data. This segmentation enhances the effectiveness of communications by aligning them with the recipients’ current status or recent interactions. Creative and intelligent use of segmentation with multi-channel workflow allows you to seamlessly nurture your audience from initial engagement to brand advocate.
Criteria-based segmentation examples
Segment recipients within a flow by combining filters based on behavioural, demographic, social or custom attributes within your system of customer data. Any data you can send to Pendula, you can use to create tailored and unique experiences.
- Use criteria nodes to ensure communications are sent only to recipients who have not opted out. For instance, verify whether the 'optedOut' attribute in a CRM record is 'false' to filter and continue the flow with these recipients.
- Employ criteria to target recipients based on their recent engagement. By establishing a criterion to identify if 'lastCommunication' occurred less than five days prior, you can effectively engage active users with timely follow-ups or incentives.
- Segment recipients by their channel preferences to ensure the message is delivered (and read) on their favourite channel.
- Complex audience building with nested groups in criteria nodes.
- Use multiple segments throughout a flow to enhance the personalisation of your campaigns; Pendula’s Flow Builder supports the integration of multiple criteria splits, allowing you to tailor the journey based on customer replies or generative AI inputs.
Using advanced criteria nodes
Pendula enhances recipient segmentation through two workflow nodes:
Criteria Filter
This node assesses each recipient against predefined criteria. Recipients meeting the criteria continue on the "pass" path, while others are diverted to the "fail" path, streamlining the segmentation process for binary decision-making.
For a detailed guide on configuration, see Criteria Filter Workflow Action
Criteria Split
This node facilitates complex decision-making by directing recipients along multiple conditional paths. Recipients are evaluated sequentially against each path's criteria; the first matching path is chosen, or a default "Other" path if no criteria are met.
For a detailed guide on configuration, see Criteria Split Workflow Action
Criteria Filter and Criteria Split Workflow Actions
Segmenting audience using Workflow nodes
Criteria Filter
Criteria filter checks incoming data against the provided criteria. If the data matches your criteria, the experience continues along the success path. If the data does not match your criteria, the experience continues along the fail path.
Usage Scenario
The example below demonstrates the use of a Criteria Filter in an A/B testing scenario, initiated by a form submission. The Criteria Filter divides customers into two groups based on predefined criteria. Customers who meet the criteria for Group A receive Email A. Conversely, those who do not meet the criteria for Group A and fall into Group B receive Email B. This setup allows for direct comparison between different marketing approaches.
Criteria Split
Criteria split enables you to build multiple 'criteria paths', and checks recipients against the criteria for each path. If the criteria match, the data follows the corresponding path. If multiple path's match, the highest priority (top) path is followed. If no paths are matched, they follow the 'Other' path.
Usage Scenario
The example below showcases a Criteria Split in action, with a flow based on student project preferences from a form submission. The Criteria Split node examines the student's choice and directs the flow accordingly. Successful project matches trigger an email with relevant project materials, while mismatches result in an email informing the student of the issue and suggesting alternative actions.
Configuration of the Action
Groups and Rules
-
Groups serve as containers for sets of rules, similar to how parentheses are used in mathematical equations to group together different parts of an expression. Choose Add a group to begin a new set of conditions that act as a separate logical statement within the criteria.
-
Rules are the individual conditions that reside within a group. A single group may contain multiple rules connected by a shared logical operator,
AND
orOR
. A rule can exist on its own without a group. Utilise the Add a rule option to introduce new conditions within an existing group. -
The option between
AND
andOR
within the interface allows you to define how groups and rules interact.Choosing
OR
means that your segment will include recipients satisfying any one, some, or all of the rules within that group. For example, if your segment's rules are that a recipient’s preferred channel isEmail
OR
SMS
, then all recipients with either preferred channels will be included.Conversely, selecting
AND
ensures that only recipients who meet all conditions are included in your segment. For instance, if your segment's rules are that a recipient’s preferred channel must beSMS
AND
must have bought a subscription within the last 30 days, then only recipients who meet both criteria will be included.Additionally, this logic can be layered to create complex segmentations, such as segmenting recipients who satisfy a specific rule
AND
at least one of two other conditions. For example, a segment might include recipients who have clicked on a campaign linkAND
preferEmail
OR
SMS
.
Operators and Types
-
Operators are relational symbols such as 'equals', 'greater than', or 'less than or equal to', define how the field's value should be evaluated within a rule.
-
Types are types of values used in rules can vary from ‘Formula’, 'Field', 'String', 'Number', to 'Boolean'. The 'Field' type allows referencing data directly from fields stored in your system, similar to how merge fields work.
Make sure that the value you enter matches the value type selected. Some systems store data differently than others, so make sure to check the field types in the system the data is coming from.
For a detailed guide on types, see Working with Types: Formula, Fields and Values
Paths
This is only applicable for Criteria Split.
- In Criteria Split, each path can be given a path label, reflecting its unique conditions. These names appear on the canvas, offering a clear map of the flow’s branching logic. To set up multiple paths, label each with a relevant name that describes the segment or condition it represents.
- The paths within a Criteria Split are prioritised from top to bottom. Recipients are evaluated against each path’s criteria sequentially. If a recipient matches multiple paths, the system prioritises the topmost path. There’s also a provision for a fallback path, labeled typically as 'Other', which captures any recipients not meeting the criteria of the prior paths.
- Within the node, you can duplicate a path as well as change the order of path to set precedence.
Make a web request Data Action
Make a web request is an action node in Pendula that facilitates HTTP communication with external services during an experience. This article provides a comprehensive guide on configuring steps for authenticated web requests, employing methods like POST, GET, PUT, and PATCH.
What is a web request?
A web request is a bit like sending a detailed letter to an address, asking for specific information to be sent back, or to ask the recipient to perform an action, and then waiting for their response.
When you use the internet, HTTP (Hypertext Transfer Protocol) acts as a set of rules for transferring files (text, graphic images, sound, video, and other multimedia files) on the web. In the context of a Pendula flow, we can use HTTP requests (web requests) to perform tasks or get information.
In the context of Make a web request node, an authenticated web request refers to a request sent with credentials to confirm the requester’s identity. This authentication can be accomplished through various methods, such as username/password, request headers, or bearer tokens, ensuring secure access to protected resources. Pendula supports the following HTTP methods for web requests -
GET: Retrieves data from a specified resource. Use GET in Pendula to fetch information needed for your workflows, such as customer details from an external CRM system.
POST: Submits data to be processed to a specified resource. Use POST in Pendula to create new entries, such as registering a new user in a database.
PUT: Updates a specific resource completely through the replacement of its current state with the one provided in the request body. Use PUT in Pendula for comprehensive updates, like changing a complete user profile or updating an entire record.
PATCH: Applies partial modifications to a resource. Use PATCH in Pendula for making incremental updates, such as adjusting a single attribute of a customer record like an email address or phone number.
Usage scenario
Some examples of how Make a web request can be used include:
- Retrieving Data: You might send a web request to get data from a database. For example, if you're looking at customer demographics, your request would ask for this specific information from the specified service (for instance, a CRM).
- Sending Data: Similarly, you might need to send information, like updating customer records or posting content to social media. This involves sending a web request to the relevant service with the data you want to upload or modify.
The following example demonstrates a practical application of the Make a web request within a flow, illustrating how these messages are processed to ensure an effective feedback loop following a new purchase.
Configuring the action
Prerequisite for creating an authenticated web request
For authenticated web requests, ensure you securely store the necessary credentials from the external service within the Integrations page. These credentials will be essential for configuring the Make a web request node to authenticate and authorise the request for secure data exchange.
For a detailed guide on creating an authenticated web request credential, see Make a web request Authentication
Creating and configuring a web request
- When building your flow, drag and drop the Make a web request node onto the canvas at the desired point where you want to make a web request.
-
In the Request details section, select the HTTP request method you want to use (
GET
,PUT
,PATCH
orPOST
) The external service you are calling out to will inform you on what method is suitable. -
Enter the API endpoint URL – this is the address where you want to send the request to.
You can dynamically customise your request's URL with data from previous nodes in the flow by using merge fields directly into the URL parameters. This method allows the API endpoint to adapt based on context, effectively using real-time data to query specific information or actions relevant to the user.
https://api.example.com/users?userid=userId&mobile=mobile
In this configuration, userId and mobile are merge fields within the URL. They are dynamically replaced with actual values from previous nodes when the flow executes.
-
Under Authentication, specify if your request requires verification. Select 'Bearer', 'Username & Password', or 'Headers' for authenticated access.
If the credential hasn't been added for authenticated access, you can add one in the Integrations page. See Make a web request Authentication
-
You can also add headers in the Request headers section, if necessary.
For headers related to security, such as 'Authorization' , add these through your web request credentials in the Integrations page. This helps centralise security management and simplifies the configuration process.
Configuring the request body
In the Request body section, you can select content type (JSON by default) and configure the request body payload using the property builder.
- In the Property field, type the name of the data attribute you want to include in your request (e.g.,
username
,email
). - Select the Type from the dropdown:
string
,boolean
, ornumber
, depending on the data you need to input. - In the Value field, input the actual data or select the merge field icon to dynamically insert data from previous nodes.
If you wish to build your own JSON payload using code, you can select the ellipses next to the property builder, and choose Convert to code. Note that this action is not reversible, and you'll need to Reset to get the property builder back.
If you wish to send an empty request body for PUT
, PATCH
or POST
actions, you can select the ellipsis icon > Convert to code.
Advanced request preferences
-
Follow Redirects: Allow requests to follow HTTP 3xx requests for a maximum of 10 redirects. This is useful for accessing requested resources that have moved to a new URL.
- Retain the authorization header when a redirect happens to a different hostname.
- Retain the original HTTP method after a redirect.
-
Timeout: Wait for 100 seconds (configurable up to 360 seconds) for a response from the server before timing out. Adjust this setting if you require a longer or shorter wait time depending on the service you are interacting with.
These advanced settings ensure your web requests are handled efficiently and securely, providing greater control over how HTTP requests are processed within your workflows.
Outcomes
The "Outcomes" tab allows you to configure how the experience should continue after the "Make a Web Request" node.
- Success: The experience will continue on this path if the web request response is accepted with a 2xx status code.
Example of a Success Response:
{
"outcome": "success",
"outcomeReason": "ok",
"response": {
"cats": [ "cougar", "lion", "jaguar" ]
},
"code": 200
}
- Fail: The experience will end if the web request response encounters client errors (4xx), server errors (5xx), or unsupported formats. You can enable the "Path" option to handle failures within the flow.
Examples of Failure Responses:
Unsupported Format:
{
"outcome": "failure",
"outcomeReason": "request-failed",
"cause": "io.circe.ParsingFailure: expected json value got '<!doct...' (line 1, column 1)",
"message": "Outbound Webhook Failed: RawContentType[text/html] was not supported, and response could not be decoded as the fallback content type: JSON\n. Response[code=200, content-type: Some(text/html), body=Right(<!doctype html><html><body>Forests</body></html>)]. Request[method=GET, uri=http://localhost:20000/get-animals/html, content-type: None, body: NoBody]",
"code": 200
}
404 Not Found:
{
"outcome": "failure",
"outcomeReason": "request-failed",
"code": 404,
"cause": "Failed outbound request: Not found",
"message": "Outbound Webhook Failed: Request failed with non-successful status code: Response[404 Some(text/plain; charset=UTF-8)]\n. Response[code=404, content-type: Some(text/plain; charset=UTF-8), body=Left(Not found)]. Request[method=GET, uri=http://localhost:20000/not-existing-path, content-type: None, body: NoBody]"
}
Internal Server Error:
{
"outcome": "failure",
"outcomeReason": "request-failed",
"code": 500,
"cause": "Failed outbound request: ",
"message": "Outbound Webhook Failed: Request failed with non-successful status code: Response[500 None]\n. Response[code=500, content-type: None, body=Left()]. Request[method=GET, uri=http://localhost:20000/fail-call, content-type: None, body: NoBody]"
}
These outcomes ensure that your workflows can handle different scenarios appropriately, providing clear paths for success and failure conditions.
Use data from a web request response: Sample response
When using Make a web request, data is not only sent to an endpoint, but a response can also be received from the external service. The data from the response can be used in the flow by referencing merge fields in later nodes.
For a detailed guide on merge fields, see Working with merge fields
To view and use these merge fields, we need to provide the Make a web request node with a sample response.
By navigating to the 'Merge fields' tab on the Make a web request node, you will see the merge field explorer, 'This node' is selected, and the ability to paste a sample payload of the response:
The sample response must be in JSON format (key value pairs, objects, arrays). Here's an example of a response body, in JSON format:
{
"userid": "harrison-example",
"firstname": "harrison",
"lastname": "koenig",
"mobile": "+61400000000"
}
When you paste the sample response into the field, Pendula checks to make sure the data is correctly formatted, and highlights any errors that may need to be corrected, so you can be confident the data is valid before starting the flow.
Note that we currently only support one sample payload. If your responses can have different structures, you may need to manually enter the merge fields by typing.
Merge fields
You can reference any merge fields from nodes previous to this node. Learn more about merge fields
In later nodes, when viewing the available merge fields for the Make a web request node in merge field explorer you can expect to see:
response | The body of the response |
|
This object contains the body of the response from the server. To view these fields, you must copy the response body of the payload from the external service (not including headers) and paste into the Payload sample field. |
code | The HTTP response status code |
200
|
This is the code returned from the server. |
outcome | The final request status (string) |
success
|
The request was sent, and the response was understood. |
|
The request either failed to be sent, or the response failed to be decoded. | ||
outcomeReason | The reason for the request status (string) |
|
This means that the request was successful, and its response was successfully decoded. Because the response might be plain text or JSON, it is stored in the response object. |
invalid-request
|
Pendula did not attempt to send the request, because some information about its configuration was invalid. This can include bad URLs, credentials not found, wrong types of arguments etc. |
||
|
The request was sent, but it did not work. This could include situations where the response’s content-type wasn’t supported; meaning this can occur for a 200 response. |
Flow errors
Complete overview of the Flow Builder
An error is something that will prevent a nodeInsert definition here or a flowInsert definition here from executing successfully. Examples include misconfigured connections or merge fields that reference missing data.
Errors within nodes can be detected through two primary indicators:
-
Within the Node If a node encounters an error, a message stating
This node has some errors
will prominently display within the node settings through a red outline and exclamation symbol. This alert serves as a direct indication that the particular node requires your attention for troubleshooting. - Global error view on Menu bar Additionally, the Flow BuilderInsert definition here provides a holistic view of errors across all nodes in a flow via the menu bar. If errors are present, an alert will list them collectively.
Each error message is designed to guide you to the problem area within the node.
Node | Tab | Field | Error message | What this means |
All | Node name | Node name is a required field |
The name of the node cannot be empty. | |
Amazon Kinesis trigger | Settings | Integration | Integration is a required field |
The integration field cannot be empty. |
Stream | Stream is a required field |
The stream field cannot be empty. This is the name of the data stream in AWS. | ||
Region | Region is a required field |
The region field cannot be empty. This is the region the data stream lives in. | ||
Advanced | Node output key | Node Output Key is a required field |
||
Inbound message | Settings | Intent key | body.intentKey is a required field |
Must be selected from the dropdown, cannot be empty. |
Advanced | Node output key | Node Output Key is a required field |
||
Outbound SMS | Outbound SMS | Recipient | Recipient is a required field |
The recipient field cannot be empty. |
Message body | Message body is a required field |
The message body cannot be empty. | ||
Message body exceeds 1800 characters |
It’s advised to not exceed 1800 characters. | |||
Message body contains GSM characters |
It’s advised to not use GSM characters. | |||
Advanced | Node output key | Node Output Key is a required field |
||
Conversation | Outbound SMS | Recipient | Recipient is a required field |
The recipient field cannot be empty. |
Message body | Message body is a required field |
The message body cannot be empty. | ||
Message body exceeds 1800 characters |
It’s advised to not exceed 1800 characters. | |||
Message body contains GSM characters |
It’s advised to not use GSM characters. | |||
Expected responses | Response path name | Intent Key is required for a message path |
The response path name cannot be empty. | |
Reply expiry | Reply expiry is a required field |
Must be a number greater than 0. | ||
Advanced | Node output key | Node Output Key is a required field |
||
Workflow (Advanced) | Settings | WFL text area | WFL is a required field |
This must be filled in with valid WFL. There is no validation on the WFL at the moment, but it cannot be empty. |
WFL Split (Advanced) | Settings | WFL text area | WFL is a required field |
This must be filled in with valid WFL. There is no validation on the WFL at the moment, but it cannot be empty. |
Criteria split | Settings | Criteria builder | Field is required |
The field cannot be empty. |
Operator is required |
Must be selected from the dropdown, cannot be empty. |
-
<% categories.forEach(function(category) { %>
<%= partial('partial-article-list-sections', {
id: 'category-' + category.id,
parentId: '#sidebar-navigation',
sections: category.sections,
activeCategoryId: activeCategoryId,
activeSectionId: activeSectionId,
activeArticleId: activeArticleId,
partial: partial
}) %>
<% }); %>
-
<% sections.forEach(function(section) { %>
-
<%= partial('partial-article-list-sections', {
id: 'section-' + section.id,
parentId: '#' + id,
sections: section.sections,
activeCategoryId: activeCategoryId,
activeSectionId: activeSectionId,
activeArticleId: activeArticleId,
partial: partial
}) %>
<% if (section.articles.length) { %>
-
<% section.articles.forEach(function(article) { %>
- <%= article.title %> <% }); %>
<% }); %>