# Synchronization

#### Synchronize transaction status with order status

When enabled, the transaction status of all affiliate transactions is synchronized every half hour with the status of the corresponding linked order. For example, a commission can automatically become cashable and receive the status *Completed* as soon as the order has been *Completed* and [the number of days to wait set in the configuration has been reached](/plugin-documentation/en/apps/affiliate-marketing/configuration/basic-configuration.md#days-to-wait-until-credit-withdrawal).

By default, all transactions with an *Open* or *In progress* status are synchronized - as well as all transactions that have not yet passed the specified number of days.

{% hint style="success" %}
**Conditions that must be met for an affiliate transaction to receive the status “Completed” through automatic synchronization and thus become payable to the affiliate**

* The order status of the linked order must be Completed
* The number of days to wait (see [Basic Configuration](/plugin-documentation/en/apps/affiliate-marketing/configuration/basic-configuration.md#days-to-wait-until-credit-withdrawal)) must have been exceeded\
  (Scheduled Tasks must be configured correctly in Shopware)
  {% endhint %}

#### No longer synchronize a *Completed*/*Cancelled* transaction

Once synchronization is activated and the status of a transaction is *Completed* or *Canceled*, it will no longer be synchronized - the final status is thus set one time and will not be changed automatically afterwards. The status can still be adjusted manually, of course.

#### Keep the number of promoted orders per affiliate up to date

The number of advertised orders is stored in the database to be accessed at short notice for statistics and commission surcharges or deductions. If a transaction is deleted or created manually, the number of orders displayed may differ. The synchronization process performs regular updates and keeps the value of the orders up to date - otherwise the number of advertised orders is only updated when an order is complete.


---

# Agent Instructions: 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:

```
GET https://docs.codegiganten.de/plugin-documentation/en/apps/affiliate-marketing/configuration/synchronization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
