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

# Martz as a data source

> Bring data from Martz to Nekt.

Martz is a Brazilian retention CRM for e-commerce. It ingests customers, orders, products and abandoned carts from your store's own platform (Nuvemshop, Shopify, Tray, VTEX, Bling, Omie and others), segments the customer base into groups, and runs WhatsApp, e-mail and SMS campaigns against it. This connector brings what Martz has already ingested and computed into your Nekt Catalog — including the message-by-message log of every campaign and the coupons those campaigns handed out.

## Before you start

You need a **public API key** for your Martz store. You generate it yourself, in the Martz panel:

<Steps>
  <Step title="Open the access keys page">
    In [painel.martz.com.br](https://painel.martz.com.br/settings/api-keys), go to **Configurações » Chaves de Acesso**.
  </Step>

  <Step title="Find the public API key">
    Look at the **Chave da API pública** box. If a key is already there, copy it.
  </Step>

  <Step title="Create one if there is none">
    If the box says *Nenhuma chave criada*, click **gerar nova chave**.
  </Step>
</Steps>

<Warning>Generating a new key immediately stops the previous one working. If other integrations already use your Martz API key, only regenerate it if you are ready to update them all at the same time.</Warning>

The key does not expire and is tied to one store, so one Nekt source reads one Martz store.

## Configuring Martz as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click the "Add source" button in the top-right corner, then select Martz from the list of connectors.

Click **Next** and add your access details.

### 1. Add account access

The following configuration fields are available:

* **API Key**: The public API key you copied from the Martz panel. It is sent as the `X-API-KEY` header on every request.
* **Initial sync date** (advanced): The earliest scheduled send date read by the **Campaign activities** table on the first run. Later runs continue from where the previous one stopped. Leave it empty to read your full history. It does not affect the other tables — see [Sync types](#sync-types) below.
* **Lookback window (days)** (advanced): How many days before the last sync the Campaign activities table re-reads on every run. Defaults to 1.
* **Page size** (advanced): Records requested per page. Martz caps this at 100, which is also the default and the fastest option.
* **Requests per minute** (advanced): Maximum number of API calls per minute this source makes. Defaults to 120.
* **API URL** (advanced): Overrides the Martz API address. Only change it if Martz told you to use a different host.

After configuring access, click **Next**.

### 2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the ones relevant to your analysis.

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how data should appear in your Catalog, including layer, table naming, and sync type.

* **Layer**: Select the destination layer where extracted tables will be created.
* **Folder**: A folder can be created inside the selected layer to group all tables from this source.
* **Table name**: Use the suggested name or customize it. You can also apply a prefix to all tables at once.
* **Sync Type**: Choose between `INCREMENTAL` and `FULL_TABLE`. See [Sync types](#sync-types) — only **Campaign activities** supports `INCREMENTAL`.

When you're done, click **Next**.

### 4. Configure data source

Add a clear description for this source so your team can identify it easily, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers), choose how often data should be extracted (for example, daily, weekly, or at fixed times).

Optionally, configure additional settings:

* Delta Log Retention, which controls how long old table states are kept. Learn more [here](https://docs.nekt.com/get-started/core-concepts/resource-control).
* Additional [Full Sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync), to periodically complement incremental runs with a complete refresh.

When you are ready, click **Next** to finalize setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, trigger a run manually from the source actions.

<Warning>To see data in the [Catalog](https://app.nekt.ai/catalog), at least one source run must complete successfully.</Warning>

## Sync types

**Campaign activities** is the only table that can sync incrementally, and it is also the largest — it holds one row per message sent to one customer. Its endpoint is the only one in the Martz API that accepts a date filter, so every run reads only what was scheduled since the last one, plus the lookback window.

Every other table is read in full on every run. The Martz API publishes no "modified since" filter on any other endpoint, so there is no reliable way to ask it for only what changed. Reading them in full is what guarantees the Catalog matches Martz; a full read also self-corrects, so a table never drifts.

In practice this matters most for **Customers** and **Orders**, the two tables that grow with the store. If they are large, prefer a daily trigger over an hourly one.

## Good to know

* **Money is in cents.** `subtotal`, `freight`, `discount`, `total`, `price` and the coupon values are whole numbers in the smallest unit of your currency — `19000` is R\$ 190,00. Divide by 100 in a [Query](https://docs.nekt.com/queries/overview) when you present them.
* **Two views of an order's status.** `status` is Martz's normalised status; `raw_status` is the exact wording your own e-commerce platform used. Use `raw_status` when a report has to agree with your back office.
* **Every commerce record keeps its origin.** `integration_name` and `integration_id` carry the platform the record came from and its identifier there, so you can join Martz data back to your store's own exports.
* **Order lines and cart lines are JSON text.** `orders.products` and `abandoned_carts.products` hold the line items as a JSON array. Parse them in a Query or Notebook when you need one row per item.
* **Leads and buyers share one table.** Martz calls a contact with no paid order a *lead*. Both are in **Customers**; `order_amount` equal to zero is what marks a lead.
* **Deleted coupons are still returned.** Rows in **Coupons** carrying a `deleted_at` value are ones Martz removed. Filter them out if your report should ignore them.
* **Campaign activities can be scheduled into the future.** `scheduled_to` is when a message is due to go out, so rows with dates ahead of today are normal.
* **A table your plan does not include is skipped, not failed.** If Martz refuses one of the endpoints for your store, that table is left untouched and the run reports it — every other table still syncs.
* **One key, one store.** The key is issued per store, so syncing two Martz stores means two sources in Nekt.

# Streams and Fields

## Available streams

| Stream                    | Slug                         | Description                                                                         |
| ------------------------- | ---------------------------- | ----------------------------------------------------------------------------------- |
| Store                     | `store`                      | The Martz account itself — name, site, category and connected platforms. One row.   |
| Customers                 | `customers`                  | Every customer and lead Martz holds, with lifetime order totals and average ticket. |
| Orders                    | `orders`                     | Orders imported from your e-commerce platform, with their line items and customer.  |
| Products                  | `products`                   | Products imported from your e-commerce platform.                                    |
| Product categories        | `product_categories`         | Category tree imported from your e-commerce platform.                               |
| Abandoned carts           | `abandoned_carts`            | Carts filled in the store and never checked out, with their line items.             |
| Campaigns                 | `campaigns`                  | Retention campaigns configured in Martz, with status and period.                    |
| Campaign activities       | `campaign_activities`        | One row per message a campaign scheduled for one customer, with its send status.    |
| Coupons (bonus)           | `bonus`                      | Discount coupons Martz generated, and the orders that earned and spent them.        |
| Customer groups           | `customer_clusters`          | Segments the store targets campaigns at, drawn by hand or maintained by Martz.      |
| Customer tags             | `customer_tags`              | Labels the store can attach to its customers.                                       |
| Custom attributes         | `resource_custom_attributes` | Extra fields the store defined on its customers or orders.                          |
| Popups                    | `popups`                     | Popups and newsletter forms shown on the store's site.                              |
| Popup sign-ups            | `popup_signins`              | One row per visitor who submitted a popup form.                                     |
| Collaborators             | `collaborators`              | People with access to the store's Martz account, and their roles.                   |
| Dashboards                | `dashboards`                 | Dashboards saved in the Martz panel.                                                |
| WhatsApp templates        | `whatsapp_templates`         | Message templates submitted to Meta, with their approval status.                    |
| WhatsApp Business numbers | `whatsapp_business_numbers`  | WhatsApp Business numbers connected through the app.                                |
| WhatsApp official senders | `whatsapp_official_numbers`  | Numbers registered with Meta's official WhatsApp Business API.                      |

## Fields by stream

Below you'll find all available data streams from Martz and their corresponding fields:

<AccordionGroup>
  <Accordion title="Store">
    | Field                 | Type    | Description                                                                                                                       |
    | :-------------------- | :------ | :-------------------------------------------------------------------------------------------------------------------------------- |
    | `id`                  | String  | Unique identifier of the store in Martz.                                                                                          |
    | `name`                | String  | Name of the store.                                                                                                                |
    | `description`         | String  | Description of the store as written in the Martz panel.                                                                           |
    | `site_url`            | String  | Address of the store's own site.                                                                                                  |
    | `logo`                | String  | Address of the store's logo image.                                                                                                |
    | `enabled`             | Boolean | Whether the store's Martz account is active.                                                                                      |
    | `store_category_name` | String  | Retail category the store was classified under.                                                                                   |
    | `created_at`          | Date    | When the store's Martz account was created.                                                                                       |
    | `updated_at`          | Date    | When the store's Martz account was last changed.                                                                                  |
    | `store_integrations`  | String  | Platforms connected to this Martz account, as a JSON array of objects carrying each integration's name and whether it is enabled. |
  </Accordion>

  <Accordion title="Customers">
    | Field                      | Type    | Description                                                                                                        |
    | :------------------------- | :------ | :----------------------------------------------------------------------------------------------------------------- |
    | `id`                       | String  | Unique identifier of the customer in Martz.                                                                        |
    | `email`                    | String  | E-mail address of the customer.                                                                                    |
    | `first_name`               | String  | First name of the customer.                                                                                        |
    | `last_name`                | String  | Last name of the customer.                                                                                         |
    | `gender`                   | String  | Gender recorded for the customer, as a single letter (M or F) when the store's platform provides it.               |
    | `phone`                    | String  | Phone number of the customer, without the country code.                                                            |
    | `phone_country_code`       | String  | Country calling code of the phone number, without the plus sign (55 for Brazil).                                   |
    | `enabled`                  | Boolean | Whether the customer is active in Martz and may receive campaign messages.                                         |
    | `average_ticket`           | Integer | Average value of the customer's paid orders, in cents.                                                             |
    | `order_amount`             | Integer | Number of paid orders the customer has placed. Zero means Martz treats this contact as a lead rather than a buyer. |
    | `order_total`              | Integer | Sum of the customer's paid orders, in cents.                                                                       |
    | `last_order_date`          | Date    | Date of the customer's most recent order.                                                                          |
    | `integration_created_at`   | Date    | When the customer was created in the store's own platform, as reported by the integration that imported them.      |
    | `is_valid_whatsapp_number` | Boolean | Whether Martz verified the customer's phone number as a reachable WhatsApp account.                                |
  </Accordion>

  <Accordion title="Orders">
    | Field                      | Type    | Description                                                                                                                                                                                                                                |
    | :------------------------- | :------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `id`                       | String  | Unique identifier of the order in Martz.                                                                                                                                                                                                   |
    | `order_number`             | String  | Order number as shown in the store's own platform.                                                                                                                                                                                         |
    | `number`                   | String  | Street number of the delivery address.                                                                                                                                                                                                     |
    | `status`                   | String  | Order status normalised by Martz, for example PAID, CANCELED or WAITING\_PAYMENT.                                                                                                                                                          |
    | `raw_status`               | String  | Order status exactly as the store's own platform reported it, before Martz normalised it.                                                                                                                                                  |
    | `channel`                  | String  | Sales channel the order came through.                                                                                                                                                                                                      |
    | `payment_method`           | String  | Payment method used, as named by the store's platform (for example 'Boleto - Yapay').                                                                                                                                                      |
    | `subtotal`                 | Integer | Value of the ordered items before freight and discounts, in cents.                                                                                                                                                                         |
    | `freight`                  | Integer | Shipping cost charged on the order, in cents.                                                                                                                                                                                              |
    | `discount`                 | Integer | Discount applied to the order, in cents.                                                                                                                                                                                                   |
    | `financial_discount`       | Integer | Additional financial discount applied to the order, in cents.                                                                                                                                                                              |
    | `total`                    | Integer | Total value of the order including freight and discounts, in cents.                                                                                                                                                                        |
    | `coupon_name`              | String  | Code of the discount coupon used on the order, when one was.                                                                                                                                                                               |
    | `ordered_at`               | Date    | When the order was placed in the store's platform.                                                                                                                                                                                         |
    | `created_at`               | Date    | When the order record was created in Martz.                                                                                                                                                                                                |
    | `updated_at`               | Date    | When the order record was last changed in Martz.                                                                                                                                                                                           |
    | `integration_name`         | String  | Name of the integration the order was imported from, for example tray, nuvemshop or vtex.                                                                                                                                                  |
    | `integration_id`           | String  | Identifier of the order in the store's own platform.                                                                                                                                                                                       |
    | `integration_updated_at`   | Date    | When the order was last changed in the store's own platform.                                                                                                                                                                               |
    | `integration_paid_at`      | Date    | When the order was paid, as reported by the store's own platform. Empty while the order is unpaid.                                                                                                                                         |
    | `integration_cancelled_at` | Date    | When the order was cancelled in the store's own platform. Empty unless it was cancelled.                                                                                                                                                   |
    | `integration_seller`       | String  | Seller credited with the order in the store's own platform.                                                                                                                                                                                |
    | `address`                  | String  | Street of the delivery address.                                                                                                                                                                                                            |
    | `complement`               | String  | Additional detail of the delivery address, such as an apartment or block.                                                                                                                                                                  |
    | `locality`                 | String  | Neighbourhood of the delivery address.                                                                                                                                                                                                     |
    | `city`                     | String  | City of the delivery address.                                                                                                                                                                                                              |
    | `state`                    | String  | State or region of the delivery address.                                                                                                                                                                                                   |
    | `country`                  | String  | Country of the delivery address, as a two-letter code.                                                                                                                                                                                     |
    | `zipcode`                  | String  | Postal code of the delivery address.                                                                                                                                                                                                       |
    | `freight_name`             | String  | Shipping method chosen for the order.                                                                                                                                                                                                      |
    | `freight_tracking_code`    | String  | Carrier tracking code for the shipment.                                                                                                                                                                                                    |
    | `freight_tracking_url`     | String  | Address where the shipment can be tracked.                                                                                                                                                                                                 |
    | `customer_id`              | String  | Identifier in Martz of the customer this record belongs to.                                                                                                                                                                                |
    | `customer_email`           | String  | E-mail address of the customer this record belongs to.                                                                                                                                                                                     |
    | `customer_first_name`      | String  | First name of the customer this record belongs to.                                                                                                                                                                                         |
    | `customer_last_name`       | String  | Last name of the customer this record belongs to.                                                                                                                                                                                          |
    | `products`                 | String  | Items in the order, as a JSON array of objects. Each entry carries the line's id, product\_id, product\_name, product\_category\_id, product\_category\_name, integration\_id, unit price in cents, quantity, created\_at and updated\_at. |
  </Accordion>

  <Accordion title="Products">
    | Field              | Type    | Description                                                                                 |
    | :----------------- | :------ | :------------------------------------------------------------------------------------------ |
    | `id`               | String  | Unique identifier of the product in Martz.                                                  |
    | `name`             | String  | Display name of the product.                                                                |
    | `sku`              | String  | Stock keeping unit of the product in the store's own platform.                              |
    | `price`            | Integer | Price of the product, in cents.                                                             |
    | `integration_id`   | String  | Identifier of the product in the store's own platform.                                      |
    | `integration_name` | String  | Name of the integration the product was imported from, for example vtex, tray or nuvemshop. |
    | `created_at`       | Date    | When the product record was created in Martz.                                               |
  </Accordion>

  <Accordion title="Product categories">
    | Field              | Type   | Description                                                                             |
    | :----------------- | :----- | :-------------------------------------------------------------------------------------- |
    | `id`               | String | Unique identifier of the product category in Martz.                                     |
    | `name`             | String | Display name of the category.                                                           |
    | `main_category_id` | String | Identifier in Martz of the parent category, or empty when this is a top-level category. |
    | `integration_id`   | String | Identifier of the category in the store's own platform.                                 |
    | `integration_name` | String | Name of the integration the category was imported from.                                 |
    | `created_at`       | Date   | When the category record was created in Martz.                                          |
  </Accordion>

  <Accordion title="Abandoned carts">
    | Field                    | Type    | Description                                                                                                                                                              |
    | :----------------------- | :------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `id`                     | String  | Unique identifier of the abandoned cart in Martz.                                                                                                                        |
    | `store_id`               | String  | Identifier in Martz of the store the cart belongs to.                                                                                                                    |
    | `url`                    | String  | Checkout address that reopens this cart in the store.                                                                                                                    |
    | `subtotal`               | Integer | Value of the items in the cart before freight and discounts, in cents.                                                                                                   |
    | `freight`                | Integer | Shipping cost estimated for the cart, in cents.                                                                                                                          |
    | `discount`               | Integer | Discount applied to the cart, in cents.                                                                                                                                  |
    | `total`                  | Integer | Total value of the cart including freight and discounts, in cents.                                                                                                       |
    | `payment_method`         | String  | Payment method selected before the cart was abandoned, or not\_informed when the customer never reached that step.                                                       |
    | `coupon_name`            | String  | Code of the discount coupon applied to the cart, when one was.                                                                                                           |
    | `channel`                | String  | Sales channel the cart was created in.                                                                                                                                   |
    | `city`                   | String  | City of the address filled in before the cart was abandoned.                                                                                                             |
    | `state`                  | String  | State or region of the address filled in before the cart was abandoned.                                                                                                  |
    | `country`                | String  | Country of the address, as a two-letter code.                                                                                                                            |
    | `zipcode`                | String  | Postal code of the address filled in before the cart was abandoned.                                                                                                      |
    | `freight_name`           | String  | Shipping method selected before the cart was abandoned.                                                                                                                  |
    | `integration_id`         | String  | Identifier of the cart or checkout session in the store's own platform.                                                                                                  |
    | `integration_name`       | String  | Name of the integration the cart was imported from.                                                                                                                      |
    | `integration_created_at` | Date    | When the cart was created in the store's own platform.                                                                                                                   |
    | `created_at`             | Date    | When the cart record was created in Martz.                                                                                                                               |
    | `updated_at`             | Date    | When the cart record was last changed in Martz.                                                                                                                          |
    | `customer_id`            | String  | Identifier in Martz of the customer this record belongs to.                                                                                                              |
    | `customer_email`         | String  | E-mail address of the customer this record belongs to.                                                                                                                   |
    | `customer_first_name`    | String  | First name of the customer this record belongs to.                                                                                                                       |
    | `customer_last_name`     | String  | Last name of the customer this record belongs to.                                                                                                                        |
    | `products`               | String  | Items in the cart, as a JSON array of objects. Each entry carries the line's id, product\_id, product\_name, unit price in cents, quantity, created\_at and updated\_at. |
  </Accordion>

  <Accordion title="Campaigns">
    | Field            | Type    | Description                                                                                          |
    | :--------------- | :------ | :--------------------------------------------------------------------------------------------------- |
    | `id`             | String  | Unique identifier of the campaign in Martz.                                                          |
    | `name`           | String  | Name given to the campaign in the Martz panel.                                                       |
    | `status`         | String  | Current state of the campaign: ACTIVATED, PAUSED, FINISHED, CANCELED or LOADING.                     |
    | `started_at`     | Date    | When the campaign starts sending.                                                                    |
    | `ended_at`       | Date    | When the campaign stops sending. Campaigns meant to run indefinitely carry a date far in the future. |
    | `customer_total` | Integer | Number of customers currently associated with the campaign.                                          |
  </Accordion>

  <Accordion title="Campaign activities">
    | Field                 | Type    | Description                                                                                                                                    |
    | :-------------------- | :------ | :--------------------------------------------------------------------------------------------------------------------------------------------- |
    | `id`                  | String  | Unique identifier of the activity in Martz.                                                                                                    |
    | `message`             | String  | Text of the message as it was sent to the customer, with the campaign's variables already replaced.                                            |
    | `message_type`        | String  | Form of the message, for example TEXT or a media type.                                                                                         |
    | `channel`             | String  | Channel the message went out on, for example OFFICIAL\_WHATSAPP, WHATSAPP, EMAIL or SMS.                                                       |
    | `status`              | String  | Martz's own view of the send: DELAYED, NOT\_SENDED, SENDED, UNACHIEVABLE, WAITING\_FOR\_SEND, DELIVERED, SENT, FAILED or READED.               |
    | `remote_status`       | String  | Status the messaging channel itself reported back, for example READ or DELIVERED.                                                              |
    | `unachievable`        | Boolean | Whether the customer could not be reached on this channel, for example because the number is not a valid WhatsApp account.                     |
    | `last_send_error`     | String  | Error reported the last time the send was attempted.                                                                                           |
    | `scheduled_to`        | Date    | When the message is or was scheduled to go out. Used as the incremental replication key, and the field the API's date filter compares against. |
    | `executed_at`         | Date    | When the send actually ran. Empty while the activity is still waiting.                                                                         |
    | `created_at`          | Date    | When the activity was created in Martz.                                                                                                        |
    | `execution_mode`      | String  | Whether the send was triggered by the campaign itself (AUTOMATIC) or by a person in the panel.                                                 |
    | `executor_name`       | String  | Name of the collaborator who triggered the send, when it was not automatic.                                                                    |
    | `generated_from_ai`   | Boolean | Whether the message text was written by Martz's AI assistant.                                                                                  |
    | `offset`              | Integer | Position of this message in the campaign's sequence of steps, counted from the trigger.                                                        |
    | `sender_id`           | String  | Identifier of the WhatsApp number or e-mail identity the message was sent from.                                                                |
    | `mail_subject`        | String  | Subject line, for activities sent by e-mail.                                                                                                   |
    | `mail_from`           | String  | Sending address, for activities sent by e-mail.                                                                                                |
    | `mail_sender_name`    | String  | Display name of the sender, for activities sent by e-mail.                                                                                     |
    | `asset_resource_file` | String  | Address of the image or file attached to the message.                                                                                          |
  </Accordion>

  <Accordion title="Coupons (bonus)">
    | Field                 | Type    | Description                                                                                                                |
    | :-------------------- | :------ | :------------------------------------------------------------------------------------------------------------------------- |
    | `id`                  | String  | Unique identifier of the coupon in Martz.                                                                                  |
    | `code`                | String  | Coupon code the customer types at checkout.                                                                                |
    | `type`                | String  | How the discount is calculated, for example PERCENTAGE or a fixed value.                                                   |
    | `value`               | Integer | Size of the discount. For a fixed coupon this is in cents; for a percentage coupon it is the percentage times one hundred. |
    | `max_value`           | Integer | Cap on the discount a percentage coupon may give, in cents.                                                                |
    | `minimum_for_use`     | Integer | Smallest order value the coupon may be used on, in cents.                                                                  |
    | `purchase_value`      | Integer | Value of the order that earned the customer this coupon, in cents.                                                         |
    | `used_purchase_value` | Integer | Value of the order the coupon was spent on, in cents.                                                                      |
    | `channel`             | String  | Where the coupon can be redeemed, for example ECOMMERCE.                                                                   |
    | `campaign_id`         | String  | Identifier in Martz of the campaign that generated the coupon.                                                             |
    | `order_id`            | String  | Identifier in Martz of the order that earned the customer this coupon.                                                     |
    | `used_order_id`       | String  | Identifier in Martz of the order the coupon was spent on.                                                                  |
    | `used_at`             | Date    | When the coupon was redeemed. Empty while it is unused.                                                                    |
    | `expires_at`          | Date    | When the coupon stops being valid.                                                                                         |
    | `canceled_at`         | Date    | When the coupon was cancelled. Empty unless it was.                                                                        |
    | `deleted_at`          | Date    | When the coupon was removed in Martz. Rows carrying a value here are still returned by the API.                            |
    | `created_at`          | Date    | When the coupon was created in Martz.                                                                                      |
    | `updated_at`          | Date    | When the coupon was last changed in Martz.                                                                                 |
    | `customer_id`         | String  | Identifier in Martz of the customer the coupon belongs to.                                                                 |
    | `customer_email`      | String  | E-mail address of the customer the coupon belongs to.                                                                      |
    | `customer_first_name` | String  | First name of the customer the coupon belongs to.                                                                          |
    | `customer_last_name`  | String  | Last name of the customer the coupon belongs to.                                                                           |
    | `customer_document`   | String  | Tax document (CPF or CNPJ) of the customer the coupon belongs to.                                                          |
    | `customer_phone`      | String  | Phone number of the customer the coupon belongs to.                                                                        |
    | `limitations`         | String  | Days and time ranges the coupon may be used in, as a JSON object keyed by weekday.                                         |
  </Accordion>

  <Accordion title="Customer groups">
    | Field              | Type    | Description                                                                                                   |
    | :----------------- | :------ | :------------------------------------------------------------------------------------------------------------ |
    | `id`               | String  | Unique identifier of the customer group in Martz.                                                             |
    | `name`             | String  | Name given to the group in the Martz panel.                                                                   |
    | `visibility`       | String  | Whether the group is visible to the whole store or only to the collaborator who created it.                   |
    | `mode`             | String  | Whether membership is recalculated as customers change (DYNAMIC) or fixed at the moment the group was built.  |
    | `update_mode`      | String  | How a recalculation treats customers that no longer match, for example WITH\_REMOVAL.                         |
    | `creation_type`    | String  | Whether the group was created by a person in the panel (BY\_USER) or maintained by Martz itself (BY\_SYSTEM). |
    | `status`           | String  | State of the group's last recalculation, for example UPDATED.                                                 |
    | `customers_amount` | Integer | Number of customers currently in the group.                                                                   |
    | `created_at`       | Date    | When the group was created in Martz.                                                                          |
  </Accordion>

  <Accordion title="Customer tags">
    | Field   | Type   | Description                                        |
    | :------ | :----- | :------------------------------------------------- |
    | `id`    | String | Unique identifier of the tag in Martz.             |
    | `name`  | String | Label shown on the tag.                            |
    | `color` | String | Colour the tag is drawn in, as a hexadecimal code. |
  </Accordion>

  <Accordion title="Custom attributes">
    | Field        | Type    | Description                                                                                             |
    | :----------- | :------ | :------------------------------------------------------------------------------------------------------ |
    | `id`         | Integer | Unique identifier of the custom attribute in Martz.                                                     |
    | `name`       | String  | Name the attribute is shown under in the Martz panel.                                                   |
    | `path`       | String  | Location the value is read from inside the source record, written as a dotted path such as products.id. |
    | `resource`   | String  | Entity the attribute belongs to: CUSTOMER or ORDER.                                                     |
    | `enabled`    | Boolean | Whether the attribute is currently being collected.                                                     |
    | `created_at` | Date    | When the attribute was created in Martz.                                                                |
  </Accordion>

  <Accordion title="Popups">
    | Field               | Type    | Description                                                     |
    | :------------------ | :------ | :-------------------------------------------------------------- |
    | `id`                | String  | Unique identifier of the popup in Martz.                        |
    | `name`              | String  | Name given to the popup in the Martz panel.                     |
    | `title`             | String  | Headline shown to the visitor.                                  |
    | `enabled`           | Boolean | Whether the popup is currently being shown on the store's site. |
    | `integration_names` | Array   | Names of the store platforms this popup is displayed on.        |
  </Accordion>

  <Accordion title="Popup sign-ups">
    | Field                | Type    | Description                                                            |
    | :------------------- | :------ | :--------------------------------------------------------------------- |
    | `id`                 | Integer | Unique identifier of the sign-up in Martz.                             |
    | `popup_id`           | String  | Identifier in Martz of the popup that collected this sign-up.          |
    | `customer_id`        | String  | Identifier in Martz of the customer created or matched by the sign-up. |
    | `page`               | String  | Page of the store's site the visitor was on when they signed up.       |
    | `newsletter_version` | Integer | Version of the popup's content that was on screen at the time.         |
    | `created_at`         | Date    | When the visitor submitted the form.                                   |
  </Accordion>

  <Accordion title="Collaborators">
    | Field                  | Type    | Description                                                                  |
    | :--------------------- | :------ | :--------------------------------------------------------------------------- |
    | `id`                   | String  | Unique identifier of this person's membership of the store in Martz.         |
    | `role`                 | String  | What the person may do in the account: OWNER, MANAGER, VISUALIZER or SELLER. |
    | `enabled`              | Boolean | Whether the membership is active.                                            |
    | `created_at`           | Date    | When the person was added to the store.                                      |
    | `updated_at`           | Date    | When the membership was last changed.                                        |
    | `collaborator_id`      | String  | Identifier of the person in Martz, stable across every store they belong to. |
    | `collaborator_name`    | String  | Name of the person.                                                          |
    | `collaborator_email`   | String  | E-mail address the person signs in with.                                     |
    | `collaborator_enabled` | Boolean | Whether the person's own Martz account is active.                            |
  </Accordion>

  <Accordion title="Dashboards">
    | Field        | Type    | Description                                                    |
    | :----------- | :------ | :------------------------------------------------------------- |
    | `id`         | String  | Unique identifier of the dashboard in Martz.                   |
    | `name`       | String  | Name given to the dashboard in the Martz panel.                |
    | `featured`   | Boolean | Whether the dashboard is pinned as the account's default view. |
    | `created_at` | Date    | When the dashboard was created.                                |
  </Accordion>

  <Accordion title="WhatsApp templates">
    | Field                          | Type   | Description                                                                                             |
    | :----------------------------- | :----- | :------------------------------------------------------------------------------------------------------ |
    | `id`                           | String | Unique identifier of the template in Martz.                                                             |
    | `name`                         | String | Name the template was registered under with Meta.                                                       |
    | `body`                         | String | Text of the template, with its variables written as numbered placeholders.                              |
    | `language`                     | String | Language the template was submitted in, for example pt\_BR.                                             |
    | `category`                     | String | Category the template was submitted under, for example MARKETING or UTILITY.                            |
    | `content_type`                 | String | Form of the template, for example CALL\_TO\_ACTION.                                                     |
    | `approval_status`              | String | Where the template stands with Meta: NOT\_SUBMITTED, PENDING, APPROVED or REJECTED.                     |
    | `reason`                       | String | Reason Meta gave for the current status, or NONE.                                                       |
    | `quality_rating`               | String | Quality rating Meta assigned to the template based on how recipients reacted to it.                     |
    | `media_url`                    | String | Address of the image or file the template sends.                                                        |
    | `media_type`                   | String | Kind of media the template sends.                                                                       |
    | `external_id`                  | String | Identifier of the template inside Meta's systems.                                                       |
    | `meta_business_manager_id`     | String | Identifier of the Meta Business Manager the template belongs to.                                        |
    | `whatsapp_business_account_id` | String | Identifier of the WhatsApp Business Account the template belongs to.                                    |
    | `sample_data`                  | String | Example values submitted for the template's placeholders, as a JSON object keyed by placeholder number. |
    | `metadata`                     | String | Additional template detail Meta returned, as a JSON object.                                             |
    | `created_at`                   | Date   | When the template was created in Martz.                                                                 |
    | `updated_at`                   | Date   | When the template was last changed in Martz.                                                            |
  </Accordion>

  <Accordion title="WhatsApp Business numbers">
    | Field                     | Type    | Description                                                                                           |
    | :------------------------ | :------ | :---------------------------------------------------------------------------------------------------- |
    | `id`                      | String  | Unique identifier of the connected number in Martz.                                                   |
    | `number`                  | String  | The WhatsApp number itself.                                                                           |
    | `name`                    | String  | Name given to the connection in the Martz panel.                                                      |
    | `is_active`               | Boolean | Whether the number is enabled for sending.                                                            |
    | `is_online`               | Boolean | Whether the connected WhatsApp session is currently reachable.                                        |
    | `store_collaborator_id`   | String  | Identifier of the collaborator membership this number belongs to, joining to the collaborators table. |
    | `store_collaborator_name` | String  | Name of the collaborator who answers on this number.                                                  |
    | `created_at`              | Date    | When the number was connected.                                                                        |
  </Accordion>

  <Accordion title="WhatsApp official senders">
    | Field                          | Type    | Description                                                                                     |
    | :----------------------------- | :------ | :---------------------------------------------------------------------------------------------- |
    | `id`                           | String  | Unique identifier of the sender in Martz.                                                       |
    | `number`                       | String  | The sending number, in international format.                                                    |
    | `business_display_name`        | String  | Business name recipients see next to the number.                                                |
    | `status`                       | String  | Whether the sender is currently connected, for example ONLINE.                                  |
    | `is_active`                    | Boolean | Whether the sender is enabled for sending.                                                      |
    | `quality_rating`               | String  | Quality rating Meta assigned to the number based on how recipients reacted to its messages.     |
    | `messaging_limits`             | String  | Daily sending tier Meta granted the number, which caps how many customers a campaign may reach. |
    | `external_id`                  | String  | Identifier of the phone number inside Meta's systems.                                           |
    | `whatsapp_business_account_id` | String  | Identifier of the WhatsApp Business Account the sender belongs to.                              |
    | `created_at`                   | Date    | When the sender was registered in Martz.                                                        |
    | `updated_at`                   | Date    | When the sender was last changed in Martz.                                                      |
  </Accordion>
</AccordionGroup>
