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

# CRM Educacional as a destination

> Send leads and enrollments from Nekt to CRM Educacional.

CRM Educacional is the admissions CRM used by Brazilian educational institutions to run their selection processes end to end — capturing leads, taking applications (*inscrições*) and calling candidates for enrolment. The CRM Educacional destination writes data from your Lakehouse back into the CRM: it creates and updates leads, registers candidates in a selection process (*concurso*), and updates custom fields of existing enrollments.

Every institution runs on its own address, so the connector asks for the URL of your CRM in addition to the credentials of an integration user. It uses the same access as the [CRM Educacional source](https://docs.nekt.com/sources/crm-educacional).

<Note>CRM Educacional sells its software under the **Wakeme** name. This connector writes through the integration API of **Wakeme PRO** and **Wakeme Essencial**. **Wakeme One** is a different system, with its own application and API, and is not covered by this connector.</Note>

The connector performs one operation per destination, selected through the **Mode** setting:

* **Create/Update Leads** - creates a lead, or updates it when the CRM finds one with the same CPF or e-mail.
* **Create/Update Enrollments (Lead + Inscrição)** - creates or updates a lead **and** its enrollment in a concurso, optionally creating the offer (*oferta*) and category it points to.
* **Update Enrollment Custom Fields** - updates fields your institution created on an existing enrollment, found by its enrollment number.

To run more than one operation, create one destination per mode.

## 1. Add your CRM Educacional access

1. In the [Destinations](https://app.nekt.ai/destinations) tab, click on the "Add destination" button located on the top right of your screen. Then, select the CRM Educacional option from the list of connectors.

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

   * **API URL**: the address of your institution's CRM Educacional API, for example `https://yourschoolapi.crmeducacional.com`. You can find it in the CRM under **Configurações > CRM Educacional > aba Captação > "Endereço da Api Ficha de Inscrição"**.
   * **Username** and **Password**: the credentials of an integration user (*Usuário de Integração*), created in the CRM under **Configurações > Usuário de integração > Novo**, with type **API CRM EDUCACIONAL**.
   * **Mode**: the operation to perform (see above).
   * **Concurso code**: only for the **Enrollments** mode — the code of the concurso every row is enrolled in, used when no column of your table carries it.
   * **Dry run**: test mode. The connector signs in, maps and checks every row, and shows the first rows it would send in the run log, **without writing anything to the CRM**. Use it before the first real load.
   * **Enable partial success**: whether the connector should keep loading after the CRM refuses a row. When off, the load stops at the first refused row.
   * **Authentication type** (advanced): **Integration user** (recommended) or **Dynamics CRM user**.
   * **Requests per minute** (advanced): how fast the connector calls the API. Defaults to 50, the limit CRM Educacional documents per user.
   * **Form fields location** (advanced): keep **Automatic** unless Nekt support asks you to change it.

<Warning>CRM Educacional allows **50 requests per minute per user**, and every row is one request — about 3,000 rows per hour. The quota is shared with every integration signed in with the same user, including the CRM Educacional source. Create an integration user for this destination alone, and send only the rows that changed instead of the full table.</Warning>

3. Click **Next**.

## 2. Select your data to send

1. The next step is letting us know which data you want to send. Select the layer and then the desired table.

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

2. Click **Next**.

## 3. Map your columns

Map the columns of your input table to CRM Educacional fields. Use the field's **logical name** in the CRM (for example `cad_cpf`, `emailaddress1`, `firstname`, `mobilephone`). You can find logical names in the CRM under **Configurações avançadas > Personalizações > Personalizar o sistema > Entidades**, by opening the entity and its **Campos** list.

* Option set fields take the option's **integer value**, not its label (for example, a situação of 2).
* Empty and null values are never sent, so existing data in the CRM is preserved when a column has no value.

### Create/Update Leads

The CRM finds an existing lead by **CPF** (`cad_cpf`) or **e-mail** (`emailaddress1`) and updates it; when neither matches, it creates a new lead. Map at least one of the two, or every row becomes a new lead. Any lead field can be sent by its logical name.

To place the lead in a specific business unit, map a column to `usuario` (a CRM user name) or `equipe` (a CRM team name).

**Example input table:**

| cpf         | email                                     | first\_name | last\_name | campaign        |
| :---------- | :---------------------------------------- | :---------- | :--------- | :-------------- |
| 52998224725 | [ana@example.com](mailto:ana@example.com) | Ana         | Souza      | vestibular-2027 |

Column mapping: `cpf` → `cad_cpf` (transform `cpf_mask`), `email` → `emailaddress1`, `first_name` → `firstname`, `last_name` → `lastname`, `campaign` → `cad_campaignname`.

### Create/Update Enrollments (Lead + Inscrição)

Prefix every destination field with the entity it belongs to:

| Prefix       | Required field                         | Notes                                                                                                       |
| :----------- | :------------------------------------- | :---------------------------------------------------------------------------------------------------------- |
| `concurso.`  | `concurso.cad_codigo`                  | The code of the concurso. It can also be set once in the **Concurso code** setting.                         |
| `lead.`      | `lead.cad_cpf` or `lead.emailaddress1` | A new lead also needs `lead.firstname` and `lead.lastname`.                                                 |
| `inscricao.` | —                                      | Enrollment fields, for example `inscricao.cad_situacao`.                                                    |
| `oferta.`    | `oferta.cad_identificadoroferta`       | Optional. The offer is created when it does not exist (it then needs `oferta.cad_nome`), and never updated. |
| `categoria.` | `categoria.cad_identificadorcategoria` | Optional. Same behavior as the offer (a new category needs `categoria.cad_name`).                           |

<Note>CRM Educacional processes enrollments **after** accepting them. The run log confirms each row was accepted; problems found while the CRM processes it are reported by the CRM to the address configured in its own **"URL POST Cadastro Inscrição"** setting, not to Nekt.</Note>

### Update Enrollment Custom Fields

Map the column holding the enrollment number (for example `CAN-000000-CRM`) to `cad_numeroinscricao`, and the columns to update to their fields. Only fields **created by your institution** can be updated this way; CRM Educacional refuses product fields.

### Transforms

Each mapping accepts an optional ordered list of value transforms, applied before sending:

| Transform                 | Description                                                                        |
| :------------------------ | :--------------------------------------------------------------------------------- |
| `trim`                    | Remove surrounding whitespace.                                                     |
| `uppercase` / `lowercase` | Change the text case.                                                              |
| `to_string`               | Cast the value to text.                                                            |
| `to_int`                  | Cast the value to an integer. Use for option sets whose values are stored as text. |
| `round_int`               | Round a decimal to the nearest integer.                                            |
| `null_if:<x>`             | Drop the value when it equals `<x>` (e.g. `null_if:-`).                            |
| `yesno_to_bool`           | Convert `Sim`/`Não` (or `Yes`/`No`) to `true`/`false`.                             |
| `digits_only`             | Keep only the digits, for example of a phone number.                               |
| `cpf_mask`                | Format a CPF as `000.000.000-00`, restoring leading zeros lost in numeric columns. |
| `date_br`                 | Format a date as `DD/MM/YYYY`.                                                     |

## 4. Configure your CRM Educacional data destination

1. Describe your destination 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/get-started/core-concepts/triggers), consider how frequently you need to have the data updated on the destination (every day, once a week, only at specific times, etc.).

3. Click **Done**.

### Check your new destination!

1. Once completed, you'll receive confirmation that your new destination is set up!

2. You can view your new destination on the [Destinations](https://app.nekt.ai/destinations) page. Now, for you to be able to see it on CRM Educacional, you have to wait for the pipeline to run. You can monitor it on the [Destinations](https://app.nekt.ai/destinations) page to see its execution and completion. If needed, manually trigger the pipeline by clicking on the refresh icon. Once executed, your data should be seen on CRM Educacional.

<Tip>Start with **Dry run** enabled and a small table. Check the rows shown in the run log, then turn **Dry run** off to write for real.</Tip>

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