Evaluate formulas in batch

Prev Next
Post
/v1/FormulaEvaluation/

Evaluates one or more formulas for multiple input records in a single request. Unlike the GET request, which runs a formula for a single set of values, the POST request lets you send a batch of products or other inputs in a single call. Instead of passing a formula ID and query parameters in the URL, you send a JSON request body that specifies:

  • Which formulas you want to evaluate
  • Which output fields you want returned
  • The list of input records the formula should process

The response contains a list of calculated results—one result for each item in the batch.
Security
API Key: Authorization
Header parameter nameAuthorization

Add an Authorization header to authenticate requests originating outside of Zilliant's internal network. Set the header to Authorization: OAuth <tokenResponseBase64>.

<tokenResponseBase64> is the Base64-encoded entire JSON response body returned by the Salesforce OAuth token endpoint. Encode the full JSON payload, not only the access_token field.

For details, read Request an access token.

Header parameters
X-Forwarded-Host
string

OAuth host for your environment. Use it for all requests that originate outside Zilliant’s internal network. For details, read X-Forwarded-Host header in Introduction.

Body parameters
Batch discount calculation

Evaluate the fxst_calcDiscountedPrice formula for multiple products at 10% discount.

{
  "formulas": [
    "fxst_calcDiscountedPrice"
  ],
  "includeSubComponents": true,
  "lines": [
    {
      "pm_ProductId": "114695416",
      "pm_Discount": 10
    },
    {
      "pm_ProductId": "114122606",
      "pm_Discount": 10
    },
    {
      "pm_ProductId": "114270025",
      "pm_Discount": 10
    },
    {
      "pm_ProductId": "114953272",
      "pm_Discount": 10
    }
  ]
}
Expand All
object

Defines the list of formulas to evaluate, the desired content in the output results, and the data that the formulas will evaluate.

formulas
Array of string Required

Array of formulas to evaluate. Each item is the unique system ID of a formula. Your Zilliant representative can provide the available formula IDs and their business purpose.

Example[ "fxst_calcDiscountedPrice" ]
string
includeSubComponents
boolean Required

Controls response detail.

  • true—Include intermediate calculation results for each formula, evaluated reference data definitions (RDDs), and all input parameters.
  • false—Include only final results.

Ignored if you include the responseDetails parameter.
Valid values[ true, false ]
Exampletrue
responseDetails
Array of string

Controls which details are included in the response. Overrides includeSubComponents when present. Supported values:

  • subFormulas—Show intermediate calculation results for each formula.
  • inputParameters—Show input parameters passed to each formula.
  • rdds—Show evaluated results of reference data definitions (RDDs).
  • all—Show all detailed results (same as includeSubComponents: true).
  • none—Show only final results for each formula.
Example[ "all" ]
string
Valid values[ "subFormulas", "inputParameters", "rdds", "all", "none" ]
lines
Array of object Required

Array of input records. Each object contains key-value pairs for the parameters expected by the specified formulas, for example, pm_ProductId and pm_Discount. Your Zilliant representative can provide the expected parameters for each formula.

object
Example{ "pm_ProductId": "114695416", "pm_Discount": 10 }
Responses
200

Successful evaluation of the formula batch call. Returns a JSON body comprising the calculated results.

400

No suitable parameters received.

404

Formula with the given formulaId does not exist.

422

Formula exists but the service cannot process it.

500

Service failed to process request.