This provides an example of how a Salesforce Admin can monitor the CommerceDiagnosticEvent platform events generated during B2B Lightning operations like checkout. It is NOT recommended to use this in production because it can affect the performance of your system. It is presented here as a possible option during the development process.
For more options see the Subscribing to Platform Events documentation.
- From this folder as your current location, create a .zip file:
zip -r -X <your-zip-file>.zip *
- Open Workbench and go to migration -> deploy.
- Select the file you created (
<your-zip-file>.zip
). - Check the "Single Package" checkbox on that page.
- Click "Next".
- Click "Deploy".
In Setup search for the Process Builder.
Open the Process CommerceDiagnosticEvents process.
In the first box after the "Start" box (called "Specify When to Start the Process"), update the Store ID Value to an ID of a valid Webstore and save.
Click "Activate" to activate the process. After this, whenever a CommerceDiagnosticEvent is generated, a new record will be added to the "Commerce Diagnostic Custom Object".
Log in as the administrator for your org.
In the list of Lightning apps, search for "Commerce Diagnostic Custom Objects" and open that tab. The Admins should have access to that.
From the List Views dropdown, select "Commerce Diagnostic Event Fields" that should show you the most useful fields that were populated from the CommerceDiagnosticEvent.