OmniStudio Expression Set Action: A Beginner’s Guide / Blogs / Perficient

OmniStudio Expression Set Action: A Beginner’s Guide / Blogs / Perficient

OmniStudio Expression Set Action is a powerful feature from Salesforce Industries. Allows you to make changes and rule-based decisions in guided processes, such as OmniScripts and Integration procedures. Instead of writing rules in many places, you can define your business rules once a week. Expression set and use them where you need them. This improves consistency, reduces errors, and simplifies maintenance.

https://plumprush.com/dCmnF.z_dFGFNnv-Z/GjUe/ee-m/9qutZjU/lykAPDT/Yn3PNiTlUk0tNEzegptKNNjdcD1fNITaQ/3/OnQu

What is an expression set action?

An expression set action acts as a bridge between:

  • OmniScripts/Integration Procedures, and
  • Expression sets, which are part of the business rules engine (BRE)

In simple terms:

  • Your OmniScript or integration procedure sends inputs (such as OrderValue or DeliveryType).
  • The expression set processes this data using calculations, conditions, or searches.
  • The result is returned as structured JSON output, which you can display or use for further logic.

What can expression sets do?

Expression sets are designed to handle:

  • Mathematical calculations
  • Conditional logic (if/else situations)
  • Searches using decision matrices
  • Data transformations

Common real-world use cases

  • Calculate shipping or delivery costs.
  • Determine client eligibility.
  • Applying discounts or rates.
  • Computation of taxes or surcharges

Because expression sets are powered by JSON, they are lightweight, fast, and ideal for processing complex rules.

Create a set of expressions: step by step

Step 1: Navigate to Expression Sets

  1. Go to Salesforce settings
  2. Search for expression sets (in OmniStudio/Industries functions)
  3. Click New

Step 2: Basic setup

  • Name: Example: Shipping costs Exp.
  • Type of use: Select Default
  • save the record

This automatically creates Version 1 of the set of expressions.

Building logic using the expression set builder

After saving, open the Expression Set Builderwhich provides a visual canvas for designing logic.

Step 3: Define variables (Resource Manager)

Variables represent the data that your set of expressions uses and produces.

Example variables:

  • Delivery type: inbound (e.g. standard or express)
  • OrderValue – Input (order amount)
  • Expected delivery charges: intermediate result
  • Total Charges – Final Output

Each variable must have:

  • a clear name
  • Data type (number, text, boolean, etc.)
  • Input or output configuration

Step 4: Use decision matrices (optional but powerful)

If your charges depend on predefined rules (for example, delivery type), you can use a Decision matrix.

  1. Drag the Lookup table element on canvas
  2. Associate it with an existing decision matrix, such as DeliveryCharges
  3. Use inputs like DeliveryType to return ExpectedDeliveryCharges

This keeps your logic external and easy to update without modifying the code.

Step 5: Add calculations

To perform arithmetic operations:

  1. Drag the Calculation Elements panel element
  2. Define a formula like:
    TotalCharges = ExpectedDeliveryCharges + OrderValue

This element performs the actual calculations and stores the result in a variable.

Step 6: Sequence and Test

  • Arrange elements on the canvas in logical order.
  • Use the Simulate Option to test with a sample JSON input:

{

“Type of delivery”: “Standard”,

“Order value”: 1000

}

Verify that the output JSON returns the expected TotalCharges.

Step 7: Activate the expression set

Before use:

  • Place Active start date
  • Define Range (for rule priority)
  • Select Output variables
  • Click Activate

Your expression set is now ready to use.

Auto Refresh and Link Loop
Screenshot 13 1 2026 132048 Perficient 1d2 Dev Ed.develop.lightning.force.com
Popup Iframe Example

Use the expression set action in an OmniScript

OmniScripts are user-facing guided flows, and expression set actions allow logic to run automatically in the background.

Step 1: prepare the supplies

In OmniScript:

  • Create fields like DeliveryType and OrderValue
  • Capture values ​​from user input or previous steps

Step 2: Add Expression Set Action

  • Open OmniScript Designer
  • Drag Expression Set Action between steps
  • Select your expression set (ShippingChargesExp)

Step 3: Configure input mapping

Map entries using JSON paths, for example:

  • %Step:Customer Details:Delivery Type%
  • %Step:CustomerDetails:OderValue%

Step 4: Use output values

In the next step:

  • Wear Set values either Show text items
  • Reference of results returned as TotalCharges

Step 5: test

Preview OmniScript with different inputs to ensure calculations work correctly.

Using the expression set action in an integration procedure

Integration Procedures Handle server side processing and are ideal for high-performance logic.

Step 1: Create an integration procedure

  1. Go to Integration Procedures
  2. Click New
  3. Add an expression set action from the Actions palette

Step 2: configure the action

  • Select the set of expressions
  • Map inputs such as DeliveryType and OrderValue

Step 3: Return results

  • Add a Response action
  • Include output variables
  • Save and run to validate results.

Step 4: Call from OmniScript

Use a Integration procedure action inside OmniScript to invoke this logic.

This approach improves scalability and keeps OmniScripts lightweight.

Key learning resources

If you are new to OmniStudio, we highly recommend these resources:

  • Trailhead
  • Salesforce Help Documentation

Leave a Reply

Your email address will not be published. Required fields are marked *