The examples in this section depend on a predefined custom platform event called Order_Event__e. To define this event in Salesforce, complete these steps.
Before You Begin
Required Editions
Available in: Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To define a platform event:
Customize Application
From Setup, in the Quick Find box, enter Platform Events, and then select Platform Events.
Click New Platform Event.
Provide these values.
Label: Order Event
Plural Label: Order Events
Select Starts with a vowel sound, if available.
Click Save.
Create these fields. In Custom Fields & Relationships, click New for each field, and follow the wizard.
Field type: Text; Field Label: Order Number; Length: 18
Field type: Text; Field Label: City; Length: 50
Field type: Number; Field Label: Amount; Length: 16; Decimal Places: 2