Chain
One API’s results are often the next API’s input: list the low-stock products, then raise a purchase order for each. Chain sends the rows on a Console’s Completed tab straight into another endpoint’s Run Batch. No copying to the clipboard, no file to save, and no limit on the number of rows. Both runs remember the link, so you can always trace where a batch’s data came from.
Chain a run’s results
- Open a completed run’s Console and go to the Completed tab.
- Choose the view and type a search, so the table shows exactly the rows you want to send. Chain sends what the table shows: the view’s columns and the rows that match the search.
- Click Chain, beside Copy and Export.
- In the Chain from … dialog, pick the endpoint to send them to, and click Chain.
Run Batch opens for that endpoint with the rows already loaded. Execute it as usual.
Chain is only on the Completed tab. While the run is still running, queued or paused it is disabled, and its tooltip says why (Can’t chain “Paused”); it comes on once the run has ended.
Choose the endpoint
The dialog first lists Suggested endpoints: those where every required variable has a
column of the same name, ignoring case and punctuation (location.gln fills
{{location_gln}}). A column the endpoint remembered
counts too.
To send the rows somewhere else, type in Send them to endpoint:. The search matches the endpoint’s name and path.
Variables count wherever they are: in the path (/orders/{{pk}}), the query parameters, the
headers or the body. An endpoint with no variables at all has nothing for the rows to fill, so
Chain stays disabled for it.
If the rows came from a different environment or organisation than the active one, the dialog says so. It is a warning: Run Batch always sends to the active environment.
Mapping preview
The preview lists the selected endpoint’s variables and the column each one would take, with the first row’s value:
| Badge | Meaning |
|---|---|
| (none) | The column matches the variable’s name |
| guess | Matched on part of the name. Check it on Map |
| ⚠ missing | No column fills this required variable. You map it on Map |
| empty | Optional variable (|opt, |null) with no column. It is left out of the request |
Generated {{A8:…}} and environment {{ENV:…}} variables fill themselves and are not listed.
Columns no variable uses are not listed either.
The chained Run Batch
A chained Run Batch’s Source step is set: the rows are its input. A line at the top reads Chained from the source run, and links back to its Console.
It then skips ahead the way every Run Batch does (see Skipping ahead): straight to Review when every column maps and every row is valid, otherwise to the step that needs you. Back stops at Map. To use different data, start a normal Run Batch.
If a Run Batch for that endpoint is already open, Dobermann asks before replacing what it holds.
The two runs are linked when you click Execute. Cancelling anywhere before that leaves no link, and neither does a batch cancelled from the queue before it ran.
The Links tab
A run that has been chained, in either direction, has a Links tab in front of Input:
- Came From — the run whose rows became this batch’s input.
- Sent To — every batch this run’s rows were sent to.
| Column | |
|---|---|
| Batch | The linked run’s ID. Click it to open that run’s Console |
| Endpoint | Click it to open the endpoint |
| Environment, When | The linked run’s |
| View, Rows | The view the rows were taken from, and how many were sent |
| Status | The linked run’s status |
| Differences | Where the linked run differs from this one |
Differences
Differences shows, as a warning, anything that changed between the two runs: the environment,
the organisation, or a request header both runs sent with different values (a Location, say).
Same environment and headers means nothing changed: environment, organisation and headers all match. Secrets such as Authorization are never
compared or shown.
Related Topics
- Console — the Completed tab, views and search
- Named Views — choose the columns a chain sends
- Batch Preparation — mapping, review and execute