Skip to content

v0.10.0

Choose a tag to compare

@ramonmalcolm10 ramonmalcolm10 released this 26 Sep 22:17
· 3 commits to main since this release

The pre-chat form is set in the CloudTrain dashboard, not in the embed.

Breaking: preChatFields and requirePreChat (require-pre-chat) are removed from the web component, the React wrapper and the React Native widget. An embed now needs only its key.

  • Whether the form shows is the widget's own setting: Ask for details before the chat (Settings → Widgets), sent as pre_chat by GET /api/v1/agent.
  • What it asks is the agent's lead fields (Settings → Lead fields), sent as lead_fields. Each submission becomes a lead in the dashboard, so an embed can no longer ask for fields that would never be saved.
  • An email or a phone number is always required, since a lead is only saved with one.
  • leadCaptured (web) and onLeadCaptured (React Native) stay, for the page's or app's own tracking - a conversion, a pixel. The lead itself is saved by CloudTrain with the first message.
  • SDK: Agent gains lead_fields and pre_chat (both optional, for older servers), and lacksContact() / LeadField are exported.

Upgrading: remove preChatFields and requirePreChat from your embed and turn the setting on for the widget instead.