Advanced Logging
13 min
enable advanced logging in breadwinner (platform event based) breadwinner’s advanced logging automatically captures detailed error information and stores it directly in salesforce, removing the need for manual log checks but it does require some custom configuration on your part this guide provides step by step instructions for enabling and configuring this feature this is an advanced feature you will need to know how to create custom objects and a flow in salesforce breadwinner cannot configure this for you because every salesforce organization is different and may process this information differently prerequisites before starting, make sure breadwinner is already installed you have salesforce administrator access you have a business plan or higher note if these requirements are not met, the platform event picklist and save button will remain disabled step 1 create a platform event open setup search for platform events click new platform event enter • label bw error log • api name bw error log publish behavior publish immediately click save note we will use the bw error log name in the examples below, but you can use any object name you wish create the following fields all three fields are required and must use the exact api names shown below if any field is missing or named incorrectly, breadwinner will silently skip publishing the event detail c must be a long text area with a minimum length of 32768 characters field name api name (after save) type description action action c text(255) the sync operation or feature that encountered the error event type event type c text(255) severity/type of the event — always error (other severity types are currently not supported) detail detail c long text area (32768) full error message or exception detail from the operation step 2 create and assign the permission set create a permission set granting create access on the bw error log e platform event object, then assign it to all users who use breadwinner — this includes both salesforce administrators and non admin users this permission set must be assigned to every breadwinner user for advanced logging to function if it is missing for any user, error logs will not be captured for actions they perform step 3 enable advanced logging in breadwinner in the breadwinner app, open the breadwinner tab navigate to configuration → general open the platform event dropdown • only platform event objects will appear select the platform event you created above (example bw error log) and click save step 4 create a custom log object this object stores logs generated by breadwinner events this can be any name you wish but we suggest something like below open setup (⚙️ gear icon) search for object manager click create → custom object object details label error log plural label error logs api name error log record name log name data type auto number format log {00000000} check ‘enable reports’ create the following fields field name type action text(255) event type text(255) detail long text area (32768) step 5 create a platform event–triggered flow this flow listens to breadwinner’s platform events and saves them as records open setup (⚙️ gear icon) search for flows click new flow select platform event–triggered flow choose the platform event platform event bw error log e (created in step 1) configure the platform event add a create records element label create bw error log record how to set record field values manually create a record of this object error log (created in step 4) map the fields as below error log (error log c) bw error log (bw error log e) action c action c event type c event type c detail c detail c save the flow flow name bw platform event logger click activate step 6 test the setup (intentional error test) to confirm that advanced logging works, we’ll intentionally trigger an error create an error scenario open setup (⚙️ gear icon) open object manager open quickbooks company create a new field field name test type text mark as required save the field trigger the error go to an account and click new invoice select 'create a new quickbooks customer', enter a display name, and click save to trigger the error step 7 validate advanced logging once the error pop up appears, the following happens automatically ✔ a platform event should be published ✔ the flow should trigger automatically ✔ a new record should be created in error log c object what the log record should contain action operation that failed event type error detail detailed error message step 8 deleting the test field open setup (⚙️ gear icon) open object manager open quickbooks company delete the ‘test’ field that we created earlier on the quickbooks company object

