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

# Compatibility registry

> What a registry is, how it relates to the client's request, the registries tab, the script and agent, and the dialing binding.

# Compatibility registry

A **compatibility registry** is the list of scripts of one adapter account. Each script defines:

* which V4 agent answers the script name from the client's request;
* how to parse the fields of a request row and which of them become agent variables — see [Fields and variables](https://docs.hubtalk.ai/v4/compat-adapter/registry-fields.md);
* which rules to use for calling back — see [Retry rules, saving and editing](https://docs.hubtalk.ai/v4/compat-adapter/registry-rules.md);
* which trunk to dial through — see [Dialing binding](#dialing-binding).

## How the registry relates to a request

A V2 client sends the adapter a request like this:

```json theme={null}
{
  "user": "user_turbopeso", "pass": "…",
  "type": "create", "cname": "morning", "start_hour": 10, "ending_hour": 20, "try": 2, "speed": 5,
  "data": [
    {"phone_number": "5215512345678", "type": "soft_script", "gender_voice": "female", "language": "es",
     "client_name": "Ana", "amount_due": "1200", "due_date": "15.10.2026"}
  ]
}
```

* The top-level `type` is the operation: `create`, `delete`, `delete_phone_number`, `details`.
* `data[].type` is the **script name**. The adapter uses it to find the registry row of this account, and only this account. The comparison is case-sensitive and character-exact.
* The common row fields for the MX system are always required and come first: `phone_number` (11–13 digits), `type`, `gender_voice` (`male`/`female`), `language` (`en`/`ru`/`es`). They are followed by the script schema fields in registry order.
* A row with an unknown script, a script without an agent, or an archived or unpublished agent gets the error `{"line":"1", "fields":["type"]}`, and the whole request is refused before anything is written.

One campaign is created per set of attributes: "account, script, `cname`, start hour and minute, day, attempts". Repeated requests with the same attributes on the same day add rows to the same campaign in batches.

## The Compatibility registries tab

![The Compatibility registries tab](https://mintcdn.com/hubtalk/imXtUGq2OJsLMMCI/images/v4_adapter_registry_list_en.png?fit=max\&auto=format\&n=imXtUGq2OJsLMMCI\&q=85\&s=1e6505b9ab3c1fbf41776117d201f584)

1. Account selection: "login · system · organization".
2. Account status.
3. **Add script**. For an archived organization the button is disabled.
4. Summary: the number of scripts and the account's dialing defaults.
5. V4 agent with status: version, **hidden**, **archived**, **not published**, **no agent**.
6. Dialing binding: **Auto by the agent** or "trunk · subgroup · number".
7. Pencil — edit, trash can — delete with confirmation.

The script list of the selected account shows the script, V4 agent, classification, dialing binding, number of fields and retry rules.

If there are no accounts yet, the tab shows **Create an account first**. If the account has no scripts, it shows the hint "The name of a new script is written exactly as in the `data[].type` field of the request of the client" and the **Add script** button.

> [!WARNING]
>
> **Agent status in the column: a blocker or not?**
>
> * **hidden** — fine: hiding controls the agent's visibility in the cabinet; it does not switch the agent off.
> * **archived**, **not published**, **no agent** — client requests with this script get an error on the `type` field. Point the script at an active published agent.
>
> While the account is active, its scripts protect their agents from archiving and deletion.

## The Script and agent tab

The **Add script** button opens the **New registry script** window with four tabs: **Script and agent**, **Fields and variables**, **Retry rules**, **Routing**. The summary, the refusal text and the buttons are always visible at the bottom of the window.

![New registry script, the Script and agent tab](https://mintcdn.com/hubtalk/imXtUGq2OJsLMMCI/images/v4_adapter_registry_script_new_en.png?fit=max\&auto=format\&n=imXtUGq2OJsLMMCI\&q=85\&s=d34bc08cdc5a30996cb1ee31942f0910)

1. Script name — exactly as in `data[].type`; case matters.
2. V4 agent — only published agents of the account organization.
3. Classification — the purpose of dialing; required.
4. Short-call threshold for the V2 report; empty means 15 seconds.
5. Dialing binding: **Auto by the agent** or **Explicit**.
6. Summary: what the agent gets, rules, binding.
7. **Add script** is disabled while something is not filled in; its hint says what exactly.

**1. Script name**

Exactly as in the `data[].type` field of the request. Case matters: `Soft_Script` and `soft_script` are different scripts. Up to 100 characters. Leading and trailing spaces are kept as is, and the cabinet warns about it: the client's requests must then arrive with the same spaces. The name is unique within the account.

**2. V4 agent**

The list opens on top of the window. At the top is the **Similar to the script name** group — up to five agents matched by name; below is **All agents of the organization**. Only published agents of the account organization fit; hidden ones fit too. After you select one, the field shows: "Published version vN. The variable map is checked against it; a new publication of the agent does not re-check the script."

**3. Classification**

**Marketing**, **Servicing** or **Debt collection**. Required: it determines the consent tier under which the campaign launch attestation is signed.

**4. Short-call threshold in reports, s**

From 1 to 300; empty means 15, as in V2. The [`details`](https://docs.hubtalk.ai/v4/compat-adapter/details) export counts a conversation shorter than the threshold as "hung up". It does not affect dialing.

**5. Dialing binding**

See [the next section](#dialing-binding). **Auto by the agent** is usually enough if the agent has exactly one subgroup in the organization.

![Agent selection](https://mintcdn.com/hubtalk/imXtUGq2OJsLMMCI/images/v4_adapter_registry_agent_picker_en.png?fit=max\&auto=format\&n=imXtUGq2OJsLMMCI\&q=85\&s=fd1e5713e29e303dda2c5114cb5916bc)

The agent list opens on top of the window: **Similar to the script name** at the top, all agents of the organization below. A list row reads "name · vN · hidden".

## Dialing binding

The binding defines which SIP trunk, which subgroup and which number the calls of this script's campaigns go through. For trunks and subgroups, see [Telephony](https://docs.hubtalk.ai/v4/platform/telephony.md).

* **Auto by the agent** — the agent's only subgroup in the organization is used. The cabinet shows the result right away:
  * "The core takes the only subgroup of the agent — …" — all is well;
  * "The agent has no subgroups in the account organization: the core will not be able to launch a campaign";
  * "The agent is bound to N subgroups … Set the binding explicitly".
* **Explicit** — three fields: **SIP trunk**, **Subgroup** (only those the agent is bound to) and **Caller ID** (**By subgroup policy** or a specific number from its pool). Changing the trunk resets the subgroup and number.

![Explicit dialing binding](https://mintcdn.com/hubtalk/imXtUGq2OJsLMMCI/images/v4_adapter_registry_binding_en.png?fit=max\&auto=format\&n=imXtUGq2OJsLMMCI\&q=85\&s=8e93d428c8b6677294299f4a266d51f2)

1. The **Auto by the agent** / **Explicit** switch.
2. Organization SIP trunk.
3. Subgroup — only those bound to the agent.
4. Caller ID from the subgroup pool or by its policy.
5. The summary shows the binding kind: **auto, unambiguous**, **auto, ambiguous**, **auto, no subgroups**, **explicit, …**.

> [!WARNING]
>
> **An ambiguous binding is the most common refusal on the first request.** If the agent has several subgroups and the binding is **Auto by the agent**, the script is saved, but the client's very first `create` gets "Internal error, try again later": the campaign is created and immediately cancelled. Watch the summary at the bottom of the window: "binding: auto, ambiguous" means the binding has to be set explicitly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.