Create a Process to Publish a Checkout Notification Platform Event

After you create a platform event, you can use Process Builder to publish it.

  1. From Setup, in the Quick Find Box, enter Process Automation, and select Process Builder.

  2. Create a process.

  3. Fill in the New Process form.

    1. For Process Name, enter Publish Event On Checkout Intermediate Operation Process.

    2. For API Name, enter Publish_Event_On_Checkout_Intermediate_Operation_Process.

    3. For when to start the process, select A record changes.

  4. Save your process.

  5. After Process Builder launches, click Add Object.

    1. For Object, select Cart Checkout Session.

    2. For when to start the process, select when a record is created or edited.

  6. Click Add Criteria.

    1. For Criteria Name, enter Publish Checkout Intermediate Notification Event.

    2. For Criteria for Executing Actions, select No criteria-just execute the actions!

    3. Click Save.

  7. Click Add Action.

    1. For Action Type, select Create a Record.

    2. For Action Name, enter Publish Intermediate Notification.

    3. For Record Type, select the platform event that you created.

    4. Set field values.

      • For Field, select Cart Session ID.
      • For Type, select Field Reference.
      • Under Value, select Cart Checkout Session ID, and click Choose.
      • Click Add Row.
      • Under Field, select Next State.
      • For Type, select Field Reference.
      • Under Value, select Next State, and click Choose.
      • Click Add Row.
      • Under Field, select State.
      • For Type, select Field Reference.
      • Under Value, select State, and click Choose.
    5. Click Save.

  8. Save and activate your process.