> ## 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.

# Dito as a data source

> Bring cashback and customer profile data from Dito to Nekt.

Dito is a Brazilian CRM and customer engagement platform focused on retail, combining unified consumer profiles, behavior events, campaigns and a cashback product. This connector extracts **cashback rewards, cashback balances and consumer profiles** from Dito's public APIs.

<Warning>
  The Dito API has **no bulk listing**: every read endpoint works one customer at a time. The connector fetches data for the exact list of **Customer IDs** you provide in the configuration — it cannot discover your customer base by itself. Keep in mind that each sync makes one request per customer per stream, so very large lists lead to proportionally long runs.
</Warning>

## Prerequisites: Service Account

All Dito APIs require a **Service Account** (SA) — a generic user registered by **Dito's support team** with a non-personal corporate e-mail (e.g. `integracao@yourbrand.com`). There is no self-service way to create it. Ask your Dito account team to:

1. Create a **Service Account** for your brand;
2. Assign it the **Cashback Rewards Admin** role (required to list cashbacks and balances);
3. Grant it access to the **Get Profile** endpoint of the Profiles API (permissions are granted per endpoint);
4. Confirm your **brand label** (the identifier Dito uses for your brand in API calls).

## 1. Add your Dito access

1. In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the Dito option from the list of connectors.

2. Click **Next** and you'll be prompted to add your access.

   * **Service Account E-mail**: the e-mail of the Service Account created by Dito's support team.
   * **Service Account Password**: the password of that Service Account.
   * **Brand**: the brand label provided by Dito for your account.
   * **Customer IDs**: the customer identifiers you want to fetch data for, one per line. Use the **same identifiers your systems send to Dito** (typically your internal customer ID or CPF).
   * **Store ID** (advanced): optionally filter cashback data to a single store, using the same store identifier sent to Dito.
   * **Page Size** (advanced): number of rewards fetched per page (default 100).

3. Click **Next**.

## 2. Select your Dito streams

1. The next step is letting us know which streams you want to bring. You can select entire groups of streams or only a subset of them.

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

<Info>If a customer in your list doesn't exist in Dito, the connector logs a warning and skips it — the sync never fails because of an unknown customer.</Info>

2. Click **Next**.

## 3. Configure your Dito data streams

1. Customize how you want your data to appear in your catalog. Select a name for each table (which will contain the fetched data) and the type of sync.

* **Layer**: companies in the Growth plan can choose in which [layer](https://docs.nekt.com/get-started/core-concepts/catalog-layers) the tables with the extracted data will be placed.
* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** to all tables at once and make this process faster!
* **Sync Type**: all Dito streams are extracted as FULL\_TABLE — the API offers no date filtering, so each run fetches the current data for every configured customer. Read more about Sync Types [here](https://docs.nekt.com/get-started/core-concepts/types-of-sync).

2. Click **Next**.

## 4. Configure your Dito data source

1. Describe your data source for easy identification within your organization. You can inform things like what data it brings, to which team it belongs, etc.

2. To define your [Trigger](https://docs.nekt.com/runs/scheduling-and-triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

3. Optionally, you can define some additional settings (if available).

* Configure Delta Log Retention and determine for how log we should store old states of this table as it gets updated. Read more about this resource [here](https://docs.nekt.com/get-started/core-concepts/resource-control).

### Check your new source!

1. Click **Next** to finalize the setup. Once completed, you'll receive confirmation that your new source is set up!

2. You can view your new source on the [Sources](https://app.nekt.ai/sources) page. Now, for you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you have to wait for the pipeline to run. You can now monitor it on the [Sources](https://app.nekt.ai/sources) page to see its execution and completion. If needed, manually trigger the pipeline by clicking on the refresh icon. Once executed, your new table will appear in the Catalog section.

> If you encounter any issues, reach out to us via Slack, and we'll gladly assist you!

## Available streams

| Stream            | Slug                | Description                                                                                                        |
| ----------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Customer Rewards  | `customer_rewards`  | Every cashback reward generated for each configured customer, with status, values, dates and originating campaign. |
| Customer Balances | `customer_balances` | Snapshot of each customer's calculated cashback balance at extraction time.                                        |
| Profiles          | `profiles`          | Registration data of each customer's unified consumer profile.                                                     |

<Note>
  All date/time values returned by the Cashback API are in **Brasilia time (GMT-3)**. The `custom_data` field of profiles is delivered as a **JSON string** — parse it downstream (for example in a Query) when you need the individual attributes.
</Note>

## Fields by stream

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

<AccordionGroup>
  <Accordion title="customer_rewards">
    Every cashback reward generated for each configured customer. **Sync:** Full table. **Primary key:** `customer_id`, `id`.

    * `customer_id` - Identifier of the customer the reward belongs to, as provided in the Customer IDs configuration
    * `id` - Unique identifier of the reward
    * `status` - Current status of the reward (available, locked, used, expired or undefined)
    * `value` - Maximum amount that can be redeemed for the reward
    * `balance` - Remaining balance of the reward available to be redeemed
    * `rate` - Maximum percentage of the purchase value that the reward value can be applied to
    * `created_at` - Timestamp when the reward was created (GMT-3)
    * `available_at` - Timestamp when the reward becomes available for use (GMT-3)
    * `due_date` - Expiration date of the reward (GMT-3)
    * `canceled_at` - Timestamp when the reward was canceled, if applicable (GMT-3)
    * `order_id` - Identifier of the purchase transaction that generated the reward
    * `store_id` - Identifier of the store where the purchase that generated the reward was made
    * `campaign_id` - Identifier of the campaign that generated the reward
    * `campaign_name` - Name of the campaign that generated the reward
    * `campaign_description` - Description of the campaign that generated the reward
  </Accordion>

  <Accordion title="customer_balances">
    Current cashback balance breakdown for each configured customer — a snapshot taken at extraction time. **Sync:** Full table. **Primary key:** `customer_id`.

    * `customer_id` - Identifier of the customer, as provided in the Customer IDs configuration
    * `available_balance` - Amount of cashback currently available to be consumed
    * `unavailable_balance` - Amount of cashback that is unavailable because it is still in downtime
    * `next_purchase_balance` - Amount of cashback available for the next purchase based on redemption rules
    * `next_purchase_first_due_date` - First expiration date among the rewards that make up the next purchase balance (GMT-3)
    * `campaign_id` - Identifier of the campaign related to the next purchase balance
    * `campaign_name` - Name of the campaign related to the next purchase balance
    * `campaign_description` - Description of the campaign related to the next purchase balance
  </Accordion>

  <Accordion title="profiles">
    Registration data of each customer's unified consumer profile. **Sync:** Full table. **Primary key:** `customer_id`.

    * `customer_id` - Identifier of the customer, as provided in the Customer IDs configuration
    * `id` - Unique identifier of the profile within the brand, as returned by Dito
    * `brand` - Brand identifier the profile belongs to
    * `name` - Full name of the consumer
    * `email` - E-mail address of the consumer
    * `phone` - Phone number of the consumer
    * `gender` - Gender of the consumer
    * `birthday` - Birth date of the consumer
    * `create_time` - Timestamp when the profile was created in Dito
    * `time_zone` - Time zone of the consumer
    * `address_street` - Street of the consumer's address
    * `address_city` - City of the consumer's address
    * `address_state` - State of the consumer's address
    * `address_country` - Country of the consumer's address
    * `address_postal_code` - Postal code of the consumer's address
    * `custom_data` - Brand-specific custom attributes of the profile (JSON string; each key holds a value and its format)
  </Accordion>
</AccordionGroup>

<Note>
  Campaigns, journeys and messaging data ("réguas") are **not available** through Dito's read APIs — Dito only pushes that information outward via its self-service outbound webhooks. If you need campaign/journey events in Nekt, talk to us about setting up a webhook-based ingestion instead.
</Note>
