> ## Documentation Index
> Fetch the complete documentation index at: https://api.basetools.cz/llms.txt
> Use this file to discover all available pages before exploring further.

# Automation and webhooks

> Automatic Actions, webhooks, and getJournalList — catching order events in real time

Base only reacts to changes when you explicitly configure it to. That's what **Automatic Actions** are for — "IF X happens, THEN do Y" rules configured directly in the Base panel (both generally and within specific integration settings, e.g. Integrations → Allegro → Order Statuses).

## Three ways to catch a change on an order

1. **An Automatic Action in Base** — e.g. "if a cancellation request arrives from the marketplace, set status to Cancelled." The simplest to maintain, since it runs entirely on Base's side and needs no extra logic in your system.
2. **Polling [`getJournalList`](https://api.baselinker.com/index.php?method=getJournalList)** — returns a list of order events from the last 3 days, including confirmation and cancellation. Disabled by default; enable it in the Base panel under **Profile → API**.
3. **A webhook** — a "Call URL" action in Automatic Actions. Base calls your defined URL the moment the watched event occurs, passing the order ID and optionally extra parameters (e.g. `&cancel=1`) or values pulled directly from the order (similar to what's available in email templates). Usually the fastest way to catch an event in real time without polling.

## Most common use case: catching a cancellation

A customer requests to cancel an order on a marketplace → Base knows about it → you need to find out before you ship the order unnecessarily. The solution is a combination of the above: either an Automatic Action directly sets status Cancelled/Rejected (see the specific rules in [Statuses](/en/objednavky/statusy#cancelled-orders)), or a webhook notifies you, or you notice it during a regular `getJournalList` poll.

## Delivering tracking numbers and invoices to the marketplace

Forwarding a tracking number or invoice to the order source is often tied to a specific status and **isn't instant** — Base processes it in batches, typically around 9:00, 10:00, 13:00, 16:00, and 23:00 (± a few minutes). For Alza integrations, the cut-off time (COT) setting also plays a role. Details in [Shipping labels](/en/objednavky/prepravni-stitky) and [Invoices](/en/objednavky/faktury).

<Tip>
  For new integrations, we recommend combining webhooks (for fast reaction to critical events like cancellations) with regular `getOrders`/`getJournalList` polling as a safety net in case a webhook fails for some reason.
</Tip>
