> For the complete documentation index, see [llms.txt](https://docs.unimarket.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unimarket.com/documentation/master-data/approval-configuration-request-integration.md).

# Approval Configuration Request Integration

The **Approval Configuration Request** is an inbound integration point used to synchronize approval hierarchies, groups, and financial delegations from an external ERP system into Unimarket. This update is typically scheduled periodically, such as nightly, to ensure both systems remain in sync.

{% hint style="info" %}
For a real-time alternative where approval decisions stay in the external ERP rather than being loaded into Unimarket, see [Approval Request/Response Integration](/documentation/master-data/approval-request-response-integration.md).
{% endhint %}

## How Approval Chains Work

Unimarket utilizes hierarchical approval chains that define specific approvers and their financial limits.

* **Mapping**: Chains are mapped to either specific **Account Codes** or an **Organization Unit**.
* **Routing**: At checkout, the system identifies the correct chain based on the account or organization used and routes the requisition to the user or group with the appropriate delegation.

## Approval Chain Requirements

To ensure the hierarchical logic functions correctly, chains must adhere to these rules:

* **Unique Naming**: All levels, groups, and chains must have unique names.
* **Limit Logic**: The financial limit of an approver must always be equal to or greater than the limit of the previous approver in the chain.
* **Auto-Provisioning**: Users can be automatically created in Unimarket by providing basic user details within the approver elements.

## Approval Configuration Message Elements

The integration message consists of several optional elements, allowing you to choose which data is managed by the external system versus within Unimarket.

| Element                  | Description                                                                                          | Integration Behavior                                                          |
| ------------------------ | ---------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **Global Configuration** | General settings like wait and reminder periods.                                                     | Omit to manage settings within Unimarket.                                     |
| **Approval Levels**      | Unique dollar amounts and names representing financial delegation.                                   | If included, existing levels in Unimarket are replaced.                       |
| **Approver Groups**      | Unique groups of users or roles (e.g., "CFO") for specific chain points. Group names must be unique. | Optional element. If included, existing groups in Unimarket are replaced.     |
| **Approval Chains**      | The hierarchical list of approvers and groups. Review additional information below.                  | Optional element. If included, existing chains are replaced.                  |
| **Org Unit Mapping**     | Maps chains to specific organization units.                                                          | Optional element. Omit if using account-based approval routing.               |
| **Self Approval**        | Defines specific self-approval limits for users.                                                     | Optional element. If included, other users' self-approval levels are removed. |

## Approval Chain Element Requirements

When configuring approval chains via the **Approval-Configuration-Request** integration, each `approver` element must adhere to specific data requirements and logical rules to ensure requisitions are routed correctly.

#### Approver Identity Options

Each `approver` element in the XML message must identify who is responsible for the approval. You can define this using one of the following elements:

* **user-ref**: References an existing user already present in Unimarket.
* **approver-group-ref**: References a pre-defined group of users where any member can approve the request.
* **user-detail-basic**: Used to **auto-provision** (automatically create) a new user in the system if they do not already exist.

#### Financial Delegation Logic

The system enforces strict hierarchical logic based on the financial limits assigned to each step of the chain:

* **Level Assignment**: Every `approver` element must be associated with an approval level (a named dollar limit) that exists either within the current XML request or previously in Unimarket.
* **Ascending Limits**: The financial limit of any given `approver` element must always be **equal to or greater than** the limit of the preceding `approver` in the chain. This ensures that as a requisition moves through the workflow, it reaches users with progressively higher spending authority.

#### Automatic User Provisioning

To streamline administration, you can create users "on the fly" during the approval data upload. By including the `user-detail-basic` element within an `approver` tag, Unimarket will automatically provision that user with the necessary profile information to participate in the approval workflow.

## Troubleshooting

* **Sync Errors**: If levels or groups are missing after a run, check if those elements were omitted from the XML message, as omitted elements cause the system to retain existing data.
* **Validation**: Ensure that all `user-ref` or `approver-group-ref` entries correspond to existing data or are defined within the same request.

## Sample Approval Illustration

![Sample approval chain illustration](https://help.unimarket.com/hc/article_attachments/53676549141017)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.unimarket.com/documentation/master-data/approval-configuration-request-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
