---
schema_version: "1"
id: 682fd6a5486040e85c542c5ac13af5c17cb384132e90d10831160c9f711cfd4c
title: Update Messaging Session with Alumni Details
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/es_ap_update_messaging_session_with_contact_details.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.es_ap_update_messaging_session_with_contact_details.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7d90d261cb3c73fc2e214b1251cc36232c64b86249e234f78190277ac1c24da6
description: 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.
products:
  - Service Cloud
release: "264"
---
# 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.

### 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>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d82683e55">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d82683e55 ">To open, edit, or create a flow in Flow Builder:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d82683e55 ">Manage Flow</td>

          </tr>
        </tbody>
      </table>

## Create Autolaunched Flow to Update Messaging Session Record

1. From Setup, in the Quick Find box, enter Flows, and select **Flows**.
2. Create a **New Flow**.
3. Select **Start From Scratch**, and click **Next**.
4. Select **Autolaunched Flow (No Trigger)**, and click **Create**.
5. From the **Manager** tab in Toolbox, create these input variables: userId and routableId.
    
    The userId variable stores the user ID passed into the flow. The routableId stores the routable ID of messaging session record of the current messaging session.
6. Add these Get Record elements to the flow: Get User, Get Contact, and Get Messaging Session.
7. Add an Update Records element called Update Messaging Session.
8. In the Get User element, use the user ID passed into the flow to get the alumnus' user record.
    1. In the Data Source section, select **Salesforce Object**.
    2. From the Object dropdown list, select **User**.
    3. From the Condition Requirements dropdown list, select **All Conditions Are Met (AND)**.
    4. Add a condition to get a user record if the user ID is equal to the value stored in the userId variable.
    5. In the How Many Records to Store section, select **Only the first record.**
    6. In the How to Store Record Data section, select **Automatically store all fields**.
9. In the Get Contact element, use the user record received from the Get User element to get the related contact record.
    1. In the Data Source section, select **Salesforce Object**.
    2. Select **Contact** in the Object dropdown list.
    3. Select **All Conditions Are Met (AND)** in the Condition Requirements dropdown list.
    4. Add a condition to get the related contact record if the contact ID is equal to the related contact ID of the user record stored in the User from Get User record variable.
    5. In the How Many Records to Store section, select **Only the first record.**
    6. In the How to Store Record Data section, select **Automatically store all fields**.
10. In the Get Messaging Session element, use the routableID passed into the flow to get the current messaging session record.
    1. In the Data Source section, select **Salesforce Object**.
    2. From the Object dropdown list, select **Messaging Session**.
    3. From the Condition Requirements dropdown list, select **All Conditions Are Met (AND)**.
    4. Add a condition to get a messaging session record if its ID is equal to the value stored in the routableId variable.
    5. In the How Many Records to Store section, select **Only the first record.**
    6. In the How to Store Record Data section, select **Automatically store all fields**.
11. In the Update Messaging Session element, update the current messaging session record with the related contact record's contact ID, full name, and related account ID.
    1. In the How to Find Records to Update and Set Their Values section, select **Specify conditions to identify records, and set fields individually**.
    2. From the Object dropdown list, select **Messaging User**.
    3. From the Condition Requirements to Update Records dropdown list, select **All Conditions Are Met (AND)**.
    4. Add a condition to get the messaging user record if its ID is equal to the related messaging user ID of the record stored in the Messaging Session from Get Messaging Session record variable.
    5. In the Set Field Values for the Messaging User Records section, set the AccountId field value to the ID of the account related to the record stored in the Contact from Get Contact record variable. Set the ContactId field value to the value stored in the Contact ID field of the Contact from Get Contact record variable. Set the Name field value to the value stored in the Full Name field of the Contact from Get Contact record variable.
12. Activate the flow.

## Update Omni-Channel Flow for Embedded Messaging

Return to the Omni-Channel flow that you created when you prepared a Salesforce org, and add the autolaunched flow as a subflow.

1. From Setup, in the Quick Find box, enter **Flows**, and select **Flows**.
2. From the list, find and select your previous Omni-Channel flow.
3. Add a Subflow element after Start, and select the autolaunched flow that you previously created.
4. Specify the label, API name, and description.
5. Set input values for the autolaunched flow by passing the userID and recordID variable values from the Omni-Channel flow.
6. Activate the flow.
    
    With this flow, a service representative sees the alumnus' account ID, contact ID, and full name in the messaging session record. The incoming chat notification shows the alumnus' name.