---
schema_version: "1"
id: 7bab4af1680cb7be08682fa370af7a03429fd7a81ef59ebc28912d7a4830b53e
title: Subscribe to Lobby Management Greeter Dashboard Events
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/ls_lobby_management_greeter_dashboard_message_channel.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.ls_lobby_management_greeter_dashboard_message_channel.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 99cb75d2ae81ea123dd950bb89df9aeba486df1ccecacd6c50536096db4ba4b5
description: When a greeter changes the service territory in the Lobby Management dashboard, Salesforce Scheduler publishes a Lightning Message Service (LMS) event on the lightning__appointmentBooking_greeterDashboard channel. Subscribe from a custom Lightning web component or Aura component to keep custom waitlists, appointments, or data views in sync with the selected territory.
products:
  - Scheduler
  - Salesforce Platform
release: "264"
---
# Subscribe to Lobby Management Greeter Dashboard Events

When a greeter changes the service territory in the Lobby Management dashboard, Salesforce Scheduler publishes a Lightning Message Service (LMS) event on the `lightning__appointmentBooking_greeterDashboard` channel. Subscribe from a custom Lightning web component or Aura component to keep custom waitlists, appointments, or data views in sync with the selected territory.

### 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;">Available in: Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions</td></tr></tbody></table>

## Channel

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><colgroup><col style="width:28.57142857142857%"> <col style="width:71.42857142857143%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Channel Name</td><td class="slds-cell-wrap" style="vertical-align:top;"><code>lightning__appointmentBooking_greeterDashboard</code></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Scope</td><td class="slds-cell-wrap" style="vertical-align:top;"><code>APPLICATION</code></td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Exposure</td><td class="slds-cell-wrap" style="vertical-align:top;">External. The channel is available across namespaces and to customer code that runs on the platform.</td></tr></tbody></table>

## Message Payload

  
| Property | Data Type | Details |
| --- | --- | --- |
| `eventType` | String | The type of dashboard event. For example, `TERRITORY_CHANGE`. |
| `eventData` | Object | Data specific to the event. The internal structure depends on the `eventType`. |

## Lightning Web Component Example

To listen to the `lightning__appointmentBooking_greeterDashboard` event, import the Lightning Message Service features from `lightning/messageService` and pass the channel reference to the `subscribe()` method.

```javascript
import { LightningElement, wire } from 'lwc';
import {
    subscribe,
    unsubscribe,
    APPLICATION_SCOPE,
    MessageContext
} from 'lightning/messageService';
import GreeterDashboardChannel from '@salesforce/messageChannel/lightning__appointmentBooking_greeterDashboard';

export default class GreeterDashboardExample extends LightningElement {
    subscription = null;
    eventType;
    eventData;

    @wire(MessageContext)
    messageContext;

    connectedCallback() {
        this.subscribeToMessageChannel();
    }

    subscribeToMessageChannel() {
        if (!this.subscription) {
            this.subscription = subscribe(
                this.messageContext,
                GreeterDashboardChannel,
                (message) => this.handleMessage(message),
                { scope: APPLICATION_SCOPE }
            );
        }
    }

    handleMessage(message) {
        const { eventType, eventData } = message;
        if (eventType === 'TERRITORY_CHANGE') {
            console.log('Territory changed:', eventData);
        }
    }
}
```

## Aura Component Example

In the component markup, declare the message channel.

```javascript
<lightning:messageChannel type="lightning__appointmentBooking_greeterDashboard"
                          scope="APPLICATION"
                          onMessage="{!c.onGreeterDashboardMessage}" />
```

In the controller, handle the message.

```javascript
({
    onGreeterDashboardMessage: function(cmp, evt, helper) {
        var eventType = evt.getParam('eventType');
        var eventData = evt.getParam('eventData');

        if (eventType === 'TERRITORY_CHANGE') {
            console.log("Territory changed:", JSON.stringify(eventData));
        }
    }
})
```