Legacy migration
Referral widget migration
New referral experiences use the same custom-widget integration as every other configured experience.
Do not start with the referral-specific tag
New widget work should use the supplied referral widget ID and custom bundle. The broker registration transport is a separate setup choice; migrating the widget does not replace your enrollment or attribution flow.
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
- Request the configured referral widget ID and exact bundle URL from Returning.AI.
- Reuse the existing Access Key token endpoint and signed user identifiers.
- Replace the referral-specific element with
<rai-custom-widget>. - 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.