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

# Apilo

> Connect Apilo so the chatbot and the Email Assistant answer order and parcel questions from it: status, payment, courier and tracking number

If your orders go through [Apilo](https://apilo.com), that is usually where the most current answer to "where is my order" lives: the order status, whether it is paid, the courier, the tracking number and what is happening to the parcel.

Once Apilo is connected, the chatbot and the Email Assistant check it first when a customer asks about an order, and fall back to the order data from your shop platform when Apilo has no matching order or does not answer. It works whatever your shop runs on.

> [!NOTE]
>
> Sensbot only **reads** from Apilo. It never changes an order, a status or a shipment. Apilo has no read-only API keys, so the application you add has full access to your Apilo account: that Sensbot only reads comes from how we built it, and we only ever send read requests to Apilo.

***

## What Sensbot reads from Apilo

| From | What |
| - | - |
| The order | The order status, under the name it has in your Apilo, and whether it is paid |
| The shipment | The courier, the tracking number and a tracking link for InPost, DPD, DHL, UPS, Orlen Paczka and Poczta Polska |
| The parcel | Its state, when Apilo has it: handed to the courier, out for delivery, waiting at the pickup point, delivered or returning |

Product questions are not answered from Apilo: they still come from your product feed or your shop platform.

***

## Before you start

| Requirement | Why |
| - | - |
| A Sensbot account with the chatbot or the Email Assistant | Apilo adds order answers to them |
| An Apilo account with your orders in it | Sensbot reads the orders from there |
| Admin rights in Apilo | Only an admin can add an application under API keys |
| About five minutes | |

> [!NOTE]
>
> Is your shop on a platform without a Sensbot app (for example PrestaShop or a shop built in-house)? Write to [support@sensbot.ai](mailto:support@sensbot.ai) after connecting, and we switch order answers on for your shop.

***

## Step 1 · Add an application in Apilo

1. Log in to Apilo and open **Administracja → Klucze API Apilo** (Administration → Apilo API keys).
2. Click **Nowa aplikacja REST API** (new REST API application), type a name such as `Sensbot` in **Nazwa aplikacji** and click **Zapisz** (save).
3. Apilo shows **Adres API (endpoint)**, **Client ID**, **Client Secret** and **Kod autoryzacji** (authorization code). Keep this page open, or copy all four.

> [!WARNING]
>
> The authorization code works **once** and only until the time shown in **Ważność do** (about 3 hours). If connecting in Sensbot fails, or the code has expired, add a new application in Apilo and use its code.

***

## Step 2 · Connect it in Sensbot

1. In the [Sensbot dashboard](https://platform.sensbot.ai), open **Integrations**.
2. Scroll to **Order and shipping systems**, find the **Apilo** card and click **Connect**.
3. Fill in the four fields:
   * **Your Apilo address:** the **Adres API (endpoint)** from step 1, for example `yourshop.apilo.com`. It is the same address you log in to Apilo with.
   * **Client ID**
   * **Client Secret**
   * **Authorization code**
4. Click **Connect**.

The card now shows **Connected**. From now on the chatbot and the Email Assistant use Apilo for order questions.

The connection renews itself: Sensbot refreshes its access to Apilo automatically, so you do not have to come back to it.

***

## What the customer sees

To get order details, the customer gives the order number plus the email address or phone number used on the order. The number can be the one from your shop or marketplace, or the Apilo number (for example `AL0012345`). Sensbot checks the number against the email or phone before it shares anything.

> **Customer:** Hi, where is my order 48213? I ordered it with [kasia@example.com](mailto:kasia@example.com).
>
> **Chatbot:** Your order 48213 is paid, and the InPost parcel is now waiting for you at the Paczkomat. The tracking number is 6200 1234 5678 9012, and you can follow it with the link below.

In email, the sender's address counts as the email, and the Email Assistant also finds the sender's orders from the last 30 days. The reply goes into the drafts folder of the mailbox you already answer from, and a person sends it.

***

## Troubleshooting

| What you see | What to do |
| - | - |
| **Apilo did not accept the authorization code** | The code was already used (for example in an earlier attempt) or more than about 3 hours have passed. Add a new application in Apilo and paste its code. |
| **There is no Apilo panel at this address** | Use the address you log in to Apilo with, for example `yourshop.apilo.com`. |
| **Could not connect. Check the address, Client ID and Client Secret.** | Copy the Client ID and Client Secret again from the application in Apilo, with a new authorization code. |
| The card shows **Reconnect needed** | Apilo refused the saved connection, for example because the application was removed. Click **Reconnect needed** and repeat the steps with a new authorization code. |

To recheck a saved connection at any time, click the small **Test connection** icon on the Apilo card.

***

## Disconnecting

On the Apilo card in **Integrations**, click **Disconnect**. The chatbot and the Email Assistant go back to the order data from your shop platform only. To cut access on Apilo's side too, remove the Sensbot application in **Administracja → Klucze API Apilo**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.