Create the agent in the app under Agents → Inbound agents. Its Widget tab gives you this snippet:
  • key is your agent’s key, and baseUrl is your CRM’s API address.
  • Your site has to be in the agent’s allowed sites, or the widget won’t show.

Signed-in visitors

Each new visitor becomes a new contact. If they’re signed in to your site, tell the agent who they are, so it can help with their account. On your server:
Upsert creates the customer if they’re new. Look up finds one you’ve already sent. Saved id is fastest: store contact.id in your own database the first time, and skip the extra call. On the page:
Now the visitor sees their past chats on any device, and the agent can use the tools you marked secure.

Good to know

  • Without a claim, an email a visitor types is saved, but never matched to a customer you already have.
  • A claim lasts six hours. Change it with ttlSeconds, up to a day. Make a new one on each page load.
  • A claim only tells the agent who the visitor is. It gives no access to your API.