---
schema_version: "1"
id: 13119cfcc04fe906d71d6d55efb4113427eb2ae1106f15786ab55282bc616b8e
title: "Step 3: Create a Platform Event and Assign Permissions"
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/messaging-byob/guides/create-platform-event.md
canonical_url: https://developer.salesforce.com/docs/service/messaging-byob/guide/create-platform-event.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ba244b7b00bac7015c13ac2654724af76104f973870aff25da44c26d5f79d9fa
products:
  - Bring Your Own Bot for Messaging
  - Service Cloud Developer Content
---
# Step 3: Create a Platform Event and Assign Permissions

Create a custom platform event to send and receive messages between Salesforce and the partner messaging system. Define fields to customize the platform event data, and assign permissions to the platform event.

## Task 1: Create the Custom Platform Event

1. From Setup, in the Quick Find box, enter `Platform Events`, and then select **Platform Events**.
2. Click **New Platform Event**.
3. In the Label field, enter a name for the platform event. For example, “Test Event”.
4. In the Plural Label field, enter the plural form of the platform event label name. For example, enter `Test Events`.
5. Verify that the Event Type field is set to **High Volume**.
6. Verify that the Publish Behavior field is set to **Publish After Commit**.
7. Verify that the Deployment Status field is set to **Deployed**.
8. Click **Save**.

## Task 2: Add Custom Fields to the Platform Event

1.  From Setup, in the Quick Find box, enter `Platform Events`, and then select **Platform Events**.
2.  Click the name of the custom platform event you created in the previous task.
3.  In the Custom Field & Relationships section, click **New** and create two fields with these data types and field labels.
    - Data Type: **Text** and Field Label: **EventType**. In the Length field, set the number of characters to a value between 36 and 255.
    - Data Type: **Text Area (Long)** and Field Label: **Payload**.

## Task 3: Assign Permissions to the Platform Event

1. From Setup, in the Quick Find box, enter `Permission Sets`, and then select **Permission Sets**.
2. Click **SCRT2 Integration User**.
3. Click **Object Settings**.
4. Click the name of the custom platform event you just created.
5. Click **Edit**, and select **Read** and **Create**.
6. Save your changes.

**See Also**

- _Salesforce Help_: [Define and Manage Platform Events](https://help.salesforce.com/s/articleView?id=platform.platform_events.htm)
- _Salesforce Help_: [Create Custom Fields](https://help.salesforce.com/s/articleView?id=platform.adding_fields.htm)
- _Salesforce Help_: [Managed Profile Lists](https://help.salesforce.com/s/articleView?id=platform.users_custom_profile_lists.htm)

