Returning.AIDocs
v1

Guides / Legacy

.md

Legacy migration

Referral widget migration

New referral experiences use the same custom-widget integration as every other configured experience.

Current integration

referrals.html
<rai-custom-widget
  widget-id="YOUR_REFERRAL_WIDGET_ID"
  bundle-url="https://prod-widgets.returning.ai/custom-widget/bundle/referral/widget.js"
  embed-token="TOKEN_FROM_YOUR_SERVER"
  height="auto"
></rai-custom-widget>

Migration steps

  1. Request the configured referral widget ID and exact bundle URL from Returning.AI.
  2. Reuse the existing Access Key token endpoint and signed user identifiers.
  3. Replace the referral-specific element with <rai-custom-widget>.
  4. Remove referral-only browser token handling after the custom widget is verified.

For new broker integrations, follow the referral attribution and registration guide. It covers link capture, enrollment, relationship readback, and the current widget.

See the custom widget quickstart for the complete mount and token-refresh flow.