Evaluate a formula

Prev Next
Get
/v1/FormulaEvaluation/{formulaId}

Evaluates the predefined formula identified by formula ID for a single set of input parameters provided as query parameters. Returns the calculated results as JSON.

Example

GET /v1/FormulaEvaluation/fxst_calcDiscountedPrice?pm_ProductId=114695416&pm_Discount=10

This request evaluates the formula fxst_calcDiscountedPrice and returns the discounted price for the specified product. In this example, the formula expects two inputs passed as query parameters:

  • pm_ProductId—Product you want to calculate the discounted price for.
  • pm_Discount—Discount percentage to apply.

The response contains the formula's calculated output. GET is perfect for this case because you pass a few values in the URL and receive one result.
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.

Path parameters
formulaId
stringRequired

Unique system ID of the formula to call. Your Zilliant representative can provide the list of available formula IDs, their business purpose, and supported query parameters.

Examplefxst_calcDiscountedPrice
Query parameters
queryParameter
stringRequired

Input values the formula needs. Each formula ID supports different query parameters. Your Zilliant representative can provide the list of available parameters.

Note: The Try it & see response feature on this page can’t execute requests that use dynamic query parameter names, such as ProductId=114695416. To use this query parameter, run the request from your preferred tool and manually add it to the request URL.

Examplepm_ProductId=114695416&pm_Discount=10
Responses
200

Successful evaluation of the formula. 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.