Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CallableLogger Enhancements #790

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Conversation

jongpie
Copy link
Owner

@jongpie jongpie commented Oct 31, 2024

Added 3 enhancements to the CallableLogger class (used for OmniStudio logging & loosely-coupled dependencies)

  1. Resolved Log the JSON input provided for Steps in OmniStudio #788 - It now automatically appends OmniStudio's input data for OmniScript steps as JSON to the Message__c fields on LogEntryEvent__e and LogEntry__c.

    • In the screenshot below, a simple OmniScript has been setup with 2 steps (each of which shows some inputs), with logging actions after each step:

      image

    • It now automatically stores the JSON from each of the steps & appends it to the message. Long-term, it might make sense to create a new field to store this data, but for now, appending it to Message__c is a quick & easy way to capture the JSON.

      image

  2. The newEntry action now supports setting the parent log transaction ID, using the optional argument parentLogTransactionId.

  3. Transaction details are now returned in the output for all actions:

    • transactionId: The current transaction ID, returned from Logger.getTransactionId()
    • parentLogTransactionId: The parent log transaction ID (or null if no parent has been set), returned from Logger.getParentLogTransactionId()
    • requestId: The Salesforce-generated request ID, returned from System.Request.getCurrent().getRequestId()

    {073C80F5-D96D-4E03-B383-A1168D906A82}

… logging & loosely-coupled dependencies)

    1. It now automatically appends OmniStudio's input data for OmniScript steps as JSON to the Message__c fields on LogEntryEvent__e and LogEntry__c.
    2. The 'newEntry' action now also supports setting the parent log transaction ID, using the argument 'parentLogTransactionId'.
    3. Transaction details are now returned in the output for all actions, including the current transaction ID, the parent log transaction ID, and the Salesforce-generated request ID.
@jongpie jongpie added Type: Enhancement New feature or request Layer: Logger Engine Items related to the core logging engine Salesforce Feature: Callable Interface Items related to dynamically using Nebula Logger via the Apex's Callable interface Logging Source: OmniStudio Items related to using Nebula Logger within OmniStudio labels Oct 31, 2024
@jongpie jongpie temporarily deployed to Event Monitoring Scratch Org October 31, 2024 16:45 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Advanced Scratch Org October 31, 2024 16:45 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to OmniStudio Scratch Org October 31, 2024 16:58 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Platform Cache Scratch Org October 31, 2024 16:59 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org October 31, 2024 17:08 — with GitHub Actions Inactive
@jongpie jongpie merged commit 1707c41 into main Oct 31, 2024
1 check passed
@jongpie jongpie deleted the feature/callable-logger-enhancements branch October 31, 2024 18:58
@jongpie jongpie added the Salesforce Feature: OmniStudio Items related to using Nebula Logger within OmniStudio label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: Logger Engine Items related to the core logging engine Logging Source: OmniStudio Items related to using Nebula Logger within OmniStudio Salesforce Feature: Callable Interface Items related to dynamically using Nebula Logger via the Apex's Callable interface Salesforce Feature: OmniStudio Items related to using Nebula Logger within OmniStudio Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log the JSON input provided for Steps in OmniStudio
2 participants