Routes
A route is a data exchange that you describe once and then let run again and again: which data, with which system, in which direction, when.
It carries exactly one connection — its counterpart — unless it stays within SAP Business One; then it has none. It lives in a configuration snapshot; in operation, what was last activated runs.
The three entries that determine a route
They are set at creation and describe what the route is in the first place:
| Entry | What it says |
|---|---|
| Direction | Import — the data arrives at Xchange. Export — it leaves Xchange. Internal — it stays in SAP Business One; the route reads and writes there and has no connection. |
| Type | Processing — the route maps the fields and writes to the target system. Dispatch — the route looks at messages and passes them on to other routes. |
| Data origin | where the route takes its data from: Dataset, Queue or Dispatch input. |
In the example: "Artikel Webshop" is Export, Processing, Dataset — items from your own organization to the online shop. "Bestellungen Webshop" is Import, Processing, Queue — the way back.
These three are fixed after creation. What can be changed afterwards is name, description and connection. If you need a different cut, create a new route — everything else depends on the three entries, from the field suggestions to the trigger.
Processing and dispatch
A route of type Processing transfers data. It reads on one side, maps the fields and writes on the other. Eight of the nine routes in the example are of this kind.
A dispatch route mediates. It receives incoming messages, looks at them and passes each one on to the route that is responsible for it. "Statusmeldungen Kessler" is one: the logistics provider reports pickup, transport, delivery and failed delivery through the same inbox, and the dispatch route sorts them onto four routes of their own.
For a dispatch route, therefore:
- A dispatch route has no object. It assigns the message — what is in it is decided only by the route that receives it.
- A dispatch route is always Import. Its task is receiving.
How the assignment to the target routes is described is covered under Dispatch.
Where a route takes its data from
| Data origin | From where |
|---|---|
| Dataset | Xchange queries the dataset — all items, or those changed since the last run. |
| Queue | A system has delivered data; it sits there waiting to be processed. |
| Dispatch input | A dispatch route passes the message on — this route is supplied by it. |
Direction and type narrow the choice. An export or internal route knows only the dataset: it queries SAP Business One for what it is to pass on. An import route of type Processing knows all three. A dispatch route knows only the Queue — it is the inbox through which the messages come in. When you create a route, the UI offers exactly what fits together.
Steps
What a route of type Processing does on the target side is in its steps. A step is a write operation: a target, the fields that are written into it, and the condition under which it runs at all.
Most routes have one. Several are needed where a record on the target side consists of several parts — first the header, then the lines.
The order of the steps is part of the configuration. They run from top to bottom, and a later step can use what an earlier one got back — the number that the target system has just assigned, for example. The path leads only in this direction.
A route needs at least one step; before that it is incomplete and is flagged on activation. Which field goes to which is described under Mapping; what happens when writing, under Writing to the target system.
When a route runs
That is determined by its trigger — and a route can have several. "Artikel Cambira Austria" has two: an incremental run daily at 2:00 AM and a full one on Sundays at 3:00 AM.
Two rules apply to the triggers, depending on the cut of the route:
- An event trigger is possible only on an export or internal route. It depends on a change in SAP Business One; what comes in is fetched. An internal route can therefore trigger itself if it creates the object its event listens to — see Routes — Automation.
- The run type Drain queue stands as the only trigger. A route that processes a queue does exclusively that — an additional full or incremental run beside it would be a second access to the same data.
Everything else about schedules, events and run types: Triggering.
What is decided elsewhere
- Whether it is running right now is shown by operation — see Execution.
- From when a change takes effect is determined by activation — see Configuration Snapshots.
- How Xchange reaches the target system is determined by the connection — see Connections.
See also
- Routes (reference) — every field of the list, the create dialog and the General tab
- The basic model (core concept) — how connection, route and configuration snapshot fit together
- Dispatch (core concept) — how a dispatch route finds its targets
- Triggering (core concept) — what sets a route in motion