runExpressionSet
POST {{_endpoint}}/services/data/v{{version}}/actions/custom/runExpressionSet/:expressionSetAPIName
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}
Note
The API name of an expression set is unique within your Salesforce instance.
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 that does the following:
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:
{
"inputs":[
{
"Age":"25.00",
"Salary":"50000.00"
}
]
}
Sample response
Here’s an example response that has the premium and tax values based on the inputs provided in the example request:
[
{
"actionName":"TaxPremiumES",
"errors":null,
"isSuccess":true,
"outputValues":{
"TaxPremium__Premium":1000,
"TaxPremium__Tax":10,
"TaxToBePaid":1050,
"condition_output__2":"false",
"condition_output__1":"true"
}
}
]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
[{"actionName":"myExpressionSet","errors":null,"isSuccess":true,"outputValues":{"output":1},"version":1}]