Remote Action (Managed Package)

For the managed package runtime, call Apex classes from Omniscript using the Remote Action element.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

Before You Begin

Create an Apex class in Salesforce to call from Omniscript.

  1. Add a Remote Action before a Step, in a Step, or after a Step to load data or send data in the Omniscript. The Omniscript's data JSON is sent as the input.
  2. In the Remote Class field, enter the name of the Apex class that the action calls.
    Note
    Note

    The Apex Class must implement NS.VlocityOpenInterface. NS = the namespace of the Apex class.

  3. In the Remote Method field, enter a method of the class that the Action calls. For example—validateAddress.
  4. (Optional) In the Pre- and Post-Transform Data Mapper Interface—optionally select an Omnistudio Data Mapper Transform interface to run before or after the Remote Action.
  5. (Optional) Change the amount of time before the Action times out using the Remote Timeout property. In the element, click Edit Properties as JSON, and in the remoteTimeout property, set a time in milliseconds. The default timeout is 30,000, or 30 seconds. The maximum is 120,000, or 120 seconds.
  6. (Optional) Configure additional properties in the Remote Action.
  7. (Optional) When Invoke Mode is set to non-blocking, elements using default values will not receive the response because the element loads before the response returns. You must configure these properties to map the response to an element:
    • Response JSON Node: VlocityNoRootNode

    • Response JSON Path: The name of the Omniscript Element receiving the value.

  • Example (Managed Package)
    For the managed package runtime, in the Troubleshooting Omniscript, the callOut1 Remote Action element calls an external system to check if the asset is still under warranty.
  • Remote Action Properties (Managed Package)
    For the managed package runtime, this page contains information on Remote Action Properties.