Popular Bloks

Popular — common blocks. There are five blocks in the group:

  • End
  • Timer
  • Task
  • Condition
  • Check point
Popular blocks

End

Required block. All workflow paths must be ended with the End block.

End block

Timer

More detailed information >

Task

The block is used to set for the workflow one of the following tasks:

  • Create contact
  • Update contact
  • Get contact
  • Confirm contact
  • Send obligatory (transactional) email
  • Send transactional Viber message
  • Send transactional SMS message
  • Get order
  • Create promo code
  • Get promo code
  • Launch Event
Task blok

You can select the necessary task from the drop-down menu on the right.

Create Contact

The task is to create a contact in the system. If the contact with this email address already exists in the system, it will be updated. If not, a new contact will be created.

📘

Important

Use this task only when the contact data is passed via the API method Generate event, and only a part of the data needs to be specified when a contact is created. For example, you sent the event via Generate event for a new contact.

With this block, you add this contact to the system. For all other methods, this block is not needed.

Update contact

The task has 3 parameters:

  • Email: required field if you create a contact by email.
  • Phone: required field if you create a contact by phone number.
  • JSON: field contains a line or a variable with a line in JSON format with contact data (phone number, name, surname, city, additional fields). Email address is specified by default; if needed, specify other additional data.

You can pass the contactJson variable in the JSON field. In this case, REST API will validate the values passed together with this parameter. In case of passing the contact’s parameters with mistakes, the warning returns the invalid and valid values.

Request body for the JSON field:

{"firstname":"...","lastname":"...","sms":"...","town":"...","timeZone":"Etc/GMT+03","languageCode":"uk","profileInputs": [{"profileInputId":10001,"value":"..."}],"confirmed":false}

where

  • profileInputs - additional field array;
  • profileInputId - additional field ID;
  • value - additional field value;
  • confirmed - contact email address status (confirmed/unconfirmed)

📘

Important

To create an unconfirmed contact, add "confirmed":false to the request body:

{"firstname":"...","lastname":"...","sms":"...","town":"...","profileInputs": [{"profileInputId":10001,"value":"..."}],"confirmed":false}

To create a contact with a value in the date field, use the format YYYY-MM-DD:

{"profileInputs": [{"profileInputId":10001,"value":"2023/11/06"}]}

To create a contact with a value in the date with time field, use the format YYYY-MM-DDThh:mm":

{"profileInputs": [{"profileInputId":10001,"value":"2023/11/06 16:42"}]}

Update Contact

The task is to update the contact information. If the contact exists in the system, their info will be updated; if the contact doesn’t exist, the system will skip them.

Use this task to update the contact data from an event sent via the API method Generate event, or to set a fixed value of the additional field in the workflow.

Get contact

The task has 4 parameters:

  • Contact ID: contact ID in the system. If you want to update a contact not by email but by ID in the system, specify the name of the variable that contains the contact ID. For example, ${contactId} or 123345.
  • Email: required field. For example, ${emailAddress} or [email protected]. If your event has a different variable, specify it in the field. In the system events, the variable is called EmailAddress. System events are the events generated within the system (click on an email CTA, regular workflow launch, filled subscription form, reactivation with RFM analysis). For them, enter ${emailAddress} in the field.
  • Phone: required field if you update a contact by phone number. For example, ${phoneNumber}. If you have a different name for the variable in the event, specify it in the field.
  • JSON: field contains a line or a variable with a line in JSON format with contact data (phone number, name, surname, city, additional fields). Email address is specified by default; if needed, specify other additional data. The parameter confirmed is ignored.

Get Contact

The task is to get contact data and pass it to the message or to the Condition block. For example, you want to send a notification email with contact data every time a new subscriber is added to the database, or send the subscriber registration details after registration.

Get contact

The task works as follows:

  1. The event that contains contact data is created (registered) in the system.
  2. The task extracts out all available contact data stored in the database.
  3. Block passes this data to the email.

The task has 4 parameters:

  • Contact ID: contact ID in the system;
  • Email: email address of the contact;
  • Phone: phone number of the contact;
  • Token: mobile token of the contact.

Email, Contact ID, Phone, and Token are used to identify a contact. One of these fields must be filled with relevant data.

For example, if you want to identify a contact not by email but by ID in the system, specify the name of the variable that contains the contact ID. By default, it's ${contactId}.
You can use these variables in the message:

  • $!data.get('firstName') - name;
  • $!data.get('lastName') - surname;
  • $!data.get('email') - email address;
  • $!data.get('sms') - phone number;
  • $!data.get('contactKey') - contact key;
  • $!data.get('id') - contact ID in the system;
  • $!data.get('createdDate') - creation date;
  • $!data.get('updatedDate') - date of the last contact update;
  • $!data.get ('confirmed') - contact’s email address status (true - confirmed, false - not confirmed);
  • $!data.get('fields').get('12345') - additional fields. Insert an ID of the additional field instead of 12345.

For Get contact task, you can activate the Search only contact ID checkbox to search contact only by contact ID.

Search only contact ID

Confirm Contact

The task is to confirm the email address of the subscriber, add them to the system and make available for receiving.

For example, a person fills in a subscription form, their email address gets to the system and they receive a confirmation email. They can not receive promotional campaigns until they confirm subscription. A successful confirmation link triggers the Confirm contact task and starts the corresponding workflow.

Confirm contact

The task has 2 parameters:

  • Contact ID: if a contact is confirmed not by the email address but by the contact ID in the system, specify the name of the variable that contains the contact ID. By default, it is ${contactId}.
  • Email: Сontact email address.

📘

Important

When searching contacts for Create contact, Update contact, Get contact and Confirm contact tasks, the following rules apply:

  • Contact ID has the highest priority among all parameters
  • If externaiCustomerId is specified, contact search will be performed by externaiCustomerId.
  • If externaiCustomerId is not specified, contact search will be performed by email address or phone number.

Send Obligatory (transactional) Email

The task is to send an email to the contact regardless of their status in the system (confirmed, unconfirmed, unsubscribed, spam report) except for blacklisted contacts.

Send Obligatory (transactional) Email

📘

Important

Use this task only if absolutely necessary. It ignores the contact status which may result in spam reports and harm sender reputation.

Use the task only to send a transactional email (subscription confirmation, order confirmation, change in a pricing plan) to a new unconfirmed contact.

In all other cases, use the Email task from the Message or the Message to segment blocks.

The task has 5 parameters:

  • Contact ID: contact ID in the system. It can be used for contact identification instead of the email address.
  • Email: email address of the contact or the event parameter that contains an email address. The variable ${emailAddress} is specified by default. If in your event this parameter has a different title, enter it.
  • Message: required parameter. Select it from the drop-down menu or specify the message ID.
  • Language: language ID or the event parameter containing it. It is needed to create multilingual messages. Leave the field blank if you don't use Multilanguage or the language of the contacts is specified in their cards.
  • JSON: random data in the JSON format that is passed to the email. If you pass a line with such data in the event, specify the parameter name in the JSON field. For example, you pass the order data and you need to list the ordered items in the email.

The request body would look as follows:

{ "name": "items", "value": "{"array":[{"name":"Women's Grand Court Sneaker","price":"341.00","url":"https://site.com/catalog/Womens-Grand-Court-Black","imageUrl":"https://site.com/uploads/product/big/20161122/20161122_7zvb.jpg"},{"name":"Women's Cloudfoam Advantage Cl Sneaker ","price":"78.00","url":"https://site.com/catalog/Womens-Advantage-Sneaker-Metallic","imageUrl":"https://site.com/uploads/product/big/23112013/2125.jpg"}]}" }

The example contains items. Accordingly, in the JSON field, ${items} is specified.

Send Transactional Viber Message

The task is to send a Viber message to the contact regardless of their status in the system.

Send Transactional Viber Message

The task has 6 parameters:

  • Contact ID: contact ID in the system. It can be used for contact identification instead of the phone number.
  • Phone: required parameter. A phone number of the contact or the event parameter containing it. The variable ${phoneNumber} is specified by default. In your event, the variable may be called ${SMS}, ${Phone}.
  • Message: required parameter. Select it from the drop-down menu or specify the message ID.
  • Message activity time (TTL): the period after which the message will not be displayed if it has not been delivered by this time
  • Language: language ID or the event parameter containing it. It is needed to create multilingual messages. Leave the field blank if you don't use multilanguage or the language of the contacts is specified in their cards.
  • JSON: random data in the JSON format that is passed to the message. If you pass a line with such data in the event, specify the parameter name in the JSON field.

Send Transactional SMS Message

The task is to send an SMS message to the contact regardless of their status in the system.

Send Transactional SMS Message

The task has 5 parameters:

  • Contact ID: contact ID in the system. It can be used for contact identification instead of the phone number
  • Phone: Required parameter. A phone number of the contact or the event parameter containing it. The variable ${PhoneNumber} is specified by default. In your event, the variable may be called ${SMS}, ${Phone}.
  • Message: required parameter. Select it from the drop-down menu or specify the message ID.
  • Language: language ID or the event parameter containing it. It is needed to create multilingual messages. Leave the field blank if you don't use multilanguage or the language of the contacts is specified in their cards.
  • JSON: random data in the JSON format that is passed to the message. If you pass a line with such data in the event, specify the parameter name in the JSON field.

📘

Important

When searching contacts for Send obligatory (transactional) email, Send transactional Viber message and Send transactional SMS message tasks, the following rules apply:

  • Contact ID has the highest priority among all parameters
  • If externaiCustomerId is specified, contact search will be performed by externaiCustomerId.
  • If externaiCustomerId is not specified, contact search will be performed by email address or phone number.

Get Order

The Task block extracts the data from an order and passes it to the message. For example, order status – order confirmation, order delivery.

Use this task only if you send the order data to our platform using the Add orders API method.

Get Order

To configure the Get order task block:

Click the Get order by dropdown list and select one of the following options:

  • Order ID. Choose this option when you wish to get the order data by the ID generated by our system.
  • External Order ID. Choose this option when you wish to get the order data using the order ID that you pass to our system.
Get order by options

You don’t have to fill in the Order ID/External order ID field. The task extracts automatically all the parameters from the order event.

The task works as follows:

  1. The system receives the order information.
  2. The task extracts all the data from the order and passes it to the email as variables.

Read more about the Task block in the Order automation article.

Create Promo Code

The task is to generate a promo code and pass it to a message that goes next in the chain. The algorithm encrypts the parameters by your key, and the reverse algorithm decrypts it when a promo code is entered on the website. Learn more.

Create Promo Code

The task has 4 parameters:

  • Days: number of days until the promo code is expired. The system will add them to the current date, and the resulting expiration date will be encrypted into the promo code. The variable ${days} is specified by default.
  • Type: promo code type. You can set up 32 promo code types. For example, assign type 0 to a subscription promo code, type 1 to a birthday code, type 3 to reactivation code, etc. Pass in the variable the number from 0 to 31 that corresponds to the right type. The variable ${type} is specified by default.
  • Discount: size of the discount. Used to generate a promo code when a discount is given as a % off the order cost. It is always a double-digit number, so discounts of up to 10% should go with zero ahead. For example, specify 05 for an email with a 5% discount. The variable ${discount} is specified by default.
  • Key: encryption key. You can leave the default value. The variable ${key} is specified by default.

📘

All parameter fields are required.

In a workflow, this block is followed by one of the Message blocks (Email, SMS, Viber, etc.).

Workflow to create a promo code

For example, in the email template, you can put a variable $!data.get ('promocode') in the place intended for a promo code.

Promo code variable

Get Promo Code

The task is to pass a promo code from the base to the email. More about uploaded promo codes.

Get promo code

The task has three required parameters:

  • Days: number of days after the current date during which the promo code is valid;
  • Type: promo code type;
  • Discount: discount size from 01 to 99.

The system selects promo codes from the downloaded database based on the specified parameters.

Let's look at an example. Enter the following values in the parameters: days - 10, type - newyear, discount - 25.

Get Promo Code example

The workflow will extract from the database a promo code with a 25% discount, identified by the type newyear and having a validity period of at least 10 days. If several promo codes meet the specified parameters, the system will automatically choose one of them.

After the Get Promo Code block, you place the block for sending messages (Email, SMS, Viber, etc.).

Workflow to get a promo code

In the email template, put a variable $!data.get ('promocode') in the place intended for a promo code.

Launch Event

The task is to launch any event from the workflow. For example, one workflow can trigger the launch of another. To use the task, you need to previously create the event you plan to launch.

Launch event

The task has 3 parameters:

  • Event: required field. Select the type of the event to launch.
  • Unique key: key of the event you’re launching, for example, a variable with an email address. If the field is not filled, the key from the event that triggered the current workflow will be used.
  • Parameter: array of parameters we want to pass to a launched event. If the field is not filled, the parameters from the event that triggered the current workflow will be passed.

The format of the parameters:

[{"name":"paramName,"value":"parameter value"}]

Condition

The block is used to check whether certain workflow conditions are met or not. Depending on this, the workflow is further split into two paths - Yes or No - with separate downstream tasks.

The block has one Start block and two End blocks (for Yes/No paths).

Condition block

The Condition block has 7 tasks:

  • Check event
  • Variable matches regular expression
  • Contact confirmed
  • Contact exists
  • Check parameter by date/time value
  • Verify contact field matches event parameter
  • Check the checkbox list fields

Check event is a default task. When needed, choose the necessary task from the drop-down menu.

Check Event

The task is to check whether a particular event occurred since the workflow was launched. Events are searched by keys.

Check event

The task has 3 parameters:

  • Unique key: event key. For example, it can be an email address; thus, this field should contain a parameter with an email address. This is a parameter from the event that launched the current workflow. If it's emailAddress, enter ${emailAddress} in the field.
  • Event: event type. This is a required field without which the workflow will not start.
  • Period: you can set the time before the start of the workflow, during which the event must be checked. By default, the block checks for events since the activation of the workflow.

Variable Matches Regular Expression

The task is to check a certain variable from the event or the data received from other blocks.

For example, you can check if your recipient is a male or a female and send them different messages.

Variable matches regular expression

The task has 2 parameters:

  • Name: variable name. It could be an event parameter. The parameter name is entered in this field without ${}. If you check the data obtained by other workflow blocks (for example, Get contact), specify the system variable smartMessageJson in the field.
  • Pattern: regular value checked for compliance. For example, to check whether the event parameter address contains the word “London”, specify London in the Pattern parameter.

Contact Confirmed

The task is to check whether the contact's email has been confirmed.

Contact confirmed

For example, a person has subscribed to your newsletter, and you want to send a welcome email.

The task works as follows:

  1. The contact is added to the eSputnik database but has an unconfirmed status.
  2. A confirmation email is sent to the contact.
  3. The task checks whether the subscription is confirmed.
  4. If it is confirmed, the Yes path is triggered, and a welcome email is sent.
  5. If it isn’t confirmed, the No path is triggered.

The task has 2 parameters:

  • Email: contact’s email address;
  • Contact ID: contact’s ID in the system.

By default, the system checks whether the contact is confirmed by email. Specify the name of the variable or the email address in the Email field. For example, ${emailAddress} or [email protected]

If you want to use a contact ID for confirmation, specify ${ContactId} in the Contact ID field.

One of the parameters must be specified.

Contact Exists

The task is to check whether the contact exists. It works similarly to Contact confirmed.

Contact exists

The task has 3 parameters:

  • Email;
  • Phone;
  • Contact ID.

By default, the system uses an email address. If you want to use a contact ID, specify ${contactId} in the Contact ID field. To identify a contact by phone number, specify ${phoneNumber} in the Phone field.

Check Parameter by Date/Time

The purpose of the task is to check the date from the event parameter.

Check parameter by date/time

When creating a workflow, the user's time zone is taken into account. Time will be saved in UTC.

For example, The date and time being checked is 2020-07-30 13.00. The user's time zone is GMT +3 (Europe/Kyiv). The following value will be passed to the event: "2020-07-30T13:00 + 03:00".

The task contains 2 parameters:

  • Parameter. It is required to state the parameter's value passed in the parameter. By default, this is a variable ${parameter}. The date is in ISO 8601 format.
  • Date. Select an option from the list for a single date, time or the date/time range.

Parameter

The Parameter field accepts the parameter name in the system.

Enter the parameter name as a variable or a string. The format example: ${userId} or 123abc.

Selecting the Date and/or Time Settings

To select the date and/or time settings:

  1. Click the down arrow and select one of the options from the list:
    • Date
    • Date with time
    • Date range
    • Time range
    • Date/time range
    • Date before
    • Date after
    • Date and time is greater that current by
Date and/or time settings
  1. Configure the required date and time settings for the selected parameter as explained below.
Configuring the Date settings

When you select the Date parameter, the Condition block checks if the event date matches the selected date for this parameter.

To select the Date settings:

  • Click the calendar icon and select the required date.
Calendar icon

📘

Top Tip

Click the left or right-pointing arrows to change the month, or click the section of the calendar to switch to the month or year selection.

Month or year selection
Configuring the Date with time settings

When you select the Date with the time parameter, the Condition block checks if the event date matches the selected date and time for this parameter.

To select the Date with time settings:

  1. Click the calendar icon and select the required date in the date selection window.
  2. In the hour selection window, select the required hour.
Date with time settings
Configuring the Date range settings

When you select the Date range parameter, the Condition block checks if the event date matches the selected date range for this parameter.

To select the Date range settings:

  1. Click the date beside the left field and select the initial date of the range.
  2. Click the date beside the right field and select the final date of the range.
Date range settings
Configuring the Time range settings

When you select the Time range parameter, the Condition block checks if the event time range matches the selected time range for this parameter.

To select the Time range settings:

  1. Click the time beside the left field and select the initial time from the time selection window.
  2. Click the time beside the right time field and select the end time from the time selection window.
Time range settings
Configuring the Date/time range settings

When you select the Date/time range parameter, the Condition block checks if the event date and time range match the selected date and time range for this parameter.

To select the Date/time range settings:

  1. Click the left date and select the required initial date in the date selection window.
  2. In the hour selection window, select the required hour.
  3. In the minute selection window, select the precise time. The time values in this window are within the range of 1 hour with an increment of 5 minutes.
  4. Click the right date and select the final date, hour and minutes, the same as for the initial ones.
Date/time range settings
Configuring the Date before settings

When you select the Date before parameter, the Condition block checks if the event date received as a parameter is within the date range before the selected date.

To select the Date before settings:

  • Click the calendar icon beside the date field and select a date.
Date before settings
Configuring the Date after settings

When you select the Date after the parameter, the Condition block checks if the event date received as a parameter is within the date range after the selected date.

To select the Date after settings:

  • Click the calendar icon beside the date field and select a date.
Date after settings

📘

Note

The selected date for the Date before and Date after parameters is not included in the period.

Configuring the Date and time is greater than current by settings

When you select the Date and time is greater than current by option, the Condition block checks if the event date and time received as a parameter are greater than the current date and time by N minutes/hours/days.

Example:

The date and time of your webinar is 2022-10-10, 16:00.

You have configured to send 3 messages to the registered persons: 30, 10 and 5 minutes before the webinar start.

The person’s registration date and time is 2022-10-10, 15:52 (the current date and time).

The Condition block compares the current time and the time from the event parameter. As the result of the comparison:

  1. Sending the first message is cancelled because the condition for sending the message (30 minutes before the event) is false.
  2. Sending the second message is cancelled because the condition for sending the message (10 minutes before the event) is false.
  3. The third message will be sent as scheduled because the condition for sending the message (5 minutes before the event) is true.

To configure the Date and time is greater than current by option:

  • Enter the required value in the field and select its format from the dropdown list: minutes, hours or days.
Date and time is greater than current by settings

Verify Contact Field Matches Event Parameter

The task allows checking if the contact field matches the passed value in the event parameter.

For example, you want to check if the subscriber's city matches the city value passed in the event. If that is not true, you can place the contact update block downstream.

Verify contact field matches event parameter

The task contains 5 parameters described in the table below.

ParameterDescription
Contact IDThe contact ID in the system
EmailThe contact’s email address
PhoneThe contact’s phone number
Contact fieldThe field from the contact information that has to be verified.
Click the down arrow to select a field from the dropdown list or enter the field’s name in the box.
You can compare the following field types:
- Text box
- Text area
- Number
- Fractional number
- Dropdown list
ParameterThe event parameter. The task checks if the contact’s field matches this parameter.
You can enter the value as a variable in the format of ${parameterName} (the parameter’s name in an event, for example, ${city}), and in this case the contact’s field is compared with the value of the parameter in the event.
Using the 123abc format is acceptable (for example, Kyiv), in this case the contact’s field is compared with the specific value in the parameter (Contact's field 123abc?). Select case sensitive if this operation is case-sensitive.

The first three parameters are used to select the contact identification method. You have to enter the corresponding data in one of these fields for the correct functioning of a task.

For example, if you wish to identify a person by the ID in the system, enter the ${contactId} variable.

You can leave these fields empty in the case if you place the Get contact block before the Condition block with the Check contact field is equal to parameter from event option. In this case, the contact will be identified on the basis of the identification specified in the contact’s settings.

Check the Checkbox List Fields

The purpose of the task is to check for empty or specific checkboxes in the contact card.

Check the checkbox list fields

The list of checkboxes displays checkboxes created in the Additional fields section.

The following checking options are available:

  • Check for empty checkbox fields options
  • Check for specific checkbox field options
  • Check for the presence of one of the specific checkbox field options

Check Point

The block does not perform any task except that it fixes in the log the passage of the checkpoint in the workflow. If you have a complex workflow with paths, add this block at any point in the workflow to see if it ran a particular path. Check point can also be used to bridge multiple paths. Not all blocks allow connection to several paths, and this block solves this issue.

Check Point

The block has 1 parameter:

  • Name: specify the name of the check point.

In Automation → Event history, use Check point’s name to track whether the workflow has passed this point or not. This helps debug the workflow.