---
title: "Execute a Logic Without a Context in a Service"
method: POST
path: "/formulamanager.executeformulaservice/{uniqueName}"
tags: ["Logics"]
---

# Execute a Logic Without a Context in a Service

`POST /formulamanager.executeformulaservice/{uniqueName}`

Executes a logic and returns results.<p>
The main difference between this command and the executeformula command is, that in this **formulamanager.executeformulaservice** command, the logic context is preserved and reused. This allows the formula to build and maintain a cache, as elements like api.global persist between calls.<br>
Each thread operates with its own formula context and `api.global` instance. The system maintains a fixed number of service threads, with a predefined lifespan for each. Parallel API requests are queued and executed on these threads in sequence. If a request cannot be processed within a short timeframe, it will fail. For this reason, it is crucial that subsequent requests execute efficiently, leveraging caching whenever possible. Be aware that during long cache warm-up periods (e.g., when new threads are initialized), there is a higher risk of request failures.<p>
Use the `output=rawjson` parameter in the URL, for example `/formulamanager.executeformula/QuoteLogic?output=rawjson` in order to return the result in the simple JSON format as `"resultName"`:`result`.

## Request body

- object
  - `data` object — Provide inputs for the logic as key-value pairs.

## Response `200`

Example response

- object
  - `response` object
    - `node` string
    - `data` object[]
      - `formula` object
        - `version` number
        - `typedId` string
        - `uniqueName` string
        - `label` string
        - `validAfter` string
        - `status` string
        - `simulationSet` unknown
        - `userGroupEdit` unknown
        - `userGroupViewDetails` unknown
        - `formulaNature` unknown
        - `lastUpdateByName` string
        - `formulaType` string
        - `createdByName` unknown
        - `createDate` string
        - `createdBy` number
        - `lastUpdateDate` string
        - `lastUpdateBy` number
    - `status` number

---

[API](https://skmtc.net/pricefx/apis/the-pricefx-backend-api.md) · [All operations](https://skmtc.net/pricefx/apis/the-pricefx-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pricefx/the-pricefx-backend-api/versions/0850b5d6be73/schema)
