# PrestaShop

Abandoned cart and order created, paid and shipped for PrestaShop 1.7 and 8. PrestaShop has no webhooks: we read the store every few minutes.

## Connect {#connect}

1. PrestaShop › **Advanced parameters › Webservice**: enable the webservice and **Add new key**.
2. **GET** permission on: `orders`, `carts`, `addresses`, `countries`, `currencies`.
3. In the portal: Integrations › PrestaShop: store address and the key (32 characters). The store must be on a public (https) address.

On the store page set its **time zone** (International › Localization): webservice dates are in store time.

| In the store | Event |
| --- | --- |
| New order | Order created |
| State Payment accepted (2), Remote payment accepted (11) or later | Order paid |
| State Shipped (4) / Delivered (5) | Order shipped (with the order's tracking number) |
| Cart without an order N minutes after its last change | Abandoned cart (link: the store's cart page) |

## Messages {#messages}

Portal › Integrations › the store: turn each event on and write its text (it starts in your language). Variables: `{first_name}` `{store}` `{order_number}` `{total}` `{currency}` `{items}` `{cart_url}` `{tracking_url}` `{tracking_number}` `{carrier}`. Links become tracked short links.

- **Abandoned cart**: N minutes (15–2880, default 60) after the cart last changed, if no order was placed. Marketing: your quiet hours and frequency caps apply.
- **Order created / paid / shipped**: transactional, once per order (even when the store repeats the notice or the order changes several times).
- Blacklisted and opted-out numbers never get SMS. **Test** mode: simulated SMS, never charged.

## Polling {#polling}

We read the orders and carts changed since the last read every 5 minutes (choose 5, 10, 15, 30 or 60). A failed read is retried over the same window: nothing is lost or sent twice. Only changes after you connected the store are read: older orders never get an SMS. We keep only what the SMS needs (phone, first name, total, cart link); every event is logged on the store page.

**Test connection** reads the store with the saved credentials and sends nothing. **Disconnect** deletes the credentials.
