Skip to content

OmniStudio

OmniScripts and Integration Procedures log via the CallableLogger Apex class, invoked declaratively as a Remote Action step. No Apex authoring required.

The Remote Action step

Configure a Remote Action step in the OmniScript or Integration Procedure with:

  • Remote Class: Nebula.CallableLogger if the managed package is installed, otherwise CallableLogger.
  • Remote Method: newEntry to add an entry (optionally saving in the same call), or saveLog to persist pending entries.
  • Additional Input: pass the input keys documented below declaratively.

Input keys

The same keys used by the ISV optional-dependency pattern apply here.

KeyPurpose
loggingLevelLevel name (INFO, ERROR, WARN, DEBUG, FINE, FINER, FINEST).
messageEntry message.
saveLogSet to true to persist immediately after adding the entry.
saveMethodNameOverride the save method for this call (EVENT_BUS, QUEUEABLE, REST, SYNCHRONOUS_DML).
tagsList<String> of tag names.
exceptionAn exception instance to attach.
recordId / record / recordList / recordMapRecord association, same shape as the Apex setRecord(...) overloads.
scenarioScenario for the transaction.
parentLogTransactionIdParent transaction ID for async linking.

Automatic OmniStudio context

CallableLogger automatically:

  • Stamps OriginType__c = 'OmniStudio' on entries produced by OmniStudio Remote Action steps.
  • Captures the omniProcessId from OmniStudio’s default input into the entry, so console filtering can slice by OmniStudio process.
  • Appends any extra input keys beyond the known ones as an “OmniStudio Input” block on the entry’s message, so process-specific context flows into the log without extra plumbing.

Actions

Every action accepts a Map<String, Object> and returns a Map<String, Object> output (with isSuccess, transactionId, parentLogTransactionId, requestId, and error details on failure).

ActionPurpose
newEntryAdd a log entry. Supports every enrichment key above.
saveLogPersist buffered entries. Optionally accepts saveMethodName.
getTransactionIdReturn the current transaction ID (for async parent/child linking).
getParentLogTransactionId / setParentLogTransactionIdRead / set the parent transaction ID.
getScenario / setScenario / endScenarioRead / set / end the transaction’s scenario.
tryCatchShorthand for newEntry with loggingLevel=ERROR and a serialized-input message; useful in generic catch blocks.

Where next