---
schema_version: "1"
id: 8f768397f094bfbde9855e84db9001c433c793bd92e16bf564983bdc8a0aa98d
title: Embedded Messaging Set Up
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/es_ap_embedded_messaging_set_up.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.es_ap_embedded_messaging_set_up.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f66b0dcaea285defe758e5f09cbd70ed7435f214411f02e8ab6ab16c8824d133
description: 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.
products:
  - Service Cloud
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.service_editions_reference.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

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](https://help.salesforce.com/s/articleView?id=experience.rss_embedded_messaging.htm&type=5&language=en_US).

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](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_experience_builder.htm&type=5&language=en_US).

`<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](https://help.salesforce.com/s/articleView?id=service.es_ap_update_messaging_session_with_contact_details.htm&release=264.0.0&type=5)**  
    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](https://help.salesforce.com/s/articleView?id=service.es_ap_case_management_bot_set_up.htm&release=264.0.0&type=5)**  
    Configure Embedded Messaging with a case management bot. With the bot, your alumni can create cases and find case statuses rapidly.