Embedded Messaging Set Up

Configure Embedded Messaging in the Alumni Portal site to help your alumni get instant help and case statuses by chatting with a bot or a service representative.

Required Editions

View supported editions.

To set up Embedded Messaging, perform these tasks:

  • Prepare a Salesforce org.
  • Configure a deployment.
  • Optionally, set up a pre-chat form.
  • Add the Embedded Messaging component to the Alumni Portal site.
  • Configure the component.
  • Add your domain to the Cross-Origin Resource Sharing (CORS) allowlist.

See Embedded Messaging.

During the setup, when you configure a web deployment, add a similar JavaScript code within a <script> tag to use Pre-Chat API to pass an alumnus' user ID to the Omni-Channel flow. See Configure an Enhanced Web Chat Deployment in an Experience Builder or Commerce Cloud site.

<script>
    window.addEventListener("onEmbeddedMessagingReady", e => {
        const userId = $A.get("$SObjectType.CurrentUser.Id");
        console.log("User id is:"+userId);
        embeddedservice_bootstrap.prechatAPI.setHiddenPrechatFields({
            "userId": userId});
    });
</script>

The Omni-Channel flow retrieves the alumnus' account ID, contact ID, and full name and updates the messaging session record with these details. With the updated messaging session record, service representatives see the alumnus' name in every incoming chat message notification.

  • Update Messaging Session with Alumni Details
    When an alumnus contacts a service representative through chat, the service representative receives an incoming chat notification. To show the name of the alumnus in the notification, the messaging session record must contain the alumnus' account ID, contact ID, and full name. To update the messaging session record with these details, create an autolaunched flow and update the Omni-Channel flow.
  • Set Up Case Management Bot
    Configure Embedded Messaging with a case management bot. With the bot, your alumni can create cases and find case statuses rapidly.