Explanation
Article MarkdownReport an error

Launch Scenario via Deeplink

Deeplink allows creating direct links for launching bot scenarios with parameters. This is useful for creating personalized links from advertising campaigns, passing client ID or order ID, or tracking traffic sources.


In messengers, there are mechanisms that allow passing input parameters to a bot. These mechanisms are called deeplink and represent a way to embed a parameter in a link that will open the bot.

📖 Documentation: Read more about deeplink in official messenger documentation:


Deeplink is suitable for such cases:

  • Launching a scenario from an advertising campaign with unique parameters
  • Passing client ID or order ID through a link
  • Creating personalized links for different user groups
  • Tracking traffic source (UTM tags)

Telegram

Format:

https://telegram.me/<Bot_Name>?start=<UserID>

Example:

https://telegram.me/mybot?start=12345

Limitations:

  • Limit for start parameter: 64 characters
  • For subscribing to notifications, clicking the link is not enough, you need to press the "Start" button

Viber

Format:

viber://pa?chatURI=<URI>&context=<UserID>&text=<Start!>

Example:

viber://pa?chatURI=mybot&context=12345&text=Start!

Parameters:

  • chatURI — your bot's URI in Viber
  • context — context (parameter that will be passed to the bot)
  • text — text that will be inserted into the user's input line (optional)

ℹ️ Note: If the text parameter is not passed, clicking the link will still be considered the start of the conversation and sufficient for subscribing to notifications.

Facebook Messenger

When using deeplink, the start command is passed. Consider this if you use scenario branching with the get_command action.


Launch Scenario via Entry Point Deeplink URL

In any entry point (Entry Point), there is a URL that can be copied to launch the scenario from that point. This is available for:

  • Telegram
  • Viber

💡 Note: If you don't see the URL, check if the channel is connected to the bot.

Example URL:

https://t.me/botname/?start=n__3

Clicking this link will launch the bot from the specified entry point.


Processing Start Parameter in Scenario

If you want to use the start parameter in the scenario, use the get_command action.

How it works:

  1. The get_command action processes commands like /commandname or passed via deeplink
  2. If a parameter is passed, sets the constant {{messenger_input_param}}
  3. Then you need to parse messenger_input_param as convenient through the scenario

Processing example:

// In action jail or through if_else
const param = j.messenger_input_param || '';

if (param === '12345') {
  return 'customer_12345';
} else if (param.startsWith('order_')) {
  return 'order_tracking';
}

return 'default';

Usage Examples

Example 1: Passing Client ID

Creating link:

https://t.me/mybot?start=customer_12345

Processing in scenario:

Use {{messenger_input_param}} to get the client ID and further processing.

Example 2: Passing Order ID

Creating link:

https://t.me/mybot?start=order_67890

Processing in scenario:

Use {{messenger_input_param}} to get the order ID and further processing.


Limitations

Telegram

  • Maximum start parameter length: 64 characters
  • Need to press the "Start" button to subscribe to notifications
  • Parameter is passed as /start <parameter>

Viber

  • The text parameter is optional
  • Clicking the link is sufficient for subscribing to notifications
  • Parameter is passed through context

Facebook Messenger

  • When using deeplink, the start command is passed
  • Consider this if you use scenario branching with the get_command action

Using your own AI agent?Install the open skill so your AI agent can work with current official ConnectiveOne documentation.Get the skillNeed support?Couldn’t find the answer or need help from the ConnectiveOne team? Create a request in Client Portal.Create a request