Skip to content

Improve Flow Action UX: Add description to @InvocableVariable annotations #967

@rileymeye1

Description

@rileymeye1

The three Flow invocable classes (FlowLogEntry, FlowRecordLogEntry, FlowCollectionLogEntry) are missing description properties on their @InvocableVariable annotations. This causes every input field in the Flow builder to display the generic Salesforce help text:

"Enter a value or select a resource to provide as an input to the selected action."

Additionally, fields like Logging Level and Save Method accept freeform text but only a fixed set of values are valid. Without guidance in the help text, System Admins and Developers have no way of knowing what values are accepted without referencing external documentation.

Proposed Changes

Add description to all @InvocableVariable annotations. This gives System Admins and Developers meaningful, contextual help text. For fields with constrained values (like Logging Level and Save Method), the valid options are listed directly in the description.

Field Proposed description
Flow API Name The API name of the Flow creating this log entry. Salesforce cannot determine this automatically.
Log Entry Message The message text to include in the log entry.
Logging Level The severity level for this log entry (ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST). Defaults to DEBUG.
Flow Fault Error Message If the Flow encounters a fault, provide the error message here to include it in the log entry.
Throw FlowException... When true and a fault message is provided, rolls back database operations and throws a Flow fault exception. Defaults to false.
Save Log When true, saves all pending log entries immediately. Defaults to false.
Save Method Controls how the log is saved (EVENT_BUS, QUEUEABLE, REST, SYNCHRONOUS_DML). Only applies when Save Log is true. Defaults to the org's configured save method.
Record ID (FlowLogEntry) A record ID to associate with this log entry for context.
Record (FlowRecordLogEntry) An SObject record to associate with this log entry. The record's JSON is automatically stored.
Records (FlowCollectionLogEntry) A collection of SObject records to associate with this log entry. The records' JSON is automatically stored.
Scenario A name for the current transaction's scenario, useful for filtering and grouping log entries.
Tags A comma-separated list of tags to assign to this log entry (e.g., "Authentication,Login").

Example (before / after)

// Before
@InvocableVariable(required=false label='(Optional) Logging Level')
global String loggingLevelName;

// After
@InvocableVariable(
    required=false
    label='(Optional) Logging Level'
    description='The severity level for this log entry (ERROR, WARN, INFO, DEBUG, FINE, FINER, FINEST). Defaults to DEBUG.'
)
global String loggingLevelName;

Affected Files

  • nebula-logger/core/main/logger-engine/classes/FlowLogEntry.cls
  • nebula-logger/core/main/logger-engine/classes/FlowRecordLogEntry.cls
  • nebula-logger/core/main/logger-engine/classes/FlowCollectionLogEntry.cls

Notes

  • The deprecated topics field can be left as-is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions