Moments
Flow elements
Entry points and exit

Entry points and exit

Selecting an entry point is your first stop on the way to create a personalized communication flow.

triggers in saas

The next step, after you have decided which entry point to use, would be to define the mandatory parameter values. For example, if you have selected Predefined Audience as the flow starter, in the side panel that appears when you click that entry point, select individual persons, audience segments, or people with a tag or attribute that you have previously created in the People module.

create-flow-predefined-audience

Predefined Audience

Use this entry point to send communication to all profiles that meet the criteria that you define. Example: Profiles that have a specific tag or are part of a specific segment.

In this entry point, you must define the criteria for the audience before you launch the flow.

Note

You can add only one Predefined Audience entry point to a flow. You can add other entry points multiple times.

To configure this entry point, complete the following fields.

Update audience after launch

Specify whether the audience is updated after the flow is launched. Select one of the following:

  • Never - The audience is static. It consists only of the profiles that are added before you launch the flow. If a profile that was not in the audience now meets the criteria for the audience, that profile is not added to the flow.

    Example: You added all profiles that have the tag June to the audience and launched the flow. This tag is now added to a profile that is not part of the audience. This profile is not added to the flow.

    The selected audience enter the flow only once. After all the audience exit the flow, the flow is complete.

  • In real-time - The audience list is dynamic. If a profile that was not in the audience now meets the criteria for the audience, that profile is added to the flow, while the flow is active.

    Example: You added all profiles that have the tag June to the audience and launched the flow. This tag is now added to a profile that is not part of the audience. This profile is automatically added to the flow.

    Exceptions: If a profile is already in the flow, settings such as Frequency Capping or Reenter settings might prevent this profile from entering the flow again.

Note

When you select In real-time in the Update audience after launch field, you can also manually add or remove audience in an active flow.

Define the audience

Do the following:

  1. In the configuration pane for the Predefined audience element, select Add audience from People.

    Add audience manually
  2. Select one or more of the following criteria. You can select multiple options of each type. All profiles that match the selected criteria are added to the audience.

    • Tags: Adds all profiles that have the tags that you select.
    • Audience segments: Adds all profiles that belong to the segments that you select.
    • Person profiles: Adds all profiles that you select.
    • Companies: Adds all companies that you select.

    To view more items, select View all.

    View all audience

    You can also search for a specific item. After you select View all, you can use the search field.

    Search audience
Note

You can add only one Predefined Audience entry point to a flow. You can add other entry points multiple times.

Triggers

Flows can also be triggered by different events and actions. In other words, people who perform some activity that has been defined inside the trigger will enter your Flow. The following guidelines should help you determine which triggers would best serve your business scenario.

Change In People Profile

This entry point is triggered when changes to a person profile meets the conditions that you specify.

Example: You want to send a welcome message to end users who opt in to your communications. In the Change in people profile trigger, specify the condition that the OptInStatus profile attribute must be True. The flow is triggered when the OptInStatus profile attribute for an end user changes to True.

Change in person profile trigger

You can also use this trigger to wait for a predetermined period so that the person can enter the communication flow.

Example: You want to send greetings to end users on their birthdays. In the Change in people profile trigger, specify the condition that the BirthDate profile attribute is today.

Wait for predetermined period

Configure the trigger

In the trigger, select the person profile attribute, a relevant operator, and the condition value. You can also use flow variables in the condition value.

Configure the condition

You can specify multiple criteria in a condition.

Add multiple criteria to the condition

You can specify multiple conditions.

Add multiple conditions

The available operators depend on the data type of the person attribute. The following table lists the operators for each data type. You can also use person profile attributes of the List data type.

BOOLEAN (True/False)TEXTNUMBER (Decimal, Whole)DATE (Date, Date Time)
isisisis
is notis notis notis not
is emptycontainsless thanbefore
 does not containless than or equaluntil
 starts withgreater than or equalsince
 ends withgreater thanafter
 is emptyis emptyis empty
 is not emptyis not emptyis not empty
   is today
   will be in
   will be within
   will be more than
   was
   was within
   was more than

People Real-Time Event

Use this entry point to trigger the flow based on events. Example: On your website, track the addToCart event by using Web SDK. Add the event, addToCart, to the People real-time event entry point. When an end user adds an item to the cart on your website, the event is assigned to the end user's profile, and the flow is triggered.

You can then branch your flow based on the events. Example: If the addToCart event happened, send them a follow-up message.

Use this entry point to identify how end users interact with your digital assets such as websites, how they react to your messages, and if there are any changes in their profile information.

For more information about events, refer to the People documentation.

triggering events in messages

Use cases for the trigger

The following are some examples of using this trigger.

  • In abandoned cart campaigns when you want to remind customers that the products that they selected are still in the cart
  • Offer a discount to end users who view the same item three or more times within 7 days.
  • Other advanced multi-step campaigns.

Configure the trigger

Follow these steps to configure the trigger.

  1. Define the condition for which flow needs to be triggered.
  2. (Optional) Save the information in variables.
  3. (Optional) Include historical data.

To use multiple audience segments and add the customer attributes, refer to the Segment Audience element.

Configure the trigger

For more information, refer to the following sections.

Define the conditions

Define one or more conditions that trigger the flow.

In each condition, do the following.

  1. Select the event.
  2. Select the operator for the event. You can target either customers who performed the action or those who did not perform the action.
  3. Define the criteria for the event.
  4. (Optional) If the event has properties, you can add them to the condition to refine the target audience.
Select the event

Select the event. For more information about events, refer to the Events documentation in People.

Follow these guidelines.

  • To select a custom event, you must define the event, along with its properties, in People.

  • For channel events, you can also select details about the communications. Example: For the Email link clicked event, select the name of the flow from which the link was sent to the end user.

    Select details about the communication
  • For Product events, the person entered flow and person exited flow events are available. Use the event property fields to add the following:

    • The name of the flow or flow version (communication) where the event occurred.
    • The time when the event happened and the number of occurrences.

You can search by event name and filter by event type.

Filter and search for events
Select the operator

Select which end users you want to target.

  • Happened: Targets end users who performed the action. You can set the time and number of occurrences. Example: To trigger the flow and send a communication the third time an event happens within a 7-day period, specify the time as within the last 7 days and the number of occurrences as equals 3 times.

    Select the operator for the condition
  • Not happened: Targets end users who did not perform the action. Example: An end user did not launch an App after a certain period.

Note

Do not use Not happened condition by itself. Use it only with the Happened condition. This is because while it is possible to trigger a flow when an event occurs, it is not possible to start the flow when an event does not occur.

Example: Start the flow when Event A happened AND Event B did not happen.

Define the criteria for the condition

Each event has specific fields for the criteria. Complete all the fields.

Select the criteria for the condition
Add event properties to the condition (Optional)

If the event has properties, you can add them to the condition to refine the target audience. Select Property.

Add as many properties as required.

In the example shown in the following image, itemId, which is a property in the Item viewed event, is added as a filter.

Add properties to the condition
Map event properties to flow variables (Optional)

If the event has properties, you can map them to flow variables. You can reuse these variables later in the flow.

Example: In your flow, you use the Wait for an Event element to wait for the end user to book an appointment. The event has properties such as Appointment time and Appointment name. You can save these properties as flow variables. At a later stage in the flow, you can use these variables to send the end user a confirmation message with the appointment details.

Depending on the configuration, the values of the mapped variables could change as the end user moves through the flow.

Example: You flow uses order delivery status as a variable. As the delivery event progresses to the next stage, the delivery status variable changes from Pending to Dispatched.

You can pass list attributes to flows. For more information, refer to the Pass lists in events to flows documentation.

For more information about creating and using variables, refer to the Map event properties to flow variables documentation.

Include historical data (Optional)

If you select this option, events that happened before the start of the flow are included.

If all the events in the conditions already happened before the flow started, the person does not enter the flow. However, if the flow is recurrent, the person enters the flow only if these events happen again.

Inbound Message

This entry point triggers the flow when an end user sends a specific keyword to the number that you configure. Depending on the channel, the end user can send the keyword in different ways such as the message body, button text, or button payload.

Use this entry point to create a dynamic audience based on conditions that you specify.

Note

You can add multiple Inbound message entry points to a flow.

Inbound message trigger

Configure the trigger

Follow these steps to configure the trigger.

  1. Select the channel for which you want to create the trigger.
  2. Select the recipient.
  3. Define conditions to compare the end user's message with the value that you specify. If the condition is fulfilled, the flow is triggered.
  4. (Optional) Save the inbound message information in variables.

For more information, refer to the detailed instructions below.

Select the channel

In the Channels and conditions section, select the channel for which you want to create the trigger. Communication with the end user happens through the selected channel.

The default channel is SMS. To use a different channel, delete the existing channel and select the required one.

Select the channel

Select the recipient

Select the channel name to open the card. In the To recipient section, select the recipient.

Select the recipient

Define conditions for the inbound message

Define conditions to compare the end user's message with the value that you specify. If the condition is fulfilled, the flow is triggered.

You can specify multiple conditions within the entry point.

You can set conditions for the following:

  • Message body: Compares the body of the message against the condition value.

  • Anything: Use this option so that end users enter the flow even if their message contains something that is not included in the conditions.

    Exact matches have a higher priority over Anything. Example: You have two flows that are waiting for a message from the same end user. In one flow, the condition is to match the exact word yes. In the other flow, the condition is Anything. The end user responds yes. In this case, the flow that matches the exact keyword is triggered.

  • Button text (WhatsApp only): When the end user selects a button to respond, this condition compares the button text against the condition value.

  • Button Payload (WhatsApp only): When the end user selects a button to respond, this condition compares the button payload against the condition value.

Define the conditions

Use the following operators in the conditions.

  • Is equal to person attribute - checks whether the message body contains the person attribute that you select.

    The case is ignored when comparing the value.

  • Matches text - checks whether the end user's response matches the condition value exactly. The condition is fulfilled if the end user's response contains only the condition value and nothing else. You can specify multiple condition values.

    Example: Condition value: time End user's response: time. The condition is fulfilled. End user's response: timezone, time!!, what is the time? The condition is not fulfilled because the response contains additional characters that are not part of the condition value.

    The case is ignored when comparing the value.

  • Matches RegEx - checks whether the message body contains a regular expression pattern that you define.

    Ignore case (Optional): Specify whether to ignore the case when evaluating the condition.

    Multiline (Optional): Use this option when you want to match against multiple lines of text. The validation is successful if any of the lines match.

    Match regex
  • Contains text - checks whether the message body contains the keyword that you specify in the condition value. You can specify a group of characters, such as a symbol or keyword, in the condition value. You can specify multiple condition values.

    Example: Condition value: time End user's response: time, timeframe, 3times, time!!, what is the time? The condition is fulfilled because the message contains the keyword.

    The case is ignored when comparing the value.

  • Contains word - checks whether the message body contains the exact word that you specify in the condition value. The word in the message body can have symbols or spaces before or after the word, but must not contain digits or other letters.

    Example: Condition value: time End user's response: time. The condition is fulfilled because the message contains the exact word. End user's response: time!!, what is the time? The condition is fulfilled because the message contains the exact word with either symbols or spaces before or after the word. End user's response: times, timeframe, timezone, 3times. The condition is not fulfilled because the word in the message contains additional characters that are not part of the condition value.

    The case is ignored when comparing the value.

You can specify multiple condition values.

The system follows the above order to process inbound messages. So, if a condition that has a higher priority is fulfilled, the flow takes the action for that condition and ignores the other conditions.

Select the operator
Note

You can reuse keywords across multiple active flows. Example: Use common keywords such as Yes or No in multiple flows. In cases where 2 or more flows are waiting for the same inbound keyword from the end user at the same time, the end user's input is forwarded to one of these flows randomly.

Save inbound message information in variables

You can also define variables to capture and store inbound message information.

Define the data that you want to capture from the inbound message. You can capture the following information.

  • Message body
  • Recipient
  • Sender
  • Message ID
  • Gateway ID

You can save either the whole or part of the information.

  • Whole text: Save the whole of the information.
  • RegExp parse variable: Use a regular expression to capture a specific keyword in the message content.

For more information, refer to Flow Variables.

Save response in a variable

Inbound Call

The users who call your number will be included in the flow if you have selected Inbound Call as the starting point. The flow will be triggered when they call the number that you have set inside the Inbound Call side-panel.

Important

To use the Inbound call entry point you need to activate a voice channel! Contact your account manager for more information regarding the voice channel activation. Also, keep in mind that to be able to change the inbound IVR scenario used with a Voice number, you have to stop the current flow campaign on that number, and then start building a new one.

Another very important piece of information when using Inbound Call would be that the end user is charged by their mobile or landline operator. In some cases, you will also be charged for inbound traffic coming to a Voice number, but that depends on the market. Also, if an IVR has a Forward call element forwarding the current call to some other phone number(s), you pay for that outbound leg of the call.

Date or Time

If planning a time-sensitive communication, your best starter will be the Date or Time trigger. It relies on information stored in the profile inside the People module.

So, besides having the user profile in People, what are other requirements? You will need to create a custom attribute that consists of either date or date and time. Let`s say you want to remind clients of an appointment – you can create ‘appointmentDateTime’ attribute and then build the communication around it.

In People module, go to Configuration > Create Custom Attribute.

moments-create-custom-attribute

The data related to this attribute can be populated via People API (opens in a new tab), Web SDK, Mobile SDK, or manual import on the People page on our web interface.
You will now be able to use this attribute as a communication trigger.

new-trigger-date-time

Several options are available to help you design a well-timed communication:

IS IN – use this condition to send communication hours or days before the date/time you have set as a custom attribute inside the person profile.
For example, with “AppointmentDateTimeis in4 hours,” your customer will enter the Flow when the current date/time is 4 hours before the one set in the TrialExpiryDateTime attribute.

WAS- the amount of time after the set date/time has been reached. So, you would set “TrialExpiryDate was 1 day ago” to include the customer in the flow one day after the date set in the TrialExpiryDate custom attribute.

IS TODAY - use it when you want to send the communication on the date set in the custom attribute: “DueDate is today.”

IS TOMORROW – send a message one day before the date set in the custom attribute.

WAS YESTERDAY – send a message one day after the date set in the custom attribute.

For any messaging campaign where timing is key, you can also use the Wait for a Date Flow element.

External Source

Add people to your communication from external sources, such as via Flow API, via an Existing Flow, or using SFTP Import.

Flow API

Flow API sends data from external systems, such as a web page or a CRM system, to the flow that you created on the Infobip web interface. Use this entry point to automatically add people to the flow based on external triggers. Example: An end user submits a form on your web page or there is a new entry in your CRM system. Thus, you can automate processes such as welcome messages, lead nurturing, and reminders.

You can even transfer variables over Flow API. When you create a variable in Flow, it is available to use in the Flow API trigger.

To create a flow with Flow API as the entry point, do the following:

  1. On the Infobip web interface (opens in a new tab), navigate to Moments.

  2. Select Create flow.

  3. Select Start from scratch.

  4. Select External source > Flow API.

    Select entry point

    The entry point contains a unique URL where the end users’ data will be sent.

    URL for user data
  5. To automatically add participants to the flow, do one of the following:

    Note

    The Add person to flowendpoint has been deprecated. When you create a new flow, use the Add participants to flow endpoint instead.

    Add participants to flow
  6. Configure the rest of the flow as required.

  7. Launch the flow.

When the flow receives the data from the external systems, it does the following:

  • Updates existing profiles in People.
  • Creates new person profiles in People.
  • Adds these persons to the communication.

For technical information about the integration, refer to the API Developer Hub (opens in a new tab).

Refer to the tutorial to send automated welcome messages using Flow API.

Existing Flow

Use the Existing Flow entry point in conjunction with Add to Flow to build powerful modular flows. This entry point serves as the first step where users join the flow from a different active flow. Flows that have the Add to Flow element can be selected when you create a Flow with this entry point.

SFTP Import

The SFTP Import entry point is available if you would like to import csv or tsv data into Moments from your remote external server using secure file transfer protocol (SFTP). This is a useful approach when connecting to an external source via Flow API is not an option for you.

Once a connection between Moments and your server is established, the SFTP connector will check the target folder on your server every 3 minutes. Any new files that you add to the folder since the last check will be added to the target flow. Old or existing files in your server that have already been processed by the connector will not be modified, deleted or moved from the folder. Infobip will never change the data in any way. As the csv or tsv data is hosted on your server, you always have full control of your data.

Select External Source then SFTP Importentry point when you create your flow. Define how the file should be processed in the entry point sidebar menu.

OPTIONDESCRIPTION
SFTP ServerSelect from an existing server that you use for sftp connection or create a new sftp connection to a server where you host your files for upload.When you select Create New SFTP Connection you should provide your server address, port and authentication information. Test to verify the connection has been successful and activate it when you are ready to go.
File pathSet the path to the file(s) on the SFTP server that you want to fetch. Applicable if you have different folders for different Flows, or are using different folders for different departmental data.
Filename pattern (optional)Set an optional filename pattern to extract files that only follow a naming convention or pattern and inject them to Flow.We use 2 symbols:Wildcard asterisk * masks the sequence of symbols. For example, *.csv will fetch all csv filesQuestion mark (?) to mask one exact symbol. For example, J???Data.csv will fetch both - JuneData.csv and JulyData.csv files
DelimiterSelect the delimiter that will be used to split values in the files. The delimiter you choose must match the delimiter used in your file.; (semicolon),| (pipe),Tab,Custom (any character max. one),, (comma)
Column MappingMap the file columns to the exact Attributes / Variables in Flow because the system does not automatically know how the file is structured.Ensure that the values you enter here exactly match the column names in the file, and also check that any data types match too. The system will not be able to correctly 'read' mismatched data types. For example, if you were to use Date Time data type with a Date field you may see errors when you upload a file.3 sections are available:

Contact information: It is mandatory to have at least one column for contact information (phone number/email address). The maximum limit for contact information columns is two. One column for a phone number and one column for an email address. If the contact information of an entry in the csv is incorrect then the entry will be marked as invalid and will not be processed.

In scenarios where both a correct phone number and an email address are provided in the entry, then the entry will be processed by the connector and marked as valid in SFTP Import performance reporting. If one piece of contact information is valid and the other is invalid then the entry will be marked as invalid by the system and not processed. However, if one piece of contact information is valid but the other piece of contact information is empty (i.e. no contact information provided) then the whole entry will be counted as valid and it will be processed by the system.

You can see the SFTP Import performance data including valid and invalid entries in the SFTP Import reporting tab of View Flow Performance. See SFTP Import (LINK TO SFTP Reporting section) to learn more.Person attributes: Standard/Custom attributes that will be used in Flow for personalization/segmentation. All attributes used here should be created in People before import.Variables: Used if the user doesn't want to retain this info in People (session-based data). Variables used here should be created in Moments before import.

Example Import Schedule

Jane uploads File_A to Folder1 at 12:00 (at this moment Folder1 only contains this file). The SFTP connector checks the folder at 12:01 and sends the data from File_A into the target flow in Moments. At 12:02, Jane uploads File_B to Folder1 (Folder 1 now contains File_A and File_B). The SFTP connector checks the folder again at 12:03 and sends the data from File_B into the target flow (as File_A has already been processed in an earlier run).

New users created via SFTP Import will be marked with a unique identifier in People to show how they entered the system. This data can then be filtered to allow you to track these users in the system.

If a user duplicates a flow containing the SFTP Import entry point, all files that were originally uploaded in the original flow will be uploaded to the new flow starting with the earliest file uploaded.

Upload history is not retained in the duplication process, so the new flow has no record of what happened in the original flow. When the new flow is activated, all file data will be added again. Depending on the purpose of the flow, this may cause unexpected results. This is a risk as the warning message below explains.

Important

For data consistency purposes, do not process the same file over SFTP Import in multiple flows. While it is technically possible to reuse/import the same file multiple times, it is recommended that you follow a one file, one flow policy.

If you do process the same file in multiple flows you may see different data outputs depending on which flow runs first.

Moments Flow SFTP Import Entry Point

Manage SFTP Server Connection

Manage the connection to your SFTP server by opening the SFTP Import entry point, and navigating to the SFTP Server field.

From there you can create a new connection, or edit an existing connection by selecting the server from the dropdown list and clicking the pencil icon to expand the edit connection popup.

Moments Flow SFTP Import Entry Point Edit Connection

In edit mode, you will see the number of flows that are using the connection. To ensure data integrity, you will not be able to save any edits you make to the server until all flows using this connection are finished. Click the See n instances button to view which flows use the connection.

Moments SFTP Import Server Instances

If no flows are connected to the specific connection, then you can edit the connection as you need. Remember to test the connection to make sure everything works properly.

Note

If you no longer use a server and want to delete the connection then you can also do so in edit mode. You can only delete connections that are not connected to any active flows.

Manage flow versions

To make changes to an existing or active flow that uses the SFTP Import entry point, you can create a new version of the flow.

When you launch the new flow version, any unprocessed records in the original flow version are forwarded to the new flow version.

Exit

When the flow is ready, the next step is Validation. Once you click Validate, if there are no errors to be reported, the Exit element will appear automatically after each unconnected element in the Flow. When it comes to IVR flows, the exit element will finish an active call. So, if you decide to validate the communication while the call is still ongoing, it will end.

Exit also helps calculate how many customers from a specific communication branch finished the flow.

exit-element-flow

Need assistance

Explore Infobip tutorials

Encountering issues

Contact our support

What's new? Check out

Release notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Service Terms & ConditionsPrivacy policyTerms of use