Newer Version Available

This content describes an older version of this product. View Latest

Publish Event Messages with Flows

Use flows to publish event messages from a Salesforce app as part of some user interaction, an automated process, Apex, or workflow action.

To publish event messages, add a Create Records element to the appropriate flow. Where you'd usually pick an object to create, select the custom platform event.

For example, here’s how to configure a Create Records element that publishes a Printer Status platform event message. This example assumes that the Printer Status platform event is defined in your org and that the event has these custom fields.
  • Printer Model (Text)
  • Serial Number (Text)
  • Ink Status (Text)
  1. For How Many Records to Create, choose One.
  2. For How to Set the Record Fields, choose Use separate variables, resources, and literal values.
  3. For Object, enter Printer and select Printer Status.
  4. Set these field values.
    Field Value
    Printer Model XZO-5
    Serial Number 12345
    Ink Status Low
    Create Records element in Flow Builder
  5. Save and activate the flow.