Transfer deletions or deliberately leave records in place
An item leaves the scope that a route transfers: ERS-2087 "Dichtungssatz Nordfluss"
was in the item group 101 Ersatzteile and was moved to the item group 104 Auslaufartikel.
The route
"Artikel Cambira Austria" placed it in the Austrian company for months — since the
change, it drops out of the transfer. Over there, it stays unchanged and looks
as if it were still maintained.
The most important statement first: Xchange deletes nothing in the target system. Even the stronger of the two settings only reports — what the target system makes of it, it decides itself. In the example, the Austrian company sets the item to inactive.
What you need
- The permission Routes at the level Full — see Permissions.
- A route of the type Processing. Only it has the Behavior tab.
- For an exit from the data filter to be reported: the Data origin Dataset and a schedule with the run type Full — see Run on a schedule. Only a route with Dataset searches a dataset from which something could drop out; a queue route is handed whatever is due. If the source flags deleted records itself, none of this applies — see When the source flags deletions.
- Starting point: Configuration → Routes → the route → Behavior tab.
Xchange saves every entry automatically. It takes effect in operation only with the activated configuration snapshot.
1. Choose the delete behavior
On the Behavior tab, in the Delete behavior section, there is a Strategy field with two settings:
| Setting | What it means |
|---|---|
| Do nothing | The record stays in the target system as it was last transferred. Xchange stays silent. This is the default. |
| Deactivate in the target system | Xchange reports the record to the target system as soon as it leaves the scope. What happens there is set up by the target system — usually it sets it to inactive. |
For "Artikel Cambira Austria", the setting is Deactivate in the target system: a discontinued item that stays active in the Austrian company continues to be ordered there.
Do nothing fits where the target system maintains the data itself anyway or where an exit can be temporary.
Choose the setting before the route transfers the data set in full for the first time. Xchange keeps the last transferred state, which a report falls back on, only under Deactivate in the target system. If it is missing for a record transferred earlier, that record's deletion is not transferred but ends up in Clarification — see Routes — Behavior.
2. Switch on reporting
The setting needs a second switch. It says how an exit is handled. When Xchange checks whether there is one is a second setting, and it is in a different place: on the schedule.
- Switch to the Automation tab and open the scheduled trigger.
- Set the Run type to Full.
- Check the Report records no longer delivered checkbox under the label Cleanup.

The checkbox appears only when both come together — run type Full and delete behavior Deactivate in the target system. If it is missing, first check these two fields. If you later set the run type back to Incremental, Xchange clears the checkbox again.
Why only a full run: an incremental run looks only at what has changed since the last time. A record that has dropped out of the data filter has simply disappeared for it. Only a full run knows the whole current scope and can compare it with what the route transferred earlier.
For "Artikel Cambira Austria", the checkbox is therefore on the Sunday run at 3:00 AM, which
runs in full; the daily one at 2:00 AM runs incrementally and stays without the checkbox.
ERS-2087 dropped out of the filter during the week and was reported on Sunday.
You find the same switch in the Start run dialog when you trigger a full run by hand — see Push manually — a run or a single record.
3. Validate and activate
Activate the configuration snapshot — see Validate and activate. Only then does the setting take effect.
The next full run shows the result: in History, it is followed by a second run of the
type Cleanup that refers to it. It contains exactly the reported records — in the example
one, ERS-2087. Its job details show Deletion — no longer delivered under Reason —
see History.
What Xchange considers an exit
An exit is a record that this route transferred earlier and that is missing this time in the full run.
This results in a distinction that becomes important in everyday use:
| The record … | What Xchange sees |
|---|---|
| … drops out of the Data filter, but still exists | It is missing in the run. Exit. |
| … was deleted in the source system | It is missing in the run. Exit — the same case. |
For Xchange, both are the same event. The event trigger reacts only to Created and to Changed; a deletion in SAP Business One stays silent for it. A deleted record is therefore noticed only at the next full run with the checkbox checked.
You do notice one difference, namely in what is transferred: for a filtered-out record, Xchange can still fetch the current fields. For a deleted one, that is over — then Xchange falls back on the last transferred data. If that is missing too, Xchange writes nothing, and the job ends up in Clarification with the cause Deletion without stored record — see Clarification.
Every record that the full run has read counts as seen — including one whose transfer failed in the process. So only what is missing in the read dataset is reported.
When the source flags deletions
Some sources do not let a deleted record disappear but keep delivering it — with a field that marks it as deleted, often with nothing left but its key:
{ "customer_no": "K-10352", "deleted": true }
For such a source you need neither the full run nor the checkbox. The route recognizes the deletion the moment the record arrives — whether it reads a dataset or from a queue.
- On the Behavior tab, under Delete behavior, choose the setting Deactivate in the target system.
- Under Deletion marker, enter the condition by which a deleted record can be recognized — in
the example Field
OriginalPayload.deleted, Valuetrue. - Let the mapping tell the deletion apart: set the field that deactivates in the target system
depending on whether the source field
Header.EventTypeis Delete. In the mapping's test area, try this out with a flagged test message.
Without step 3, nothing arrives in the target system: the route transfers the last transferred version again, the mapping turns it into the same result as last time, and the job ends as Skipped (no change). Where the job ran as a deletion, its job details show Deletion — deletion marker in the source under Reason.
A flagged record that the route never transferred ends as Skipped (never transferred); if the delete behavior is Do nothing, every one ends as Skipped (deleted). All fields and messages of the deletion marker are described under Routes — Behavior.
When very many exit at once
If a large part of the dataset drops out of the scope in a run, Xchange holds the messages instead of sending them. The run then shows Cleanup on hold, and someone decides between Release and Discard.
The hold protects against a data filter that was accidentally set too narrow: it turns half the dataset into an exit, and without this hold half the item list would be inactive over there before anyone noticed. How you decide such a case is described under Release or discard a suspended cleanup.
See also
- Narrow down with a data filter (guide) — how the scope from which a record can drop out comes about
- Run on a schedule (guide) — run types and when a full run makes sense
- Routes — Behavior (reference) — delete behavior and deletion marker, field by field
- Execution (core concept) — what a run is and what it summarizes