Create a Process to Publish a Checkout Notification Platform Event
After you create a platform event, you can use Process Builder to publish it.
-
From Setup, in the Quick Find Box, enter
Process Automation
, and select Process Builder. -
Create a process.
-
Fill in the New Process form.
-
For Process Name, enter
Publish Event On Checkout Intermediate Operation Process
. -
For API Name, enter
Publish_Event_On_Checkout_Intermediate_Operation_Process
. -
For when to start the process, select A record changes.
-
-
Save your process.
-
After Process Builder launches, click Add Object.
-
For Object, select Cart Checkout Session.
-
For when to start the process, select when a record is created or edited.
-
-
Click Add Criteria.
-
For Criteria Name, enter
Publish Checkout Intermediate Notification Event
. -
For Criteria for Executing Actions, select No criteria-just execute the actions!
-
Click Save.
-
-
Click Add Action.
-
For Action Type, select Create a Record.
-
For Action Name, enter
Publish Intermediate Notification
. -
For Record Type, select the platform event that you created.
-
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.
-
Click Save.
-
-
Save and activate your process.