Send URLs with Link Previews

With link previews for Bring Your Own Channel for CCaaS, customers and reps receive rich link URLs without the need for admins to configure enhanced link messaging components. A customer or rep sends a URL in a Messaging session, and a link preview shows rich link details, including a thumbnail image, title, and URL.

  1. Register link previews to specify that your integration supports a formatType of Links for StaticContentMessage by using the Interaction Service Register Capabilities API (PATCH /api/v1/capabilities).

    Registering RichLink as one of the supported format types for messaging sets the capability for inbound and outbound messages. Invoke this API only once. We recommend invoking the API on load of your middleware or connector.

    Here’s an example payload.

  2. Set up regex detection to detect URLs in inbound messages and preprocess them to separate messages into text and URLs.

  3. To send a URL in an inbound message, during the call to the Interactions API (POST /api/v1/interactions), send an inbound message of StaticContentMessage message type with Links format type.

    Here’s an example payload.

    SCRT2 parses the metadata from the URL and sends a rich link to Salesforce that includes a thumbnail, a brief description of the site, the title, and the URL. In the Conversation component in Salesforce, the rep sees a rich link rendered.

    A rich link with thumbnail image, URL, and title in the enhanced Conversation component showing a message from an end user

  4. Set up your environment to handle the URL’s metadata to render a link preview for the Messaging end user. When a rep sends an outbound message to a customer, Salesforce automatically sends it using a rich link.

For a sample implementation in the Bring Your Own Channel for CCaaS demo connector, see the main.js and ottAppServer.mjs files in GitHub.

See Also