Blocks Description (General Group)

General Group contains the following blocks:

Start Block

Required block, that starts the script. The scenario does not start working if this block is omitted. There can be only one start block in one scenario.

 

End block

Required block, can be used several times in. The scenario does not work if this block is omitted. Block indicates the end (completion) of the script. It’s necessary to end all the paths (branches) of the scenario with the End block.

Настройка блоков в сценарии

Timer block

The block is used to create a timeout in the scenario process. In fact, it’s a pause to stop and restart the scenario again.

It precedes the block where a pause is planned.

Блок Таймер в сценарии

For example, as a person subscribes to the mailing, the scenario starts. There will be a one-minute timeout in the scenario before sending the first email. After that, there will be one-day timeout a second email to complete this particular scenario.

There are 3 parameters in this block:

  • wait
  • send
  • sending time

To operate the Timer block, you should select at least one parameter.
 
Wait parameter feature

Параметры блока "Таймер"
This parameter allows to preset the necessary timeout for the scenario to go on. It features minutes, hours, days, months along with minutes, hours, days and months correspondingly.

 


Important! If you set a timeout for 1 (2.3) days the scenario will be restarted in 24 (48, 72) hours after its activation. So, in case, your client has subscribed for mailing at 15:00, the email will be sent at 15:00 the next day.
 

Send parameter.

Настройка блока "Таймер"The parameter for a sending day to be preset. This is a good option for running regular automatic mailings.


Important! When it’s Wednesday, and you chose to send on Monday, an email will be sent next Monday (ie, a few days later). If it is Monday today the email will be sent today.
 


 

 

 

 

 

 

                                                    Sending time parameter

Параметр Время отправки
It follows the principle of Send parameter. If you set the sending time at 8:45, and the scenario started at 15:00, the email will be sent at 8:45 the next day.

You can select one or more parameters to configure the Sending Timer block.

Important! Mention the logic in the block.
For example, you have set the following parameters:

  • wait for 1 day
  • send on Monday
  • sending time 7:45.

 

The scenario was launched on Sunday at 15:00. The timeout is 1 day (24 hours). It's Monday. The end time for the " wait 1 day" parameter in our example is at 15:00 on Monday. The "Send" parameter preset for Monday is checked and meets the current day - Monday. This logic is complied. The system checks the "Sending time" parameter of 7:45, and now it's 15:00. The conditions are not complied and so the email will not be sent this Monday, but only the next at 7:45.

Be attentive to preset the parameters!

Task block

This block is made to complete some specific task.

There are 12 tasks in the system at the moment:

Confirm contact logic

The task is to confirm the subscriber's email address and make it active in the system.

For example, when a person fills a subscription form, the contact is transmitted to eSputnik with an unconfirmed email. A confirmation link is sent to the e-mail. Until the confirmation link is followed, the contact remains unconfirmed in the system and is not added to mailing groups. After the link is activated, a confirmation scenario will be launched. The Confirm contact task complied and the contact becomes active in the system.

This is the simplest scenario of confirming the contact.

Сценарий подтверждения контакта

There are 2 parameters In this task:

  • Contact Email - This field defaults to $ {EmailAddress}, so you can leave this field blank. You only change it if you create your own parameter that contains the person's email.
  • Contact ID - If you want to confirm the contact not by email, but by his/her id in the system - you specify the name of the variable that contains the contact id. By default, the system is called $ {ContactId}.

Create contact logic

The task is used to create a contact with unique email. In case an email address already exists, it will be updated. If not, a new contact will be created.

 Important! If the contacts are transmitted via specialized API method, the contact creating block is omitted. This block is only needed for very specific tasks when you need to pass the data on a contact in an event using the / v1 / event method.

Создать контакт

There are 2 parameters of the task:

  • Email is a required field. By default, there is already a variable $ {EmailAddress}, which unplugs the email data via the API. It can’t be traced, but it is preset by default. Thus the block can be blank, you can skip adding any prescription in it.
  • Json - this field specifies a line or a variable containing a line in JSON format with data for contact fields complying (phone, name, surname, city, additional fields).

The Data format sample for the field:

{"firstname":"...","lastname":"...","sms":"...","town":"...","profileInputs":[{"profileInputId":10001,"value":"..."}],"confirmed":true}
profileInputs - additional fields array, profileInputId - id of the additional field, value - value of the additional field, confirmed - the status of the email address of the contact (confirmed / not confirmed).
 

Contact update

The task is used to update contact information in the system, follows the create contact task. The only difference is in updating the existing contacts. If there is no unique contact, the system will skip the task and the contact will not be created.

The task is effective when it’s necessary to update contact data from the event passed by API using the / v1 / event method or if you need to specify a fixed value for the additional field in the script.

Задача Обновить контакт

The parameters for the task are:

  • Email is a required field for the task. By default, there is already a variable $ {EmailAddress}, which unplugs the email data from the incoming data via the API.It can’t be traced, but it is preset by default. Thus the block can be blank, you can skip adding any prescription in it.
  • Json - this field specifies a line or a variable containing a sline in JSON format data for contact fields complying (phone, name, surname, city, additional fields). The data format is the same as for the Create Contact task, but the confirmed parameter is ignored.

Timebound email

The goal of the task is to send an email to the contact despite its status in the system. This email is sent to whatever group of contacts (confirmed, unconfirmed, unsubscribed, in spam), except blacklisted contacts.

 Important! Use this block in urgent cases as while ignoring the status of the contact it can cause spam abuse increasing. Be sure to send a timebound letter for a new (yet unconfirmed) subscriber as a confirmation link, e.g. Otherwise, use the Email block to send the messages.

Задача Обязательный емейл

The block combines 4 parameters:

  • Message is a required field. Select a pre-created email to be sent.
  • Contact email is a field for inputting an event parameter with the recipient's email address. By default, this field is set to the standard parameter from the system events eSputnik $ {EmailAddress}.
  • Contact ID is the contact ID in the eSputnik system. Can be used to identify the recipient instead of the email address.
  • JSON - custom data in the JSON format to be transmitted the letter. In case a line with such data is transmitted in the event parameter, the parameter should be copied in the field.

Receive a promo code

The block unplugs promo code in the system and sends it to the letter. Learn more about promo codes.

Параметры блока Задача

The task has only one custom parameter - days.

  • days - the period of promo code validity (preset in days).

This block in the scenario is followed by a send message block (Email or SMS). In the letter the promo code will be submitted with variable $!data.get('promocode').


Receive a Promo code (with a capital letter)

The block unplugs promo code in the system and sends it to the letter. Learn more about promo codes.


Получить промокод
 

There are 3 required parameters:

  • days - the period of promo code validity (preset in days)
  • type - the type of promo code you specified for segmentation
  • discount - the discount rate from 0 to 99.

Let’s consider an example with the following preset parameters:

  • days - 10
  • type - newyear
  • discount - 25

This means that the scenario will unplug promo code with a 25% discount, out of newyear group and valid for at least 10 days. If several promo codes fall under this criterion, the system will choose one of them.

This block is followed by sending message block (Email or SMS). In the letter the promo code will be submitted with variable $!data.get('promocode').

Create a promo code

The task is to create (generate) a promo code and transmit it to a letter that follows the chain. In this case, the promo code will be generated by the eSputnik system and transmitted to the email. Read more.

Параметры блока Задача
 

The task has 4 parameters:

  • Days - indicates the number of days before the promo code expires.
  • Type - indicates a number from 0 to 9.
  • Discount - discount amount. If you want to generate a promo code for which you give a gift to the customer - put a 0 in the discount field.
  • Key - the encryption key. It can be unchangeable.

All parameters are required to be complied.
This block is followed by sending message block (Email or SMS). In the letter the promo code will be submitted with variable $!data.get('promocode').

Receive the order

The purpose of the task is to unplug the data about the order and send it to the letter. The task is effective if you transfer the order data to eSputnik using the API method. Read more about how to work with orders.

Получить заказ

The task can be used in scenarios as orders confirmation and delivery notification, wherever order data is needed.

The task work as follows:

  • the system receives order data
  • this block unplugs the data transmitted with the order
  • extended data are sent to the letter

Abandoned views via email

The goal of the task is to unplug the information about the viewed products and send them to the letter. The task is only effective while transmitting data about abandoned views to eSputnik through the Softcube system. Read more.

Брошенные просмотры


The task works as follows:

  • the system receives information about abandoned views.
  • The block extracts all the data transmitted with the dropped view.
  • The received data are sent to the letter.
  • The letter indicates several viewed products along with recommendations.

The task has 4 required parameters:

  • tenantId - unchangeable
  • apiKey - unchangeable
  • blockId - a service parameter. The correct value is assured by the support service
  • email - email of the abandoned view customer. Normally this field contains the parameter $ {contacts}

Abandoned carts via email

The goal of the task is to extract the data about the unfinished order and to transfer them to the email. The task is only efficient when the abandoned carts data is transmitted to eSputnik through the Softcube system. Read more.

Брошенные корзины

The principles are similar to the Abandoned views by email:

  • The system receives information about non-completed order
  • The block extras all the data transmitted with the non-completed order.
  • The received data are sent to the letter.

The task has 4 required parameters:

  • tenantId - unchangeable
  • apiKey - unchangeable
  • blockId - a service parameter. The correct value is assured by the support service
  • email - email of the abandoned view customer. Normally this field contains the parameter ${contacts}

Recommendations by email

The goal of the task is to transfer data with recommendations to the email.

The task works on the same principle as Abandoned views via email and Abandoned carts via email. Instead of abandoned views and unfinished order the information of recommendations is extracted.

Рекомендации по емейл

The task has 4 required parameters:

  • tenantId - unchangeable
  • apiKey - unchangeable
  • blockId - a service parameter. The correct value is assured by the support service
  • email - email of the abandoned view customer. Normally this field contains the parameter ${contacts}

Receive a contact

The purpose of the task is to extract the contact information and send it to the letter (or serve the Condition Block). For example, it’s necessary to timebound a notification email with contact information every time a new subscriber is registered. Another option is to send the client’s own registration data via email.

Получить контакт

The task works as follows:

  • an event containing contact information is created (logged) in the system
  • the block extracts all the contact data stored in the database
  • received data is sent to the letter

The block has 3 parameters:

  • ContactId - contact id in eSputnik system
  • EmailAddress - email address of the contact
  • Phone is the phone number of the contact.

The Contact Email, Contact ID and Phone options are used to select the contact's identification method. One of these fields should be filled with appropriate data.

For example, if it’s necessary to identify a person by ID instead of email, the name of the variable that contains the contact id is specified. By default, it refers the system ${ContactId}.

In the email, you can use the following variables:

  • $!data.get('firstName') - name
  • $!data.get('lastName') - last name
  • $!data.get('email') - email address
  • $!data.get('sms') - telephone number
  • $!data.get('contactKey') - the key of the contact
  • $!data.get('id') - the id of the contact in the system
  • $!data.get('createdDate') - creation date
  • $!data.get('updatedDate') - the date the contact was last modified
  • $!data.get('confirmed') - the status of the email address of the contact (true - confirmed, false - not confirmed)
  • $!data.get('fields').get('12345') - additional fields. 12345 - id of the additional field.

Launch the event

The goal of the task is to launch an event from the script. For example, to run different scenario from the same script. To use the task the type of events that we plan to launch should be previously created.

Запустить событие

The task has 3 parameters:

  • eventTypeId - Required. Here the type of events to be run should be preset
  • keyValue - is the key for the event to be started. For example, there might be a variable containing an email. If the field is not valid - the key from the event that started the current scenario will be applied
  • params - is an array of parameters that are passed to the triggered event. If not filled, the parameters from the event that started the current scenario will be passed. The format of the parameters is:
    [{"name":"paramName,"value":"значение параметра"}]

Condition Block

The purpose of the block is to check whether certain scenario conditions are complied or not. According to the condition, the further scenario is divided into two branches:

  • if yes - the scenario performs one action
  • if not - another

The block has one input and two outputs (the first - if Yes, the second - if No).

The block has 5 tasks:

Check Event

The purpose of the task is to check whether the necessary event took place or not since the script was launched. Events are searched by keys.

Проверка события

The task has 2 parameters:

  • The key defines the event key for searching. For example, the email address is used as the keys to the events being scanned. Thus, in this field there should be a parameter containing the email address. This is a parameter from the event that started the current script. If it is called Email Address, then it should be ${EmailAddress} in the field
  • The type of event defines the type of events to be checked

Variable matches a regular expression

The goal of the task is to check a certain variable from the event or data received by other blocks and to correct the further scenario flow correspondingly.

For example, the sex of the user can be defined (a man or a woman) and the condition for the script can be adjusted.

Переменная соответствия

The task has 2 parameters:

  • Name - the name of the variable to be checked. This can be a parameter from an event. Note that in this field the name of the parameter is written without ${}.
    If we check the data received by other blocks of the script, then we need to use the system variable smartMessageJson.
  • Pattern - a regular expression for matching with the data is checked. For example, it’s necessary to check the parameter "address" from the event contains the text "Kiev". In this case, write in the pattern .*Kiev.*

Contact confirmed

The purpose of the task is to check whether the contact's email is confirmed or not, and, according to the result the further flow of the scenario can be adjusted.

Контакт подтверждён

How does it work

For example, a person registered on the site or subscribed to your mailing and a welcome email should be sent.

In this case:

  • the contact appears in the eSputnik database, but has an unconfirmed status;
  • an email is sent to the person requesting confirmation of registration;
  • the task checks whether the person confirmed the registration or not;
  • if confirmed - the scenario goes on the branch Yes and sends a welcome email;
  • if the registration is not yet confirmed - the scenario goes on the branch No.

The task has 2 parameters:

  • EmailAddress - email address of the contact
  • ContactId - the id of the contact in the system

By default, the system verifies if the contact confirmed or not by email. To prescribe ID identification of the contact the ${ContactId} variable should be set in the ContactId field.

Contact exists

The purpose of the task is to check whether there is a contact or not and adjust the further flow of the scenario. It works similarly to the Contact confirmed task.

Контакт существует

The task has 2 parameters:

  • EmailAddress
  • ContactId

By default, the system checks whether the contact exists or not by email.To prescribe ID identification of the contact the $ {ContactId} variable should be set in the ContactId field.

Read more

Part 2. Block description (Action group)

Part 3. Block description (Conditions Group)