Entry points and exit
Selecting an entry point is your first stop on the way to create a personalized communication flow.
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.
Predefined Audience
Use the Predefined audience entry point to add all profiles in People that meet the specified criteria to the flow. You can define the criteria in the Predefined audience element.
For information about creating a flow, refer to the Create flow documentation.
To configure the Predefined audience entry point in a flow, carry out the instructions in the following sections:
Update audience after launch
Specify whether the audience list is updated after the flow is launched.
Select one of the following:
- Never - The audience list is static. It is limited to the audience that you define before you launch the flow. Even if a profile that was not in the audience list now meets the criteria for the list, that profile is not automatically 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 list when the flow was launched now meets the criteria (tag or real-time segment) for the audience, that profile is automatically added to the flow, while the flow is active.
Example:
The audience list includes a specific tag. This tag is applied to a Person profile in People while the flow is active. This profile is automatically added to the flow.
The audience list includes a specific real-time segment. A profile is added to this segment in People while the flow is active. 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:
- In the configuration pane for the Predefined audience element, select Add audience from People.
- Select one or more of the following types of criteria. You can select multiple options of each type.
- Tags: Adds all profiles that have the tags that you select.
- Audience segments: Adds all profiles that belong to the segments that you select.
If the Update audience after launch field is set to Never and you select a real-time segment, it functions like a snapshot segment when the flow is launched.
Real-time segments are indicated in green color. - Person profiles: Adds all profiles that you select.
- Companies: Adds all companies that you select.
To view more items, select View all.
You can also search for a specific item. After you select View all, you can access the search field.
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
With this entry point, it is possible to use multiple operators to compare data with the values that users enter before they become a part of the Flow. These operators depend on the type of the people attribute value that is being compared. The following operators are available:
BOOLEAN | TEXT | NUMBER | DATE |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Change In People Profile is the best choice when you want to wait a predetermined amount of time for a change in a specific person attribute so that this person can enter the communication flow. For instance, with Change in People Profile you can set up a Happy Birthday flow by choosing Birth Date is today.
People Real-Time Event
Record how customers interact with different interfaces, how they react to your messages, and if there are any changes in their profile information. Use these "events" to branch the communication accordingly.
The events available in the People Real-Time Event trigger are split into 4 groups:
Custom events - activity coming from other platforms such as websites and apps: purchases completed, forms filled, pages visited, etc. These events, along with any properties you want to include, need to be defined in the People module.
Important
All custom events, along with their properties, are defined in the People module.
People events – changes in profile information like an updated location or additional email address. There are standard person attributes and the ones that you can define yourself.
Channel Events – interaction within a specific channel. In the side panel, select an event from some previous communication like "email link clicked," the name of that specific flow or flow version and of the Send Email element, as well as the link from the email message.
Note
When using Wait for an Event element, you will be able to include the names of the send elements and events from the current flow.
This feature is available for active and drafted communications, but not for the finished ones.
Product Events – they happen within Infobip products. The Moments product events include "person entered flow" and "person exited flow" events. Use the event property fields to add the following:
- The name of the flow or flow version (communication) where the event occurred.
- The time period when the event happened and the number of occurrences
Each event group includes "happened" and "not happened" filters. Decide which one to use based on the communication that you want to build: whether you want to target customers because they performed or didn`t perform some action.
For a more enriched experience you can also use variables with the People Real-Time event trigger. You can set variables in any of the 4 trigger groups described above and then as the customer moves through the Flow, the variables can be changed subject to your requirements. For example, if you are using order delivery status as a variable in your flow and an item changes from Pending to Dispatched. Take a look at Flow Variables for more details.
The People Real-Time Event trigger is key in the abandoned cart campaigns when you want to remind customers that their favorite products are still awaiting them, or in other advanced multi-step campaigns.
If you want to use several audience segments at once and add the customer attributes to the mix, visit the article on the Segment Audience element.
Inbound Message
Opt for this entry point when triggering a Flow for all the end users who send a specific keyword to the number you have set up. In this way, you are creating a dynamic audience based on different conditions when you don’t know who exactly should be included in your communication. For all channels, you can store Anything or the Message body as conditions. If you select the WhatsApp channel you can also create conditions from Button Text and Button Payload.
In situations where you wish to capture where end users enter a flow based on a more defined set of keywords you can select from a number of operators to search the message body for a keyword:
- Is equal to person attribute - define the person attribute you are searching for
- Matches text - search for an exact match of text in the message body with one of the specified options. You can specify several options that will be checked with the OR condition.
- Matches RegEx - search the message body text against a standard regular expression pattern
- Contains text - search for a group of characters in the message body, such as a symbol or keyword, based on specified options. You can specify several options that will be checked with the OR conditions.
The system will follow the above order for processing inbound messages so as soon as the first condition is met, the persona will be sent to the corresponding branch of the Flow.
To cover cases where end users enter the flow regardless of the keyword they send, select Anything. You can have multiple flows using the same number and waiting for the end user's message. If this is the case and you have one flow with the exact keyword, such as Start, and another one with Anything (on the same number), the exact keyword will be used to trigger the flow. The reason is that the exact keywords have a higher priority than Anything. The same logic is applied to the Evaluate Inbound Message element.
At this entry point, you can also capture and store inbound message information. Use variables when you configure this entry point to define the data you want to collect from the inbound message. You can store sender and receiver information and message content as a variable. For each of these fields, the whole text response can be captured. Alternatively, you may want to only capture a specific keyword inside the message content via regular expression. To do this choose the regex option when creating the variable. See Flow Variables for more information.
Note
Multiple Inbound Message entry points can be added to a flow.
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.
The data related to this attribute can be populated via People API, 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.
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 “AppointmentDateTime is in 4 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:
- On the Infobip web interface, navigate to Moments.
- Select Create flow.
- Select Start from scratch.
- Select External source > Flow API.
The entry point contains a unique URL where the end users’ data will be sent. - To automatically add participants to the flow, do one of the following:
- Use the Add participants to flow endpoint to add a maximum of 1,000 participants to the flow asynchronously in a single request.
- Use the Add person to flow (deprecated) endpoint to add 1 participant to the flow in a single request.
Note
The Add person to flow endpoint has been deprecated. When you create a new flow, use the Add participants to flow endpoint instead.
- Configure the rest of the flow as required.
- 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.
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 Import entry point when you create your flow. Define how the file should be processed in the entry point sidebar menu.
OPTION | DESCRIPTION |
---|---|
SFTP Server |
Select 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 path | Set 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 files Question mark (?) to mask one exact symbol. For example, J???Data.csv will fetch both - JuneData.csv and JulyData.csv files |
Delimiter |
Select 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 Mapping |
Map 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. 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.
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.
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.
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.