General Blocks

General blocks are basic blocks necessary to build a workflow. There are six general blocks in the eSputnik system:

  • Start;
  • End;
  • Delay;
  • Date timer;
  • Task;
  • Condition.

General blocks in the eSputnik system

Start

This block is a required block to create a workflow. It automatically appears in a new workflow by default. To add it manually, click the block icon on the left or drag it to the workflow. There can only be one Start block in the workflow.

To check the contact before the workflow start (whether it’s included in the corresponding segment, or has already been transmitted in the event), enable Complete a workflow for the contact before start and select one of the conditions:

  • By event;
  • If the contact is included in a segment.

General blocks in the eSputnik workflow editor

By Event

With this condition enabled, the workflow will not start for the contact who is already assigned to a certain event (for example, they signed up for a training course earlier and already received corresponding campaigns);

In Exit on event, select the event that can trigger workflow completion.

General blocks in the eSputnik workflow editor

${eventKey} in Event key is set by default. It’s a unique key (most often contact’s email address) assigned to each event at its creation. You can find it in Automation > Event history.

General blocks in the eSputnik workflow editor

Important!

There should be the same event key for the event that starts the workflow and the event that ends it.

If the Contact Is Included in a Segment

General blocks in eSputnik

In Segment, select the segment that can trigger workflow completion for the contact if they are included in this segment.

The contact can be found in the system by one of the following parameters:

  • phone number;
  • email address;
  • contact ID.

End

This block is also required. It ends the workflow, and can be used several times. All workflow paths must be ended with the end block.

General blocks in the eSputnik editor

Delay

The block is used to set a time gap before the next action or message sending. It is placed before a block you want to delay.

General blocks in the eSputnik workflow builder

In the example, contact confirmation triggers the workflow with a drip welcome series. A new contact receives a welcome email straight after confirmation, then a second email after two days, and a third after next three days.

To set up Delay, configure 3 parameters:

  • Wait;
  • Send;
  • Send time.

Blocks in the eSputnik workflow editor

You can configure all parameters or only one; at least one parameter should be configured to start a workflow.

Wait

Blocks in eSputnik

Enter the time of delay, and select the parameter to which it will be applied:

  • minutes;
  • hours;
  • days;
  • months.

Important!

If you delay for 1/2/3 days, the delayed action will start 24/48/72 hours after the workflow is triggered. If a person subscribes to you at 7 a.m., they will receive the first email at 7 a.m. the next day.

Send

Blocks in the eSputnik editor

Here you can select the day of sending.

Important!

If today is Tuesday and you've chosen to send on Monday, the message will be sent next Monday. If it's Monday today, the subscriber will receive the message today.

Send time

General blocks in the eSputnik workflow editor

Here you can select the hour of sending. If you set the sending time at 8:45 a.m. and the workflow starts at 3:00 p.m., the subscriber will receive the message at 8:45 a.m. the next day.

Parameter Priority

Say, you've configured the following delay parameters:

  • wait day;
  • send on Monday.
  • send time at 8:45 a.m.

The workflow starts on Sunday at 3 p.m. The system waits for 1 day (24 hours). Then it's Monday. The Wait 1 day parameter expires at 3 p.m. on Monday. The system checks the Send parameter. You have chosen Monday, today is Monday, so far everything is fine.

The system checks Send time. It’s set for 8:45 a.m., and the workflow is triggered at 3 p.m. The subscriber will receive the message not this Monday but only the next one at 8:45 a.m.

Configure the settings carefully!

Date Timer

The block is used to send a message days/hours/minutes before the date and time you send in the event.

Description of general blocks

In In, specify when before the event to send the message: 1 hour, 3 days, 10 minutes, etc.

In Before date, you can take the required date from the sent event. In the box below insert the parameter name from the event, for example, ${date}.

Important! There are two supported formats for the date and time:

  1. UTC: 2011-12-03T10:15:30;
  2. UTC offset: 2011-12-03T10:15:30+02:00.

The UTC offset is the difference in hours and minutes from UTC for a particular place and date. UTC+02:00 is used in some countries of Central Africa Time, Eastern European Time, and South African Standard Time. See the full list here.

Task

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

  • Confirm contact;
  • Create contact;
  • Obligatory email;
  • Create promo code;
  • Update contact;
  • Get order;
  • Launch event;
  • Get contact;
  • Get promo code.

General blocks in the eSputnik builder

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 Sputnik system and they receive a confirmation email. They can not receive promotional campaigns until they confirm subscription. A successful confirmation link triggers the task and starts the corresponding workflow.

Task block

The task has 2 parameters:

  • email: contains the variable ${EmailAddress} by default so you don’t need to fill it. You only change it if you create your own variable that contains an email address.
  • 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}.

We recommend that you leave the default settings in this block. If your workflow needs adjustments, please contact support.

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.

Important!

Use this task onlywhen the contact data is passed via the API method /v1/event, and only a part of the data needs to be specified when a contact is created. For example, you sent the event via v1/event for a new contact. With this block, you add this contact to the system. For all other methods, this block is not needed.

Task block

The task has 3 parameters:

  • Contact’s email: required field. By default, it contains the variable ${email}. If your event has a different variable, specify it in the field.
  • Phone: required field if you create a contact by phone number. By default, it’s filled with the variable $'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.

Request body for the json field:

{"firstname":"...","lastname":"...","sms":"...","town":"...","profileInputs":

[{"profileInputId":10001,"value":"..."}]}

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 DD/MM/YYYY:

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

To create a contact with a value in the date with time field, use the format DD/MM/YYYY HH:mm":

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

Obligatory Email

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

Task block

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 task Email form the block Actions.

The task has 4 parameters:

  • email: field for a contact’s email address. By default, it contains the variable ${EmailAddress}.
  • message: required field. Select a pre-created email to be sent from a drop-down menu.
  • contact_id: contact ID in the eSputnik system. It can be used for contact identification instead of the email address.
  • 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.

Create Promo Code

The task is to create (generate) a promo code and pass it to a message that goes next in the workflow. The algorithm will encrypt the parameters by your key, and another algorithm will it will decrypt it when the promo code will be entered on the website the reverse algorithm. Learn more.

Task block

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.
  • 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.
  • 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.
  • key: encryption key. You can leave the default value.

Important!

All parameter fields are required.

In a workflow, this block is followed by one of the Actions blocks (Email, SMS, Viber, etc.). For example, in the email template, you can put a variable $!data.get ('promocode') in the place intended for a promo code.

General blocks in the eSputnik workflow editor

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 /v1/event, or to set a fixed value of the additional field in the workflow.

Task block

The task has 3 parameters:

  • contact’s email: required field. By default, it contains the variable ${email}. 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. Specify the variable $'phoneNumber in the field. 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 Order

The task is to extract the data out of the order and pass it to the message. It can be used in workflows that include transactional messages (order confirmation, delivery, etc.). Use the task only if you send order data to eSputnik via the API method v1/orders. More details on order automation.

Task block

The task works as follows:

  1. Order information is sent to the system.
  2. The task extracts all the data that goes with the order.
  3. Block passes this data to the email in the form of variables.

You don’t have to fill any fields for this task. All parameters are automatically taken from the order event.

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.

Task block

The task has 3 parameters:

  • eventTypeId: required field. Select the type of the event to launch.
  • keyValue: 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.
  • params: 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"}]

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.

Task block

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:

  • ContactId: contact ID in the eSputnik system;
  • EmailAddress: email address of the contact;
  • Phone: phone number of the contact;
  • MobPushToken: mobile token of the contact.

EmailAddress, ContactId, Phone, and MobPushToken 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.

Get Promo Code

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

Task block

The task has 3 parameters (all are required):

  • 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.

Based on them, the system selects promo codes from the loaded base.

For example, we have the following parameters: days - 10, type - newyear, discount - 25. The workflow will extract from the newyear segment a promo code with a 25% discount that is valid for at least 10 days. If several promo codes meet these criteria, the system will choose one of them.

In a workflow, this block by message sending block (Email, SMS, Viber, etc.). In the email template, put a variable $!data.get ('promocode') in the place intended for a promo code.

Condition 

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

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

The Condition block has 4 tasks:

  • Check event;
  • Variable matches regular expression;
  • Contact confirmed;
  • Contact exists.

General blocks in the eSputnik workflow editor

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

Check Event

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

General blocks in the eSputnik workflow editor

The task has 2 parameters:

  • key: event key. For example, it can be an email address; thus, this field should contain a parameter with an email address. If it's EmailAddress, enter ${EmailAddress} in the field.
  • type: event type. This is a required field without which the workflow will not start.

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 who your recipient is - male or female - and send them different messages.

General blocks in the workflow editor

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 blocks of the workflow (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 email of the contact has been confirmed.

General blocks in the workflow editor

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:

  • EmailAddress: email address of the contact;
  • ContactId: contact ID in the system.

By default, the system uses the variable EmailAddress with the email address to check whether the contact is confirmed. If the event variable is called different, specify ${event variable name} in the parameter field, for example, ${MailAddress}.

If you want to use a contact ID for confirmation, specify ${ContactId} in the ContactId 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.

General blocks in the eSputnik workflow editor

The task has 3 parameters:

  • Contact’s email: email address of the contact;
  • Phone: Phone number of the contact.
  • ContactId: contact ID in the system.

By default, the system uses an email address. If you want to use a contact ID, specify ${ContactId} in the ContactId field.

Part 2. Actions Blocks.

Part 3. Conditions Blocks.

Any Questions?
We’re always happy to help!
Request a Callback
Fill in the form, and our specialists will call you back as soon as possible.
Request a Callback
Chat Support
We’re waiting for your questions!
Send a Chat Message
Email
Contact the eSputnik support team
Send an Email