Newer Version Available
Expression Set Actions
Invoke an active expression set. An expression set is a user-defined
rule that accepts an input and returns the output based on the configured
function.
The configured function of an expression set can be a simple decision matrix lookup, a calculation based on a mathematical formula, a condition, or another expression set.
These actions are available in API version 55.0 and later.
Supported REST HTTP Methods
- URI
- /services/data/v55.0/actions/custom/runExpressionSet/{ApiName}
- Formats
- JSON
- HTTP Methods
- POST
- Authentication
- Authorization: Bearer token
Inputs
Vary depending on the selected expression set.
Outputs
Vary depending on the inputs of the selected expression set.
Usage
This section has the sample request and response for invoking an expression set with these steps.
- Find the tax percentage and the premium corresponding to specific age and salary using a decision matrix lookup.
- Check the age criterion to calculate the total tax.
- Calculate the total tax to be paid based on the age group, salary, and the tax percentage.
- Sample request
-
Here’s an example POST request that has the inputs, such as, age and salary:
1{ 2 "inputs":[ 3 { 4 "Age":"25.00", 5 "Salary":"50000.00" 6 } 7 ] 8} - Sample response
-
Here’s an example response that has the premium and tax values based on the inputs provided in the example request:
1[ 2 { 3 "actionName":"TaxPremiumES", 4 "errors":null, 5 "isSuccess":true, 6 "outputValues":{ 7 "TaxPremium__Premium":1000, 8 "TaxPremium__Tax":10, 9 "TaxToBePaid":1050, 10 "condition_output__2":"false", 11 "condition_output__1":"true" 12 } 13 } 14]