---
schema_version: "1"
id: 32cd56b0a3bf3fd55556f2824d3652a31e4efe0f8479b5c1845deef0309a0a77
title: Send Chatter Extension Payload
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lightning-base-components/lightning-design-system/guides/aura/components/lightning/sendChatterExtensionPayload/aura-send-chatter-extension-payload.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/aura-send-chatter-extension-payload.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 88acb8e6bb639202c033d95c4198333cada90da983f434aac8e9fb325acbe7a2
products:
  - Lightning Component Reference
---
# Send Chatter Extension Payload

**`lightning:sendChatterExtensionPayload`**

For Chatter Rich Publisher Apps only. Sends the payload and metadata that needs to be saved for the extension with the feed item.

**For Use In**

Experience Builder Sites

::::::tabset{tabs='[ "Develop", "Specifications"]'}

:::::tab

`lightning:sendChatterExtensionPayload` is a component event that sends your custom component's payload into a Chatter feed. You must use this event with the `lightning:availableForChatterExtensionComposer` and `lightning:availableForChatterExtensionRenderer` interface to make your component available to the Chatter publisher.

Rich Publisher Apps are available to Experience Builder sites in topics, group, and profile feeds and in direct messages.

For example, you can create a custom component that generates a random quote in the Chatter feed.

```html
<aura:component implements="lightning:availableForChatterExtensionComposer">
  <aura:handler name="init" value="{!this}" action="{!c.init}" />
  <div class="container">
    <span class="quote" aura:id="quote"></span>
    <span class="author" aura:id="author"></span>
    <lightning:button label="Get next Quote" onclick="{!c.getQuote}" />
  </div>
</aura:component>
```

In your client-side controller, fire the `lightning:sendChatterExtensionPayload` event with your payload.

```javascript
({
  getQuote: function (cmp, event, helper) {
    // get quote from the source
    var compEvent = cmp.getEvent("sendChatterExtensionPayload");
    compEvent.setParams({
      payload: "<payload object>",
      extensionTitle: "<title to use when extension is rendered>",
      extensionDescription: "<description to use when extension is rendered>",
    });
    compEvent.fire();
  },
});
```

Next, create a custom component that implements the `lightning:availableForChatterExtensionRenderer` interface to determine how the quote is displayed in the Chatter feed.

```html
<aura:component implements="lightning:availableForChatterExtensionRenderer">
  <aura:attribute name="_quote" type="String" />
  <aura:attribute name="_author" type="String" />
  <aura:handler name="init" value="{!this}" action="{!c.init}" />

  <div class="container">
    <span class="quote" aura:id="quote">{!v._quote}</span>
    <span class="author" aura:id="author">--- {!v._author} ---</span>
  </div>
</aura:component>
```

Finally, create a ChatterExtension object in your org and make the components available in the Chatter Publisher via the Administration page in Experience Workspaces.

For more information, see the [Lightning Aura Components Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_integrate_customapps_to_publisher.htm).


:::::

:::::tab
## Attributes

| Name                    | Description                                                         | Type   | Default | Required                                     |
| ----------------------- | ------------------------------------------------------------------- | ------ | ------- | -------------------------------------------- |
| `extensionDescription`  | The description for the extension to be saved with the feed item.   | string |         | ![Yes](https://developer.salesforce.com/media/check.png) |
| `extensionThumbnailUrl` | The thumbnail URL for the extension to be saved with the feed item. | string |         |                                              |
| `extensionTitle`        | The title for the extension to be saved with the feed item.         | string |         | ![Yes](https://developer.salesforce.com/media/check.png) |
| `payload`               | The payload data to be saved with the feed item.                    | object |         | ![Yes](https://developer.salesforce.com/media/check.png) |

:::::

::::::
