ruLog in to Senler

Preparing the Widget for Integration

First connect the regular widget and make sure it opens on the website. An agent is not required for this: without an agent, visitors can message the project and team members can continue the conversation in the Cabinet. Connect an agent only when visitors need automatic AI replies.

1. Connect the Regular Widget

  1. Create a Widget channel. In the creation form, enter the domain of the site where the chat will run.
  2. If the channel already exists, check allowed domains. A nonempty list restricts external sites; an empty list permits any domain. This project's landings on Senler domains are automatically allowed.
  3. Configure the appearance and save the channel.
  4. Open Embed Code, and use the button next to the code to copy the entire generated snippet.
  5. Insert the snippet before the closing </body> tag on the website.

The generated snippet already contains the loader script address and the channel_id of the correct channel. You do not need to find or replace either value for a regular connection.

2. Decide Whether an Agent Should Reply

The widget itself is a communication channel for website visitors. Installing it on a website does not automatically start an agent.

If Automatic Replies Are Not Needed

No additional setup is required. Open the website, make sure the widget appears and opens, then send a message and check that the conversation appears in the Cabinet.

If Automatic AI Replies Are Needed

  1. Create an agent or open an existing one.
  2. In the agent's Subscription section, open Incoming message. Set When to subscribe to Any message or By keyword. For the latter, add the phrases that connect a client to the agent.
  3. In Channels, select the Widget channel you created. If the rule is intentionally meant for every matching project channel, you can leave the channel restriction unset.
  4. On the Tools tab, enable Prepare replies and perform actions. Leave Do not send the main reply to the client disabled so visitors receive completed replies. Preliminary waiting messages are enabled separately and do not replace the main reply.
  5. Publish and activate the agent.
  6. Send a message through the widget that matches the selected autostart mode and check the response.

3. Verify the Basic Connection

Before adding context, markup, or actions, make sure that:

  • the widget appears only on the expected pages and opens in the selected way;
  • a message can be sent from an allowed domain;
  • the new conversation appears in the Cabinet;
  • if autostart is configured, the intended agent is assigned in a new dialog when the selected condition matches and replies to the visitor. An already assigned agent can keep replying without the keyword being repeated.

Once the basic scenario works, continue with How the Integration Works, then add only the features you need.

Terms Used in Examples

The value "xxx" in examples stands for the channel_id from the generated code of a particular channel. It is needed only when a developer assembles an extended configuration manually.

The external page that embeds the widget is called the site page, and the widget-loader.js file it loads is called the loader script.