Deeplink

Deeplink is supposed to pass parameters in the link. You can track the source of bot traffic or set parameters for users who clicked on the link. In other words, Deeplink is a UTM tag for a chatbot.
It works in Telegram, Viber, VK and Facebook.
To create Deeplink, go to Settings → Events and click Add Event. Enter the event name and select Deeplink type.
To delete event, click on the cross in the upper-right corner.

Deeplink with Text

It is used to create a link that leads to a specific screen. For example, you generated a vasya Deeplink to count the clients that your partner Vasily brought. To do this, you send all users to the screen that records the session.
1. Add and name Deeplink.
2. In Properties, specify Type Text and its Value — Latin text (parameter) which will be specified in the link and will be written to the deeplink variable.
3. In Action, specify Type — select whether any Screen or Text will be sent to the user.
4. In the Links, copy the links you need with the value added.

Deeplink with a Regular Expression

It is used to create a link that leads to a specific screen. It can be used to track user traffic from different advertising campaigns by the parameter at the end of the link.
1. Add and name Deeplink.
2. In Properties, specify Type Regular Expression and its Valuethe required regular expression. Specify the Variable name — an arbitrary variable where the reference parameter and Variable Type Array or String will be written. If necessary, set Regular Expression Flags.
3. In Action, specify Type — select whether any Screen or Text will be sent to the user after clicking on the link.
4. Click the save button to create a link. In Links, you need to copy it and add a value suitable for the regular expression after = sign at the end of the link. The expression will be written to the variable.
A variable with a certain value in it will immediately be assigned to a user who clicks on such a link. The constructor components (Fork, Alert, etc.) can immediately start working with this variable. The parameter passed to the bot is displayed in User states.
For Deeplink with regular expressions, you can choose Type of variable: Array or String. The array will be useful when you need to get not only the value of Deeplink, but also its individual parts. The first element will have the full value of Deeplink, the rest elements will have the group value. For example, regular expression: triforce_of_ (.+?)$ and Deeplink triforce_of_wisdom has such an array: [triforce_of_wisdom, wisdom]. In this case, String type writes to variable string: triforce_of_wisdom.
A regular expression .* skips any value (Latin text and numbers). If you use this regular expression, you will not be able to create more than 1 Deeplink. If you need several Deeplinks, create a unique regular expression for each Event.

Deeplink in Viber

Due to the peculiarities of Viber platform (the bot is launched only after the user's reaction), to receive the screen again, the user needs to write to the bot after clicking on Deeplink. To avoid this, you need to make another Deeplink Event separately for Viber, which will direct it to a screen specially created for Viber. On this screen, you need to place "Star" button with a navigation to the desired screen.

Deeplink for Non-Standard Situations

Sometimes we need to get, for example, the user's email via Deeplink, but the URL restrictions do not allow us to do this. In this case Base64 comes to the rescue.
In general, the work with Deeplink does not change. All you need after receiving a Deeplink is to substitute base64- at the end.
Let's take an example.
Create a Deeplink for Telegram.
2. Write base64- to the received link to indicate to the bot that the data are transmitted in base64 format.
3. Encode the necessary data. You can use a third-party service, for example https://www.base64encode.org
4. Insert the resulting base64 format string to the end of Deeplink (after base64-).
5. Test the received Deeplink.
Set up event.
Write Deeplink to the email variable and call it immediately using Text component.
After clicking on the link, we receive base64, decrypte it and record the final value.
The final link must not exceed 64 characters — Telegram and other platforms may refuse to work with large links. Use the Latin alphabet and special characters, otherwise base64 can encode text with invalid characters for the URL, and then the link will not work.