# VTEX

> Run a VTEX store from workflows: list and look up orders, start handling them, send invoices and tracking, and cancel them; add and change products and SKUs; set prices and stock; and keep customer profiles up to date. Start a workflow when an order is placed or reaches a status, when a customer signs up or changes, or when a Master Data record is added.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/vtex

## Actions

### Add tracking number

Add the carrier's tracking number and link to an invoice already sent for an order, so the customer can follow the delivery.

**Inputs**

- Order (`order_id`, text, required): The order's ID, such as 1172452900788-01, from another VTEX step or the trigger.
- Invoice number (`invoice_number`, text, required): The number of the invoice the shipment belongs to.
- Tracking number (`tracking_number`, text, required): The carrier's tracking number.
- Carrier (`courier`, text, required): The carrier delivering it.
- Tracking link (`tracking_url`, text, required): Where the customer can track the package.
- Dispatched (`dispatched_at`, date and time): When it left. Leave blank for now.

**Outputs**

- `invoice_number` (text): The invoice's number
- `order_id` (text): The order's ID
- `receipt` (text): VTEX's receipt code for the invoice
- `received_at` (text): When VTEX took it (ISO 8601)

**Example output**

```json
{
  "invoice_number": "DFG-v7731485plzv-01",
  "order_id": "1172452900788-01",
  "receipt": "527b1ae251264ef1b7a9b597cd8f16b9",
  "received_at": "2019-02-08T13:16:13.4617653+00:00"
}
```

### Cancel order

Cancel an order, which refunds the customer's payment. VTEX refuses once an order is invoiced or partly invoiced.

**Inputs**

- Order (`order_id`, text, required): The order's ID, such as 1172452900788-01, from another VTEX step or the trigger.
- Reason (`reason`, text): Why it's canceled, kept with the order.

**Outputs**

- `order_id` (text): The order's ID
- `receipt` (text): VTEX's receipt code for the change
- `received_at` (text): When VTEX took the change (ISO 8601)

**Example output**

```json
{
  "order_id": "1172452900788-01",
  "receipt": "38e0e47da2934847b489216d208cfd91",
  "received_at": "2024-02-07T15:22:56.7612218-02:00"
}
```

### Create or update customer

Update the customer profile with this email, or add one if nobody has it, such as for a sign-up. Fields left blank keep what they have.

**Inputs**

- Email (`email`, text, required): The email to match the customer on; they're added if nobody has it.
- First name (`first_name`, text): Their first name.
- Last name (`last_name`, text): Their last name.
- Phone (`phone`, text): Their phone number, such as +12025550195.
- Document (`document`, text): Their document number, such as a tax ID.
- Document type (`document_type`, text): The kind of document, such as cpf.
- Business customer (`is_corporate`, true/false): Whether they buy for a company.
- Company name (`company_name`, text): Their company's registered name.
- Trade name (`trade_name`, text): Their company's trading name.
- Company document (`company_document`, text): Their company's document number.
- Newsletter (`newsletter`, true/false): Whether they get the store's newsletter.

**Outputs**

- `company_document` (text): Their company's document number
- `company_name` (text): Their company's registered name
- `created` (true/false): True if it was added, false if it was updated
- `created_at` (text): When the profile was added (ISO 8601)
- `document` (text): Their document number, such as a tax ID
- `document_type` (text): The kind of document, such as cpf
- `email` (text): Their email
- `first_name` (text): Their first name
- `id` (text): The customer profile's ID
- `is_corporate` (true/false): True for a business customer
- `last_name` (text): Their last name
- `newsletter` (true/false): True if they signed up for the newsletter
- `phone` (text): Their phone number
- `trade_name` (text): Their company's trading name
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "company_document": "",
  "company_name": "",
  "created": true,
  "created_at": "2025-03-19T21:44:01.4199691Z",
  "document": "12345678900",
  "document_type": "CPF",
  "email": "clark.kent@examplemail.com",
  "first_name": "Clark",
  "id": "b818cbda-e489-11e6-94f4-0ac138d2d42e",
  "is_corporate": false,
  "last_name": "Kent",
  "newsletter": false,
  "phone": "+12025550195",
  "trade_name": "",
  "updated_at": "2025-03-19T21:44:01.4199691Z"
}
```

### Create product

Add a product to the catalog in a category and brand you already have. Add its SKUs with 'Create SKU'. VTEX can't delete products.

**Inputs**

- Name (`name`, text, required): The product's name, up to 150 characters.
- Category (`category`, text, required): The category it's in. Pick one, or give its ID.
- Brand (`brand`, text, required): Its brand. Pick one, or give its ID.
- Reference code (`ref_id`, text): Your own code for the product.
- Description (`description`, text): What the product page says about it. HTML is allowed.
- Short description (`short_description`, text): A line about it, shown in product lists.
- Page address (`link_id`, text): The end of its page's address, such as black-tshirt. Left blank on a new product, VTEX makes one from the name.
- Release date (`release_date`, date): When it came out, used to sort new arrivals.
- Active (`active`, true/false): Whether it's on sale. VTEX keeps a product off until it has an active SKU.
- Visible (`visible`, true/false): Whether it shows in search results and lists.
- Show when out of stock (`show_without_stock`, true/false): Whether it stays on show, with a notify me option, while out of stock.

**Outputs**

- `active` (true/false): True if it's active
- `brand_id` (text): Its brand's ID
- `category_id` (text): Its category's ID
- `department_id` (text): Its department's ID
- `description` (text): Its description
- `id` (text): The product's ID
- `keywords` (text): Other words it can be found by
- `link_id` (text): The end of its page's address, such as black-tshirt
- `meta_description` (text): Its description for search engines
- `name` (text): Its name
- `ref_id` (text): Its reference code
- `release_date` (text): Its release date (ISO 8601)
- `short_description` (text): Its short description
- `show_without_stock` (true/false): True if it shows while out of stock
- `tax_code` (text): Its tax code
- `title` (text): Its page's title
- `visible` (true/false): True if it shows in search results and lists

**Example output**

```json
{
  "active": true,
  "brand_id": "2000000",
  "category_id": "2",
  "department_id": "1",
  "description": "A classic black t-shirt made from soft, breathable cotton",
  "id": "42",
  "keywords": "Blouse",
  "link_id": "premium-tshirt-cotton",
  "meta_description": "Very cool t-shirt for sports",
  "name": "Black T-Shirt",
  "ref_id": "310117869",
  "release_date": "2025-07-01T00:00:00",
  "short_description": "Great premium cotton t-shirt",
  "show_without_stock": true,
  "tax_code": "12345",
  "title": "Premium black t-shirt",
  "visible": true
}
```

### Create SKU

Add a SKU (a variation such as a size) to a product. VTEX adds it turned off; it can turn it on once it has a picture. VTEX can't delete SKUs.

**Inputs**

- Product (`product`, text, required): The product's ID, a number such as 42, from another VTEX step.
- Name (`name`, text, required): The SKU's name, such as Size 10.
- Reference code (`ref_id`, text, required): Your own code for the SKU, unique in the store.
- Packaged height (`packaged_height`, number, required): Its height when packed, for working out shipping. At least 0.
- Packaged length (`packaged_length`, number, required): Its length when packed, for working out shipping. At least 0.
- Packaged width (`packaged_width`, number, required): Its width when packed, for working out shipping. At least 0.
- Packaged weight (`packaged_weight`, number, required): Its weight when packed, in the unit your store uses, for working out shipping. At least 0.
- Turn on when possible (`activate_when_possible`, true/false): Whether VTEX turns the SKU on once it has a picture or an active component.
- Manufacturer code (`manufacturer_code`, text): The manufacturer's code for it.

**Outputs**

- `activate_when_possible` (true/false): True if VTEX turns it on once it has a picture or an active component
- `active` (true/false): True if it's active
- `created_at` (text): When it was added (ISO 8601)
- `id` (text): The SKU's ID
- `manufacturer_code` (text): The manufacturer's code for it
- `measurement_unit` (text): The unit it's sold in, such as un
- `name` (text): Its name, such as Size 10
- `packaged_height` (number): Its packaged height, for shipping
- `packaged_length` (number): Its packaged length, for shipping
- `packaged_weight` (number): Its packaged weight, for shipping
- `packaged_width` (number): Its packaged width, for shipping
- `product_id` (text): The ID of the product it's a variation of
- `ref_id` (text): Its reference code
- `unit_multiplier` (number): How many go together in one unit sold

**Example output**

```json
{
  "activate_when_possible": false,
  "active": false,
  "created_at": "2020-01-25T15:51:29.2614605",
  "id": "70",
  "manufacturer_code": "",
  "measurement_unit": "un",
  "name": "Size 10",
  "packaged_height": 10.0,
  "packaged_length": 10.0,
  "packaged_weight": 10.0,
  "packaged_width": 10.0,
  "product_id": "42",
  "ref_id": "B096QW8Y8Z",
  "unit_multiplier": 2.0
}
```

### Delete customer

Delete a customer profile for good, such as for a data deletion request. Their orders stay.

**Inputs**

- Customer (`customer`, text, required): The customer profile's ID, from another VTEX step or the trigger.

**Outputs**

- `deleted` (true/false): True once deleted
- `id` (text): The customer profile's ID

**Example output**

```json
{
  "deleted": true,
  "id": "b818cbda-e489-11e6-94f4-0ac138d2d42e"
}
```

### Find customers

Find customer profiles by email or by text in them, such as a name, newest first. Leave both blank to list the newest.

**Inputs**

- Email (`email`, text): Their exact email.
- Search (`search`, text): Text in the profile, such as part of a name. Searches the fields your store makes searchable.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.

**Outputs**

- `count` (number): How many are listed
- `customers` (list): The customers found, newest first
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "company_document": "",
      "company_name": "",
      "created_at": "2025-03-19T21:44:01.4199691Z",
      "document": "12345678900",
      "document_type": "CPF",
      "email": "clark.kent@examplemail.com",
      "first_name": "Clark",
      "id": "b818cbda-e489-11e6-94f4-0ac138d2d42e",
      "is_corporate": false,
      "last_name": "Kent",
      "newsletter": false,
      "phone": "+12025550195",
      "trade_name": "",
      "updated_at": "2025-03-19T21:44:01.4199691Z"
    }
  ],
  "total": 1
}
```

### Get customer

Get a customer profile, by its ID or the customer's email.

**Inputs**

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

**Outputs**

- `company_document` (text): Their company's document number
- `company_name` (text): Their company's registered name
- `created_at` (text): When the profile was added (ISO 8601)
- `document` (text): Their document number, such as a tax ID
- `document_type` (text): The kind of document, such as cpf
- `email` (text): Their email
- `first_name` (text): Their first name
- `id` (text): The customer profile's ID
- `is_corporate` (true/false): True for a business customer
- `last_name` (text): Their last name
- `newsletter` (true/false): True if they signed up for the newsletter
- `phone` (text): Their phone number
- `trade_name` (text): Their company's trading name
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "company_document": "",
  "company_name": "",
  "created_at": "2025-03-19T21:44:01.4199691Z",
  "document": "12345678900",
  "document_type": "CPF",
  "email": "clark.kent@examplemail.com",
  "first_name": "Clark",
  "id": "b818cbda-e489-11e6-94f4-0ac138d2d42e",
  "is_corporate": false,
  "last_name": "Kent",
  "newsletter": false,
  "phone": "+12025550195",
  "trade_name": "",
  "updated_at": "2025-03-19T21:44:01.4199691Z"
}
```

### Get order

Get an order with its status, totals, customer, delivery address, items, invoices and tracking.

**Inputs**

- Order (`order_id`, text, required): The order's ID, such as 1172452900788-01, from another VTEX step or the trigger.

**Outputs**

- `authorized_at` (text): When its payment was authorized (ISO 8601)
- `can_cancel` (true/false): True while the order can still be canceled
- `cancel_reason` (text): Why it was canceled, if it was
- `company_name` (text): The customer's company, for a business purchase
- `created_at` (text): When it was placed (ISO 8601)
- `currency` (text): The total's currency code, such as BRL
- `customer_document` (text): The customer's document number, such as a tax ID
- `customer_email` (text): The customer's email
- `customer_first_name` (text): The customer's first name
- `customer_last_name` (text): The customer's last name
- `customer_phone` (text): The customer's phone number
- `discounts_total` (number): Its discounts, as a negative amount
- `invoiced_at` (text): When it was invoiced (ISO 8601)
- `invoices` (list): The invoices sent for it, with their tracking
- `items` (list): What was ordered
- `items_total` (number): What the items cost
- `marketplace_order_id` (text): The marketplace's own ID for it, if any
- `order_group` (text): The ID shared by every order of the same purchase
- `order_id` (text): The order's ID, such as 1172452900788-01
- `origin` (text): Marketplace or Fulfillment
- `payment_methods` (list): How it was paid, such as Visa
- `sales_channel` (text): The ID of the trade policy (sales channel) it came through
- `sequence` (text): The order's sequence number, as the admin shows it
- `shipping_city` (text): The delivery address's city
- `shipping_complement` (text): More of the delivery address, such as a flat
- `shipping_country` (text): The delivery address's country code, such as BRA
- `shipping_method` (text): The shipping option chosen, such as Normal
- `shipping_neighborhood` (text): The delivery address's neighborhood
- `shipping_number` (text): The delivery address's house number
- `shipping_postal_code` (text): The delivery address's postal code
- `shipping_receiver` (text): Who receives the delivery
- `shipping_state` (text): The delivery address's state
- `shipping_street` (text): The delivery address's street
- `shipping_total` (number): What shipping cost
- `status` (text): Its status as VTEX names it, such as ready-for-handling
- `status_label` (text): Its status in words, such as Ready for handling
- `tax_total` (number): Its tax
- `total` (number): The order's total, such as 11.60
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "authorized_at": "2024-02-04T20:46:11.7010747+00:00",
  "can_cancel": true,
  "cancel_reason": "Item size was too large.",
  "company_name": "",
  "created_at": "2024-02-04T20:09:43.899958+00:00",
  "currency": "BRL",
  "customer_document": "845.134.270-19",
  "customer_email": "rodrigo.smith@email.com",
  "customer_first_name": "Rodrigo",
  "customer_last_name": "Smith",
  "customer_phone": "+5561992227222",
  "discounts_total": 0,
  "invoiced_at": "2024-02-09T10:17:40.5322681+00:00",
  "invoices": [
    {
      "courier": "PAC Correios",
      "invoice_number": "24382",
      "invoice_url": "https://luxstore.com/invoices/24382.pdf",
      "issued_at": "2024-02-09T10:10:20.5322681+00:00",
      "tracking_number": "TRK-48960684",
      "tracking_url": "https://tracking.fastdelivery.com/track/146/TRK-48960684-01/24382",
      "type": "Input",
      "value": 10.15
    }
  ],
  "items": [
    {
      "ean": "3256873",
      "image_url": "https://luxstore.img.com.br/ids/155392-55-55/KOI.jpg?v=6359184022286",
      "list_price": 19.9,
      "name": "Bay Max L",
      "price": 9.9,
      "product_id": "6",
      "quantity": 1,
      "ref_id": "BIGBML",
      "seller": "1",
      "selling_price": 9.9,
      "sku_id": "18"
    }
  ],
  "items_total": 0.99,
  "marketplace_order_id": "1172452900788-01",
  "order_group": "1415461749731",
  "order_id": "1172452900788-01",
  "origin": "Marketplace",
  "payment_methods": [
    "Visa"
  ],
  "sales_channel": "1",
  "sequence": "502556",
  "shipping_city": "Rio de Janeiro",
  "shipping_complement": "10",
  "shipping_country": "BRA",
  "shipping_method": "Normal",
  "shipping_neighborhood": "Barra da Tijuca",
  "shipping_number": "126",
  "shipping_postal_code": "22630-011",
  "shipping_receiver": "Rodrigo Smith",
  "shipping_state": "RJ",
  "shipping_street": "Avenida L\u00facio Costa",
  "shipping_total": 3,
  "status": "handling",
  "status_label": "Handling",
  "tax_total": 0,
  "total": 11.6,
  "updated_at": "2024-02-06T20:46:11.7010747+00:00"
}
```

### Get price

Get a SKU's base, list and cost price, and any prices fixed for a trade policy.

**Inputs**

- SKU (`sku`, text, required): The SKU's ID, a number such as 70, from another VTEX step or an order's items.

**Outputs**

- `base_price` (number): Its selling price before any price table rules
- `cost_price` (number): What it costs the store
- `fixed_prices` (list): Prices fixed for a trade policy or quantity
- `list_price` (number): Its list (suggested retail) price; 0 if not set
- `markup` (number): The profit margin in percent
- `sku_id` (text): The SKU's ID

**Example output**

```json
{
  "base_price": 250,
  "cost_price": 10,
  "fixed_prices": [
    {
      "list_price": 0,
      "min_quantity": 1,
      "trade_policy_id": "1",
      "valid_from": "",
      "valid_to": "",
      "value": 666.66
    }
  ],
  "list_price": 300,
  "markup": 2400,
  "sku_id": "1234512354"
}
```

### Get product

Get a product's details, by its ID or its reference code.

**Inputs**

- Find by (`find_by`, text): Whether you give the product's ID or its reference code. One of: `id`, `ref_id` (Reference code). Default: `id`.
- Product (`product`, text, required): The product's ID, such as 42, or its reference code.

**Outputs**

- `active` (true/false): True if it's active
- `brand_id` (text): Its brand's ID
- `category_id` (text): Its category's ID
- `department_id` (text): Its department's ID
- `description` (text): Its description
- `id` (text): The product's ID
- `keywords` (text): Other words it can be found by
- `link_id` (text): The end of its page's address, such as black-tshirt
- `meta_description` (text): Its description for search engines
- `name` (text): Its name
- `ref_id` (text): Its reference code
- `release_date` (text): Its release date (ISO 8601)
- `short_description` (text): Its short description
- `show_without_stock` (true/false): True if it shows while out of stock
- `tax_code` (text): Its tax code
- `title` (text): Its page's title
- `visible` (true/false): True if it shows in search results and lists

**Example output**

```json
{
  "active": true,
  "brand_id": "2000000",
  "category_id": "2",
  "department_id": "1",
  "description": "A classic black t-shirt made from soft, breathable cotton",
  "id": "42",
  "keywords": "Blouse",
  "link_id": "premium-tshirt-cotton",
  "meta_description": "Very cool t-shirt for sports",
  "name": "Black T-Shirt",
  "ref_id": "310117869",
  "release_date": "2025-07-01T00:00:00",
  "short_description": "Great premium cotton t-shirt",
  "show_without_stock": true,
  "tax_code": "12345",
  "title": "Premium black t-shirt",
  "visible": true
}
```

### Get SKU

Get a SKU's details, by its ID or its reference code.

**Inputs**

- Find by (`find_by`, text): Whether you give the SKU's ID or its reference code. One of: `id`, `ref_id` (Reference code). Default: `id`.
- SKU (`sku`, text, required): The SKU's ID, such as 70, or its reference code.

**Outputs**

- `activate_when_possible` (true/false): True if VTEX turns it on once it has a picture or an active component
- `active` (true/false): True if it's active
- `created_at` (text): When it was added (ISO 8601)
- `id` (text): The SKU's ID
- `manufacturer_code` (text): The manufacturer's code for it
- `measurement_unit` (text): The unit it's sold in, such as un
- `name` (text): Its name, such as Size 10
- `packaged_height` (number): Its packaged height, for shipping
- `packaged_length` (number): Its packaged length, for shipping
- `packaged_weight` (number): Its packaged weight, for shipping
- `packaged_width` (number): Its packaged width, for shipping
- `product_id` (text): The ID of the product it's a variation of
- `ref_id` (text): Its reference code
- `unit_multiplier` (number): How many go together in one unit sold

**Example output**

```json
{
  "activate_when_possible": false,
  "active": false,
  "created_at": "2020-01-25T15:51:29.2614605",
  "id": "70",
  "manufacturer_code": "",
  "measurement_unit": "un",
  "name": "Size 10",
  "packaged_height": 10.0,
  "packaged_length": 10.0,
  "packaged_weight": 10.0,
  "packaged_width": 10.0,
  "product_id": "42",
  "ref_id": "B096QW8Y8Z",
  "unit_multiplier": 2.0
}
```

### Get stock

Get how many of a SKU each warehouse has, how many are held for orders and how many can still be sold.

**Inputs**

- SKU (`sku`, text, required): The SKU's ID, a number such as 70, from another VTEX step or an order's items.

**Outputs**

- `sku_id` (text): The SKU's ID
- `total_available` (number): How many can be sold, across every warehouse
- `warehouses` (list): Its stock in each warehouse

**Example output**

```json
{
  "sku_id": "10",
  "total_available": 12,
  "warehouses": [
    {
      "available_quantity": 12,
      "lead_time": "00:00:00",
      "reserved_quantity": 3,
      "total_quantity": 15,
      "unlimited": false,
      "warehouse_id": "1fabf84",
      "warehouse_name": "Main Warehouse"
    }
  ]
}
```

### List brands

List the catalog's brands, with their IDs.

**Inputs**: None.

**Outputs**

- `brands` (list): Every brand
- `count` (number): How many there are

**Example output**

```json
{
  "brands": [
    {
      "active": true,
      "id": "9280",
      "name": "Brand"
    },
    {
      "active": true,
      "id": "2000000",
      "name": "Orma Carbon"
    }
  ],
  "count": 2
}
```

### List categories

List the catalog's categories, three levels deep, with their IDs.

**Inputs**: None.

**Outputs**

- `categories` (list): Every category, each after its parent
- `count` (number): How many there are

**Example output**

```json
{
  "categories": [
    {
      "id": "1",
      "level": 1,
      "name": "Alimenta\u00e7\u00e3o",
      "path": "Alimenta\u00e7\u00e3o"
    },
    {
      "id": "6",
      "level": 2,
      "name": "Bebedouro",
      "path": "Alimenta\u00e7\u00e3o > Bebedouro"
    }
  ],
  "count": 2
}
```

### List orders

List the store's orders, newest first, filtered by status, by text such as an email or name, or by when they were placed. VTEX takes a few minutes to list a new order.

**Inputs**

- Status (`status`, text): Only orders in this status. Leave blank for every status. One of: `waiting-for-sellers-confirmation` (Waiting for seller's confirmation), `payment-pending` (Payment pending), `payment-approved` (Payment approved), `ready-for-handling` (Ready for handling), `handling`, `invoiced`, `canceled`.
- Search (`search`, text): An order ID, or the customer's email, document number or name.
- Placed from (`created_from`, date): Only orders placed on or after this day (UTC).
- Placed until (`created_to`, date): Only orders placed on or before this day (UTC).
- Sort (`sort`, text): How to order them. One of: `creationDate,desc` (Newest first), `creationDate,asc` (Oldest first), `totalValue,desc` (Highest total first), `totalValue,asc` (Lowest total first). Default: `creationDate,desc`.
- How many (`limit`, number): The most to list. Defaults to 25. From 1 to 100.
- Page (`page`, number): Which page of results to get, for more than one page. Defaults to the first. From 1 to 30.

**Outputs**

- `count` (number): How many are listed
- `orders` (list): The orders found
- `page` (number): Which page this is
- `pages` (number): How many pages there are
- `total` (number): How many orders match in all

**Example output**

```json
{
  "count": 1,
  "orders": [
    {
      "created_at": "2019-02-04T10:29:11+00:00",
      "currency": "BRL",
      "customer_name": "J C",
      "item_count": 1,
      "order_id": "1306331686122-01",
      "origin": "Marketplace",
      "payment_method": "Boleto Banc\u00e1rio",
      "sales_channel": "1",
      "sequence": "502559",
      "status": "invoiced",
      "status_label": "Invoiced",
      "total": 74.53
    }
  ],
  "page": 1,
  "pages": 1,
  "total": 1
}
```

### List product SKUs

List a product's SKUs (its variations, such as sizes or colors).

**Inputs**

- Product (`product`, text, required): The product's ID, a number such as 42, from another VTEX step.

**Outputs**

- `count` (number): How many there are
- `product_id` (text): The product's ID
- `skus` (list): The product's SKUs

**Example output**

```json
{
  "count": 1,
  "product_id": "2000024",
  "skus": [
    {
      "active": true,
      "id": "2000035",
      "name": "33 - Preto",
      "ref_id": ""
    }
  ]
}
```

### List warehouses

List the store's warehouses, with their IDs.

**Inputs**: None.

**Outputs**

- `count` (number): How many there are
- `warehouses` (list): Every warehouse

**Example output**

```json
{
  "count": 1,
  "warehouses": [
    {
      "active": true,
      "dock_ids": [
        "1_1_1"
      ],
      "id": "1937054",
      "name": "Main warehouse",
      "priority": 0
    }
  ]
}
```

### Send invoice

Send an order's invoice to VTEX, which marks it Invoiced and settles its payment. A return invoice refunds the customer instead. Left blank, the amount and items are the whole order's.

**Inputs**

- Order (`order_id`, text, required): The order's ID, such as 1172452900788-01, from another VTEX step or the trigger.
- Invoice number (`invoice_number`, text, required): The invoice's number in your invoicing system.
- Type (`invoice_type`, text): A sale, or a return that refunds the customer. One of: `Output` (Sale), `Input` (Return). Default: `Output`.
- Amount (`invoice_value`, number): The amount invoiced, such as 74.53. Leave blank for the order's total. At least 0.
- Issued (`issued_at`, date and time): When the invoice was issued. Leave blank for now.
- Invoice key (`invoice_key`, text): The invoice's access key, if it has one.
- Invoice link (`invoice_url`, text): Where the invoice can be read.
- Carrier (`courier`, text): The carrier delivering the order.
- Items (`items`, list): Only for a partial invoice: the items it covers, such as [{"sku_id": "18", "quantity": 1, "price": 9.90}], each price for one. Leave blank to invoice every item.

**Outputs**

- `invoice_number` (text): The invoice's number
- `order_id` (text): The order's ID
- `receipt` (text): VTEX's receipt code for the invoice
- `received_at` (text): When VTEX took it (ISO 8601)

**Example output**

```json
{
  "invoice_number": "DFG-v7731485plzv-01",
  "order_id": "1172452900788-01",
  "receipt": "38e0e47da2934847b489216d208cfd91",
  "received_at": "2024-02-07T15:22:56.7612218-02:00"
}
```

### Set price

Set a SKU's selling price, or its cost price and markup, and its list price. Its fixed prices stay as they are.

**Inputs**

- SKU (`sku`, text, required): The SKU's ID, a number such as 70, from another VTEX step or an order's items.
- Selling price (`base_price`, number): Its selling price, such as 49.90. Or give a cost price and markup instead. At least 0.
- Cost price (`cost_price`, number): What it costs the store. Give it with a markup. At least 0.
- Markup (`markup`, number): The profit margin in percent, such as 30, added to the cost price.
- List price (`list_price`, number): Its list (suggested retail) price, often shown crossed out. At least 0.

**Outputs**

- `base_price` (number): Its selling price before any price table rules
- `cost_price` (number): What it costs the store
- `fixed_prices` (list): Prices fixed for a trade policy or quantity
- `list_price` (number): Its list (suggested retail) price; 0 if not set
- `markup` (number): The profit margin in percent
- `sku_id` (text): The SKU's ID

**Example output**

```json
{
  "base_price": 250,
  "cost_price": 10,
  "fixed_prices": [
    {
      "list_price": 0,
      "min_quantity": 1,
      "trade_policy_id": "1",
      "valid_from": "",
      "valid_to": "",
      "value": 666.66
    }
  ],
  "list_price": 300,
  "markup": 2400,
  "sku_id": "1234512354"
}
```

### Set stock

Set how many of a SKU a warehouse has, or make it never run out there.

**Inputs**

- SKU (`sku`, text, required): The SKU's ID, a number such as 70, from another VTEX step or an order's items.
- Warehouse (`warehouse`, text, required): The warehouse. Pick one, or give its ID.
- Quantity (`quantity`, number, required): How many it has. Sales count down from it. At least 0.
- Unlimited (`unlimited`, true/false): Whether it never runs out in this warehouse; the quantity is then ignored.

**Outputs**

- `quantity` (number): The quantity it now has there
- `sku_id` (text): The SKU's ID
- `unlimited` (true/false): True if it now never runs out there
- `warehouse_id` (text): The warehouse's ID

**Example output**

```json
{
  "quantity": 201,
  "sku_id": "25",
  "unlimited": false,
  "warehouse_id": "storeWarehouse"
}
```

### Start handling order

Tell VTEX the store has started preparing an order, moving it from Ready for handling to Handling.

**Inputs**

- Order (`order_id`, text, required): The order's ID, such as 1172452900788-01, from another VTEX step or the trigger.

**Outputs**

- `order_id` (text): The order's ID
- `started` (true/false): True once VTEX has the order in Handling

**Example output**

```json
{
  "order_id": "1172452900788-01",
  "started": true
}
```

### Update customer

Change a customer profile, such as their email or phone. Fields left blank keep what they have.

**Inputs**

- Customer (`customer`, text, required): The customer profile's ID, from another VTEX step or the trigger.
- Email (`email`, text): Their email. Leave blank to keep it.
- First name (`first_name`, text): Their first name. Leave blank to keep it.
- Last name (`last_name`, text): Their last name. Leave blank to keep it.
- Phone (`phone`, text): Their phone number, such as +12025550195. Leave blank to keep it.
- Document (`document`, text): Their document number, such as a tax ID. Leave blank to keep it.
- Document type (`document_type`, text): The kind of document, such as cpf. Leave blank to keep it.
- Business customer (`is_corporate`, true/false): Whether they buy for a company.
- Company name (`company_name`, text): Their company's registered name. Leave blank to keep it.
- Trade name (`trade_name`, text): Their company's trading name. Leave blank to keep it.
- Company document (`company_document`, text): Their company's document number. Leave blank to keep it.
- Newsletter (`newsletter`, true/false): Whether they get the store's newsletter.

**Outputs**

- `company_document` (text): Their company's document number
- `company_name` (text): Their company's registered name
- `created_at` (text): When the profile was added (ISO 8601)
- `document` (text): Their document number, such as a tax ID
- `document_type` (text): The kind of document, such as cpf
- `email` (text): Their email
- `first_name` (text): Their first name
- `id` (text): The customer profile's ID
- `is_corporate` (true/false): True for a business customer
- `last_name` (text): Their last name
- `newsletter` (true/false): True if they signed up for the newsletter
- `phone` (text): Their phone number
- `trade_name` (text): Their company's trading name
- `updated_at` (text): When it last changed (ISO 8601)

**Example output**

```json
{
  "company_document": "",
  "company_name": "",
  "created_at": "2025-03-19T21:44:01.4199691Z",
  "document": "12345678900",
  "document_type": "CPF",
  "email": "clark.kent@examplemail.com",
  "first_name": "Clark",
  "id": "b818cbda-e489-11e6-94f4-0ac138d2d42e",
  "is_corporate": false,
  "last_name": "Kent",
  "newsletter": false,
  "phone": "+12025550195",
  "trade_name": "",
  "updated_at": "2025-03-19T21:44:01.4199691Z"
}
```

### Update product

Change a product, such as its name, description or whether it's active. Fields left blank keep what it has.

**Inputs**

- Product (`product`, text, required): The product's ID, a number such as 42, from another VTEX step.
- Name (`name`, text): The product's name, up to 150 characters. Leave blank to keep it.
- Category (`category`, text): The category it's in. Pick one, or give its ID. Leave blank to keep it.
- Brand (`brand`, text): Its brand. Pick one, or give its ID. Leave blank to keep it.
- Reference code (`ref_id`, text): Your own code for the product. Leave blank to keep it.
- Description (`description`, text): What the product page says about it. HTML is allowed. Leave blank to keep it.
- Short description (`short_description`, text): A line about it, shown in product lists. Leave blank to keep it.
- Page address (`link_id`, text): The end of its page's address, such as black-tshirt. Left blank on a new product, VTEX makes one from the name.
- Release date (`release_date`, date): When it came out, used to sort new arrivals.
- Active (`active`, true/false): Whether it's on sale. VTEX keeps a product off until it has an active SKU.
- Visible (`visible`, true/false): Whether it shows in search results and lists.
- Show when out of stock (`show_without_stock`, true/false): Whether it stays on show, with a notify me option, while out of stock.

**Outputs**

- `active` (true/false): True if it's active
- `brand_id` (text): Its brand's ID
- `category_id` (text): Its category's ID
- `department_id` (text): Its department's ID
- `description` (text): Its description
- `id` (text): The product's ID
- `keywords` (text): Other words it can be found by
- `link_id` (text): The end of its page's address, such as black-tshirt
- `meta_description` (text): Its description for search engines
- `name` (text): Its name
- `ref_id` (text): Its reference code
- `release_date` (text): Its release date (ISO 8601)
- `short_description` (text): Its short description
- `show_without_stock` (true/false): True if it shows while out of stock
- `tax_code` (text): Its tax code
- `title` (text): Its page's title
- `visible` (true/false): True if it shows in search results and lists

**Example output**

```json
{
  "active": true,
  "brand_id": "2000000",
  "category_id": "2",
  "department_id": "1",
  "description": "A classic black t-shirt made from soft, breathable cotton",
  "id": "42",
  "keywords": "Blouse",
  "link_id": "premium-tshirt-cotton",
  "meta_description": "Very cool t-shirt for sports",
  "name": "Black T-Shirt",
  "ref_id": "310117869",
  "release_date": "2025-07-01T00:00:00",
  "short_description": "Great premium cotton t-shirt",
  "show_without_stock": true,
  "tax_code": "12345",
  "title": "Premium black t-shirt",
  "visible": true
}
```

### Update SKU

Change a SKU, such as its name, reference code, package size or whether it's active. Fields left blank keep what it has.

**Inputs**

- SKU (`sku`, text, required): The SKU's ID, a number such as 70, from another VTEX step or an order's items.
- Name (`name`, text): A new name. Leave blank to keep it.
- Reference code (`ref_id`, text): A new reference code. Leave blank to keep it.
- Active (`active`, true/false): Whether it's on sale. VTEX turns a SKU on only once it has a picture.
- Packaged height (`packaged_height`, number): Its height when packed, for working out shipping. Leave blank to keep it. At least 0.
- Packaged length (`packaged_length`, number): Its length when packed, for working out shipping. Leave blank to keep it. At least 0.
- Packaged width (`packaged_width`, number): Its width when packed, for working out shipping. Leave blank to keep it. At least 0.
- Packaged weight (`packaged_weight`, number): Its weight when packed, in the unit your store uses, for working out shipping. Leave blank to keep it. At least 0.
- Manufacturer code (`manufacturer_code`, text): A new manufacturer's code. Leave blank to keep it.

**Outputs**

- `activate_when_possible` (true/false): True if VTEX turns it on once it has a picture or an active component
- `active` (true/false): True if it's active
- `created_at` (text): When it was added (ISO 8601)
- `id` (text): The SKU's ID
- `manufacturer_code` (text): The manufacturer's code for it
- `measurement_unit` (text): The unit it's sold in, such as un
- `name` (text): Its name, such as Size 10
- `packaged_height` (number): Its packaged height, for shipping
- `packaged_length` (number): Its packaged length, for shipping
- `packaged_weight` (number): Its packaged weight, for shipping
- `packaged_width` (number): Its packaged width, for shipping
- `product_id` (text): The ID of the product it's a variation of
- `ref_id` (text): Its reference code
- `unit_multiplier` (number): How many go together in one unit sold

**Example output**

```json
{
  "activate_when_possible": false,
  "active": false,
  "created_at": "2020-01-25T15:51:29.2614605",
  "id": "70",
  "manufacturer_code": "",
  "measurement_unit": "un",
  "name": "Size 10",
  "packaged_height": 10.0,
  "packaged_length": 10.0,
  "packaged_weight": 10.0,
  "packaged_width": 10.0,
  "product_id": "42",
  "ref_id": "B096QW8Y8Z",
  "unit_multiplier": 2.0
}
```
