The Write Logs Action is used to write and commit log messages to the Overcast logger.
Running a Real-time Scenario Action will return an Overcast Logger class instance. Use the Write Logs Action to write additional log messages and commit the logs from the Scenario run.
Salesforce does not allow a web callout after performing a database write operation (DML), so we cannot run Real-time Scenarios after committing log messages to the database. Real-time Scenarios and the Write Logs Action support the option to not commit log messages to the database so that multiple Real-time Scenarios or web callouts can be made in one flow.
When an error message is logged, the Status Code for the Scenario run is set to 400 (User error). When a warning message is logged, the Status Code is set to 500 (Warning).
Log messages are written in the order of Info, Warning, and then Error.
To write logs in an Overcast Object Mapping flow, use the output variable. See the Mapping with Flow Guide.
Category: Overcast
Label: Write Overcast Logs
Name: apex-overcast__ActionWriteLogs
Logger (required)
The Apex-defined type, overcast.Logger, is returned from a Real-time Scenario action.
Info Message (optional)
Create an INFO log message on the Scenario run.
Warning Message (optional)
Create a WARN log message on the Scenario run and set the Status Code to 500.
Error Message (optional)
Create an ERROR log message on the Scenario run and set the Status Code to 400.
Info Messages (optional)
Create multiple INFO log messages on the Scenario run.
Warning Messages (optional)
Create multiple WARN log messages on the Scenario run and set the Status Code to 500.
Error Messages (optional)
Create multiple ERROR log messages on the Scenario run and set the Status Code to 400.
Do not set Status Code (optional)
Set to True to prevent the Scenario run record's Status Code field being set.
Do not Commit Logs (optional)
Set to True to prevent the logger from saving the log records to the database. The log messages will stay in memory on this logger until this action is run again to save the log records.