Basic concepts and entities

This section provides a description of the concepts

  • Clients
  • Reward points
  • Badges and quests
  • Tags, Events
  • Products and product categories
  • Variables

Clients

One of the key features SailPlay platform is the ability to work with the data of your customers. SailPlay CRM works the following principles:

  1. The primary client identifier or phone number (user_phone), or email (email) depends on the main identifier you selected. To change the primary ID, please contact our support team.

  2. Additionally, the parameter origin_user_id can be used if clients have a unique customer ID in your system. SailPlay applies no constraints on this parameter, so it may be a number or a string. The only limitation - this field must be unique for each individual client. As origin_user_id we recommend using the following value md5(ID in your system + md5(public_key)).

  3. All API-requests for customer identification can be transmitted as a telephone number or email (depending on the chosen main identifier) ​​or origin_user_id. If this origin_user_id has not tied a phone number or email, you will need to add a matching phone or email in order to allow the client to log into their account. 

  4. For all new phone numbers or emails or origin_user_id, which were not found in SailPlay system will create accounts that are in a state of "unconfirmed". They will be confirmed when the user confirms the possession of one of their IDs.

SailPlay offers two ways to work with your user base:

  1. Through your affiliate account on the site SailPlay.net

  2. Through SailPlay API.

Reward points

SailPlay has a mechanism for calculating the bonus points for any user action. An example is the review on Yandex.market or any action on your side.

To score points, there are 2 possibilities:

  1. Do it manually in the partner's office

  2. Implement accrual of bonus points through SailPlay API.

Badges and quests

Badges and quests along with bonus points and events are based on service gamification.

Badges   - A virtual reward that you may the receive. Quest badges may be in groups (chains) or may be single. If the badges form a quest, it means that in addition to the rules for obtaining badge №3 in the quest, you must also have badge №2, etc.

Events Read   - the this is in Fact That the events On occur on your site or in the any OTHER PLACE, for example in a mobile application: the user registered, the user has posted a comment, etc. The following describes the types of events.

Events Read the User   - a list of all events That have Been made (or took) for the this user. All events are subject to the logic described below.

Obtaining badge for The Rules   - a set of rules, in the which the user will of the receive the this badge. For example, it may look as follows : for this badge necessary to 1) was obtained from this previous badge Quest 2) was set flag №10 3) №1 counter had a value of> = 10.

Their work is best explained with an example.

Let's say you there is a need to hold the user through a sequence of steps. Suppose, for example, a first sequence of steps (first Quest) are as follows:

  1. The user logged on to the site

  2. A fan 3 comments

  3. A user has installed a mobile application

  4. User scored 1000 points in the mobile game in mobile applications

The second sequence (second Quest) will be:

  1. Has invited two friends to the site (user registered friends)

  2. User invite 5 friends to the site (cumulatively)

Then it makes sense to do the following: when the each step in the quest to give every user badge.

Thus, you do not need to follow the logic on your side. For you, the whole integration is reduced to sending events.

Tags, Events

Tags and events in SailPlay system are different applications of one entity.

They are also closely linked to the chain.

When you assign a tag starts the associated chain of actions.

Types of events:

Flag

Upon receipt of this event, SailPlay checks whether the user is already in a given set this flag. If there was nothing happens. If there was not - the flag is set. Typical applications can be for example the following events: the user has made the first payment (in this case, you can make a request for each payment is received), the user is registered.

Counter

Upon receiving this event, SailPlay, increases the counter by one for the event for the user. The example may be, for example, the number of comments on the site: each time you left comments you send in SailPlay information about what the user has made this action. Another example would be, for example, the number of user invited friends.

Adder

The adder is an analogue meter, but with one difference - sending events SailPlay transmitted additional parameter - value, at which the counter value increases. The example may be, for example, the local currency at your service. In this case, if the person has earned a certain amount of a given currency, you pass the information (event ID and quantity).

Basket of goods and categories of goods

In SailPlay a mechanism for use with the composition of the basket. Working with the basket and the categories of goods may be necessary in the following cases:

  1. When it is necessary to implement logic for the different regulations accrual of bonus points for different products or different categories.

  2. To conduct analysis and statistics related to sostavomom basket.

Principle of operation

Each item in the system is assigned an identifier SailPlay this product on your system (SKU). Similarly, each category SailPlay system is assigned an identifier in your system.

For each product category, you can specify:

  1. Name

  2. Identifier

  3. The conversion rate rubles in points for the purchase of this product / purchase a product from this category

  4. Picture

Accordingly, the when Transmitting information about the purchase, a must transmit timeout Further the basket structure (see.   HEREIN  ).

When parsing the composition of the basket, the following rules apply:

  1. If an item with the SKU or group with this ID is not in the database SailPlay data - they are created automatically (without names and attributes otsalnyh).

  2. If this product is a special conversion rate if the conversion ratio is verified to have this category, if it is not - a standard.

  3. If the array passed to one and the same item several times - the sum of their pre-folded.

variables

One of the basic features SailPlay Sender is the ability to assign users to the variables. 

Variable - a special phrase that you send a letter will be replaced by the stored value.

For example the variable $ [first_name] when you send will be replaced by the recipient's name.

Use variables as possible in mass E-Mail- and SMS-mailing, and the trigger E-mail- and SMS-messages. 

Indicate the variables, you can not only directly in the message body, but also, for example, the title or URL-address. 

 

In SailPlay system implements four types of variables:

  • System Variables - contains general information about the client and performs actions.

  • Custom variables - contain additional information about the customer. Variable values ​​are stored separately for each client.

  • Variables linked to the tags - contain additional information necessary for the operation of a specific tag. The values ​​of these variables are stored separately for each tag.

  • Global variables - these variables are not tied to any tags to users.

And editing variables Creating produced by the methods   / api / v2 / users / custom  -vars / add / for custom and   / api / v2 / tags / vars  / set / for the variables linked to the tag, and global variables.

Custom variables An CAN the Just set the BE using the method the   SP.api.customVariables.add   JS the the SDK.

Variables can be used in letters and in sms messages.

When using any variable, you can specify a value that will be substituted if the variable is missing or its value is not defined.

Also replacement mechanism can be implemented through the conditional construct.

replacement syntax:

$ [Var | replacement]

Where var - character variable identifier

replacement - string which will be substituted for the variable value

Example of use:

$ [Global_vars [ "var1"] | replacement text]

Variables An usage of the Examples to refer to   markup templating