# PrestaShop

> Run your PrestaShop store from workflows: get and find orders, move them to a new status and add tracking numbers, find and add customers, and keep stock and prices in step with your other systems. Start a workflow on a new order, a status change or a new customer.

App · 11 actions. Web page: https://docs.lodol.com/docs/integrations/prestashop

## Actions

### Add tracking number

Put the shipment's tracking number on an order, for the customer to see in their account. It replaces any number already there.

**Inputs**

- Order (`order`, text, required): The order's ID, from a trigger or an earlier step, or its reference, such as XKBKNABJK.
- Tracking number (`tracking_number`, text, required): The carrier's tracking number, such as AB123456789GB.

**Outputs**

- `carrier` (text): The carrier's name
- `order_id` (number): The order's ID
- `order_reference` (text): The order's reference
- `tracking_number` (text): The tracking number now on the order
- `tracking_url` (text): The carrier's tracking page for it, if the carrier has one

**Example output**

```json
{
  "carrier": "Royal Mail",
  "order_id": 12,
  "order_reference": "XKBKNABJK",
  "tracking_number": "AB123456789GB",
  "tracking_url": "https://www.royalmail.com/track-your-item#/tracking-results/AB123456789GB"
}
```

### Create customer

Add a customer account to the shop. If one already has the email address, it's returned instead, unchanged.

**Inputs**

- Email (`email`, text, required): The customer's email address.
- First name (`firstname`, text, required): Their first name.
- Last name (`lastname`, text, required): Their last name.
- Company (`company`, text): Their company.
- Birthday (`birthday`, date): Their date of birth.
- Newsletter (`newsletter`, true/false): Sign them up for the shop's newsletter. Default: `false`.
- Note (`note`, text): A private note about them, seen only in the back office.

**Outputs**

- `active` (true/false): Whether their account is turned on
- `birthday` (text): Their birthday (YYYY-MM-DD), if given
- `company` (text): Their company, if any
- `created` (true/false): True if the account was made; false if one had the email already
- `created_at` (text): When they signed up, in the shop's time zone
- `email` (text): Their email address
- `firstname` (text): Their first name
- `guest` (true/false): Whether it's a guest checkout rather than an account
- `id` (number): The customer's ID, for other PrestaShop steps
- `lastname` (text): Their last name
- `name` (text): Their full name
- `newsletter` (true/false): Whether they get the shop's newsletter
- `note` (text): The shop's private note about them
- `updated_at` (text): When their account last changed

**Example output**

```json
{
  "active": true,
  "birthday": "1990-04-12",
  "company": "",
  "created": true,
  "created_at": "2026-10-01 10:00:00",
  "email": "jane@example.com",
  "firstname": "Jane",
  "guest": false,
  "id": 2,
  "lastname": "Doe",
  "name": "Jane Doe",
  "newsletter": true,
  "note": "",
  "updated_at": "2026-10-01 10:00:00"
}
```

### Find customers

Find customers by part of their email address or name, newest first.

**Inputs**

- Email (`email`, text): An email address, or part of one, such as @example.com.
- Name (`name`, text): Part of their first or last name.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many were found
- `customers` (list): The customers, newest first

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "active": true,
      "birthday": "1990-04-12",
      "company": "",
      "created_at": "2026-10-01 10:00:00",
      "email": "jane@example.com",
      "firstname": "Jane",
      "guest": false,
      "id": 2,
      "lastname": "Doe",
      "name": "Jane Doe",
      "newsletter": true,
      "note": "",
      "updated_at": "2026-10-01 10:00:00"
    }
  ]
}
```

### Find orders

Find orders by status, customer and the days they were placed, newest first, each with its lines and addresses.

**Inputs**

- Status (`status`, text): Only orders with this status.
- Customer (`customer`, text): Only this customer's orders: their ID or email address.
- Placed from (`created_from`, date): Only orders placed on or after this day.
- Placed until (`created_to`, date): Only orders placed on or before this day.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many were found
- `orders` (list): The orders, newest first

**Example output**

```json
{
  "count": 1,
  "orders": [
    {
      "carrier": "Royal Mail",
      "created_at": "2026-11-05 09:12:44",
      "currency": "GBP",
      "customer_email": "jane@example.com",
      "customer_id": 2,
      "customer_name": "Jane Doe",
      "delivery_address": {
        "address1": "16 Main Street",
        "address2": "Flat 2",
        "alias": "Home",
        "city": "London",
        "company": "",
        "country": "United Kingdom",
        "country_code": "GB",
        "id": 5,
        "name": "Jane Doe",
        "phone": "020 7946 0000",
        "phone_mobile": "",
        "postcode": "SW1A 1AA",
        "text": "Jane Doe, 16 Main Street, Flat 2, SW1A 1AA London, United Kingdom",
        "vat_number": ""
      },
      "gift_message": "",
      "id": 12,
      "invoice_address": {
        "address1": "16 Main Street",
        "address2": "Flat 2",
        "alias": "Home",
        "city": "London",
        "company": "",
        "country": "United Kingdom",
        "country_code": "GB",
        "id": 5,
        "name": "Jane Doe",
        "phone": "020 7946 0000",
        "phone_mobile": "",
        "postcode": "SW1A 1AA",
        "text": "Jane Doe, 16 Main Street, Flat 2, SW1A 1AA London, United Kingdom",
        "vat_number": ""
      },
      "lines": [
        {
          "combination_id": 1,
          "ean13": "",
          "name": "Hummingbird printed t-shirt - Color : White, Size : S",
          "product_id": 1,
          "quantity": 2,
          "reference": "demo_1",
          "total": 47.8,
          "unit_price": 23.9,
          "unit_price_tax_excl": 19.92
        }
      ],
      "paid": true,
      "payment": "Bank transfer",
      "reference": "XKBKNABJK",
      "status": "Payment accepted",
      "status_id": 2,
      "total_discounts": 0.0,
      "total_paid": 55.8,
      "total_paid_tax_excl": 46.5,
      "total_products": 47.8,
      "total_products_tax_excl": 39.83,
      "total_shipping": 8.0,
      "tracking_number": "",
      "tracking_url": "",
      "updated_at": "2026-11-05 09:14:02"
    }
  ]
}
```

### Find products

Find products by part of their name or reference, newest first, with their price and stock.

**Inputs**

- Name (`name`, text): Part of the product's name.
- Reference (`reference`, text): Part of the product's reference (SKU).
- Only products on sale (`active_only`, true/false): Leave out products switched off in the shop. Default: `false`.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many were found
- `products` (list): The products, newest first

**Example output**

```json
{
  "count": 1,
  "products": [
    {
      "active": true,
      "created_at": "2026-10-01 10:00:00",
      "ean13": "",
      "id": 1,
      "link": "https://shop.example.com/index.php?controller=product&id_product=1",
      "manufacturer": "Studio Design",
      "name": "Hummingbird printed t-shirt",
      "price": 19.92,
      "quantity": 2400,
      "reference": "demo_1",
      "updated_at": "2026-11-05 09:00:00",
      "wholesale_price": 5.49
    }
  ]
}
```

### Get customer

Get a customer's details and saved addresses, by their ID or email address.

**Inputs**

- Customer (`customer`, text, required): The customer's ID, or their email address.

**Outputs**

- `active` (true/false): Whether their account is turned on
- `addresses` (list): Their saved addresses
- `birthday` (text): Their birthday (YYYY-MM-DD), if given
- `company` (text): Their company, if any
- `created_at` (text): When they signed up, in the shop's time zone
- `email` (text): Their email address
- `firstname` (text): Their first name
- `guest` (true/false): Whether it's a guest checkout rather than an account
- `id` (number): The customer's ID, for other PrestaShop steps
- `lastname` (text): Their last name
- `name` (text): Their full name
- `newsletter` (true/false): Whether they get the shop's newsletter
- `note` (text): The shop's private note about them
- `updated_at` (text): When their account last changed

**Example output**

```json
{
  "active": true,
  "addresses": [
    {
      "address1": "16 Main Street",
      "address2": "Flat 2",
      "alias": "Home",
      "city": "London",
      "company": "",
      "country": "United Kingdom",
      "country_code": "GB",
      "id": 5,
      "name": "Jane Doe",
      "phone": "020 7946 0000",
      "phone_mobile": "",
      "postcode": "SW1A 1AA",
      "text": "Jane Doe, 16 Main Street, Flat 2, SW1A 1AA London, United Kingdom",
      "vat_number": ""
    }
  ],
  "birthday": "1990-04-12",
  "company": "",
  "created_at": "2026-10-01 10:00:00",
  "email": "jane@example.com",
  "firstname": "Jane",
  "guest": false,
  "id": 2,
  "lastname": "Doe",
  "name": "Jane Doe",
  "newsletter": true,
  "note": "",
  "updated_at": "2026-10-01 10:00:00"
}
```

### Get order

Get an order with what was ordered, the customer, the delivery and billing addresses, the carrier, tracking number and status.

**Inputs**

- Order (`order`, text, required): The order's ID, from a trigger or an earlier step, or its reference, such as XKBKNABJK.

**Outputs**

- `carrier` (text): The carrier's name
- `created_at` (text): When it was placed, in the shop's time zone
- `currency` (text): The currency's code, such as EUR
- `customer_email` (text): The customer's email address
- `customer_id` (number): The customer's ID
- `customer_name` (text): The customer's name
- `delivery_address` (object): Where it's delivered
- `gift_message` (text): The gift message, if any
- `id` (number): The order's ID, for other PrestaShop steps
- `invoice_address` (object): The billing address
- `lines` (list): What was ordered
- `paid` (true/false): Whether PrestaShop counts the order as paid
- `payment` (text): How it was paid for, such as Bank transfer
- `reference` (text): The order's reference, such as XKBKNABJK
- `status` (text): Its status, such as Payment accepted or Shipped
- `status_id` (number): The status's ID
- `total_discounts` (number): Discounts, with tax
- `total_paid` (number): What the customer pays, with tax and shipping
- `total_paid_tax_excl` (number): What the customer pays, before tax
- `total_products` (number): The products' total, with tax
- `total_products_tax_excl` (number): The products' total, before tax
- `total_shipping` (number): Shipping, with tax
- `tracking_number` (text): The shipment's tracking number, if one is set
- `tracking_url` (text): The carrier's tracking page for it, if the carrier has one
- `updated_at` (text): When it last changed, in the shop's time zone

**Example output**

```json
{
  "carrier": "Royal Mail",
  "created_at": "2026-11-05 09:12:44",
  "currency": "GBP",
  "customer_email": "jane@example.com",
  "customer_id": 2,
  "customer_name": "Jane Doe",
  "delivery_address": {
    "address1": "16 Main Street",
    "address2": "Flat 2",
    "alias": "Home",
    "city": "London",
    "company": "",
    "country": "United Kingdom",
    "country_code": "GB",
    "id": 5,
    "name": "Jane Doe",
    "phone": "020 7946 0000",
    "phone_mobile": "",
    "postcode": "SW1A 1AA",
    "text": "Jane Doe, 16 Main Street, Flat 2, SW1A 1AA London, United Kingdom",
    "vat_number": ""
  },
  "gift_message": "",
  "id": 12,
  "invoice_address": {
    "address1": "16 Main Street",
    "address2": "Flat 2",
    "alias": "Home",
    "city": "London",
    "company": "",
    "country": "United Kingdom",
    "country_code": "GB",
    "id": 5,
    "name": "Jane Doe",
    "phone": "020 7946 0000",
    "phone_mobile": "",
    "postcode": "SW1A 1AA",
    "text": "Jane Doe, 16 Main Street, Flat 2, SW1A 1AA London, United Kingdom",
    "vat_number": ""
  },
  "lines": [
    {
      "combination_id": 1,
      "ean13": "",
      "name": "Hummingbird printed t-shirt - Color : White, Size : S",
      "product_id": 1,
      "quantity": 2,
      "reference": "demo_1",
      "total": 47.8,
      "unit_price": 23.9,
      "unit_price_tax_excl": 19.92
    }
  ],
  "paid": true,
  "payment": "Bank transfer",
  "reference": "XKBKNABJK",
  "status": "Payment accepted",
  "status_id": 2,
  "total_discounts": 0.0,
  "total_paid": 55.8,
  "total_paid_tax_excl": 46.5,
  "total_products": 47.8,
  "total_products_tax_excl": 39.83,
  "total_shipping": 8.0,
  "tracking_number": "",
  "tracking_url": "",
  "updated_at": "2026-11-05 09:14:02"
}
```

### Get product

Get a product's price, stock and combinations (sizes, colours and so on), by its ID or reference.

**Inputs**

- Product (`product`, text, required): The product's ID, or its reference (SKU).

**Outputs**

- `active` (true/false): Whether it's on sale in the shop
- `combinations` (list): Its combinations (sizes, colours and so on)
- `created_at` (text): When it was added, in the shop's time zone
- `ean13` (text): Its barcode, if any
- `id` (number): The product's ID, for other PrestaShop steps
- `link` (text): Its page in the shop
- `manufacturer` (text): The brand's name, if any
- `name` (text): Its name
- `price` (number): Its price before tax
- `quantity` (number): How many are in stock, across its combinations
- `reference` (text): Its reference (SKU)
- `summary` (text): Its short description, as plain text
- `updated_at` (text): When it last changed
- `wholesale_price` (number): What the shop pays for it

**Example output**

```json
{
  "active": true,
  "combinations": [
    {
      "default": true,
      "ean13": "",
      "id": 1,
      "options": "S, White",
      "price_impact": 0.0,
      "quantity": 300,
      "reference": "demo_1_s_white"
    }
  ],
  "created_at": "2026-10-01 10:00:00",
  "ean13": "",
  "id": 1,
  "link": "https://shop.example.com/index.php?controller=product&id_product=1",
  "manufacturer": "Studio Design",
  "name": "Hummingbird printed t-shirt",
  "price": 19.92,
  "quantity": 2400,
  "reference": "demo_1",
  "summary": "Regular fit, round neckline, short sleeves.",
  "updated_at": "2026-11-05 09:00:00",
  "wholesale_price": 5.49
}
```

### Update order status

Move an order to a status, such as Shipped or Canceled, as the back office does. Nothing changes if it already has that status.

**Inputs**

- Order (`order`, text, required): The order's ID, from a trigger or an earlier step, or its reference, such as XKBKNABJK.
- Status (`status`, text, required): The status to move it to. Statuses set to email the customer do so.
- Email the customer (`email_customer`, true/false): Send the customer the email PrestaShop has for this status, if it has one. Default: `true`.

**Outputs**

- `carrier` (text): The carrier's name
- `changed` (true/false): Whether the status changed: false if it already had it
- `created_at` (text): When it was placed, in the shop's time zone
- `currency` (text): The currency's code, such as EUR
- `customer_email` (text): The customer's email address
- `customer_id` (number): The customer's ID
- `customer_name` (text): The customer's name
- `delivery_address` (object): Where it's delivered
- `emailed` (true/false): Whether PrestaShop emailed the customer about it
- `gift_message` (text): The gift message, if any
- `id` (number): The order's ID, for other PrestaShop steps
- `invoice_address` (object): The billing address
- `lines` (list): What was ordered
- `paid` (true/false): Whether PrestaShop counts the order as paid
- `payment` (text): How it was paid for, such as Bank transfer
- `previous_status` (text): The status it had before
- `reference` (text): The order's reference, such as XKBKNABJK
- `status` (text): Its status, such as Payment accepted or Shipped
- `status_id` (number): The status's ID
- `total_discounts` (number): Discounts, with tax
- `total_paid` (number): What the customer pays, with tax and shipping
- `total_paid_tax_excl` (number): What the customer pays, before tax
- `total_products` (number): The products' total, with tax
- `total_products_tax_excl` (number): The products' total, before tax
- `total_shipping` (number): Shipping, with tax
- `tracking_number` (text): The shipment's tracking number, if one is set
- `tracking_url` (text): The carrier's tracking page for it, if the carrier has one
- `updated_at` (text): When it last changed, in the shop's time zone

**Example output**

```json
{
  "carrier": "Royal Mail",
  "changed": true,
  "created_at": "2026-11-05 09:12:44",
  "currency": "GBP",
  "customer_email": "jane@example.com",
  "customer_id": 2,
  "customer_name": "Jane Doe",
  "delivery_address": {
    "address1": "16 Main Street",
    "address2": "Flat 2",
    "alias": "Home",
    "city": "London",
    "company": "",
    "country": "United Kingdom",
    "country_code": "GB",
    "id": 5,
    "name": "Jane Doe",
    "phone": "020 7946 0000",
    "phone_mobile": "",
    "postcode": "SW1A 1AA",
    "text": "Jane Doe, 16 Main Street, Flat 2, SW1A 1AA London, United Kingdom",
    "vat_number": ""
  },
  "emailed": true,
  "gift_message": "",
  "id": 12,
  "invoice_address": {
    "address1": "16 Main Street",
    "address2": "Flat 2",
    "alias": "Home",
    "city": "London",
    "company": "",
    "country": "United Kingdom",
    "country_code": "GB",
    "id": 5,
    "name": "Jane Doe",
    "phone": "020 7946 0000",
    "phone_mobile": "",
    "postcode": "SW1A 1AA",
    "text": "Jane Doe, 16 Main Street, Flat 2, SW1A 1AA London, United Kingdom",
    "vat_number": ""
  },
  "lines": [
    {
      "combination_id": 1,
      "ean13": "",
      "name": "Hummingbird printed t-shirt - Color : White, Size : S",
      "product_id": 1,
      "quantity": 2,
      "reference": "demo_1",
      "total": 47.8,
      "unit_price": 23.9,
      "unit_price_tax_excl": 19.92
    }
  ],
  "paid": true,
  "payment": "Bank transfer",
  "previous_status": "Payment accepted",
  "reference": "XKBKNABJK",
  "status": "Shipped",
  "status_id": 4,
  "total_discounts": 0.0,
  "total_paid": 55.8,
  "total_paid_tax_excl": 46.5,
  "total_products": 47.8,
  "total_products_tax_excl": 39.83,
  "total_shipping": 8.0,
  "tracking_number": "",
  "tracking_url": "",
  "updated_at": "2026-11-05 09:14:02"
}
```

### Update product price

Set a product's price before tax. Its combinations keep their own price changes on top of it.

**Inputs**

- Product (`product`, text, required): The product's ID, or its reference (SKU).
- Price before tax (`price`, number, required): The new price, before tax, such as 19.99. At least 0.

**Outputs**

- `id` (number): The product's ID
- `link` (text): Its page in the shop
- `name` (text): Its name
- `previous_price` (number): Its price before tax, before the change
- `price` (number): Its price before tax now
- `reference` (text): Its reference (SKU)

**Example output**

```json
{
  "id": 1,
  "link": "https://shop.example.com/index.php?controller=product&id_product=1",
  "name": "Hummingbird printed t-shirt",
  "previous_price": 19.92,
  "price": 21.5,
  "reference": "demo_1"
}
```

### Update stock

Set how many of a product or one of its combinations are in stock, or add to it.

**Inputs**

- Product (`product`, text, required): The product's ID or reference (SKU), or a combination's reference.
- Quantity (`quantity`, number, required): The new stock, or how many to add (below 0 to take away).
- Combination (`combination`, text): For a product with combinations: the combination's ID or reference.
- How (`how`, text): Set the stock to the quantity, or add the quantity to it. One of: `set` (Set the stock to this), `add` (Add this to the stock). Default: `set`.

**Outputs**

- `combination_id` (number): The combination's ID; 0 for a product without any
- `name` (text): The product's name
- `previous_quantity` (number): The stock before
- `product_id` (number): The product's ID
- `quantity` (number): The stock now
- `reference` (text): The product's or combination's reference

**Example output**

```json
{
  "combination_id": 1,
  "name": "Hummingbird printed t-shirt",
  "previous_quantity": 300,
  "product_id": 1,
  "quantity": 120,
  "reference": "demo_1_s_white"
}
```
