---
schema_version: "1"
id: 7c647a388f5c901f0780eed0f10665c16f962551d8f8672fb8be19ca98b27f0f
title: (Optional) Define a Platform Event
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/ev_relay_define_pe.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.ev_relay_define_pe.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 76f7077a5ce8f5748487a3254b322c68bdb734c9aac6263da94e53728a9211f5
description: If you have a custom platform event defined in your Salesforce org that you want to use for the event relay, you can skip this step. You can also skip this step if you want to use the event relay with a change data capture event. Otherwise, follow the steps in this section to define an example platform event, Carbon_Comparison__e, which the event relay configuration steps use.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# (Optional) Define a Platform Event

If you have a custom platform event defined in your Salesforce org that you want to use for the event relay, you can skip this step. You can also skip this step if you want to use the event relay with a change data capture event. Otherwise, follow the steps in this section to define an example platform event, `Carbon_Comparison__e`, which the event relay configuration steps use.

### Required Editions

<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="d97053e41">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d97053e41 ">To define a platform event:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d97053e41 ">Customize Application</td>

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

1. From Setup, in the Quick Find box, enter Platform Events, and then select **Platform Events**.
2. Click **New Platform Event**.
3. Provide these values.
    - Label: Carbon Comparison
    - Plural Label: Carbon Comparisons
4. Save your changes.
5. Create these fields. In Custom Fields & Relationships, click **New** for each field, and follow the wizard.
    - Field type: Number, Field Label: Annual Mileage, Length: 6, Decimal Places: 0
    - Field type: Text, Field Label: Current Vehicle, Length: 100
    - Field type: Text, Field Label: Model Year, Length: 4