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

# Retry rules, saving and editing

> Script retry rules, routing, saving and refusals, editing and deleting a script, and a checklist before handing over to the client.

# Retry rules, saving and editing

## The Retry rules tab

![The Retry rules tab](https://mintcdn.com/hubtalk/imXtUGq2OJsLMMCI/images/v4_adapter_registry_retry_rules_en.png?fit=max\&auto=format\&n=imXtUGq2OJsLMMCI\&q=85\&s=89589682ed128a1a2fbd116fcfde0d74)

1. **Take from a preset**: **Default**, **Aggressive**, **Conservative** or organization presets.
2. **Copy the rules into the script** — this is a copy: later edits to the preset do not change the script.
3. The rule editor is the same as for campaigns: condition → action, order from top to bottom.

* The rules are **one set for all campaigns of this script**. The number of attempts and the interval come in the request (`try`, hours and minutes) or are taken from the account defaults, and the rules decide which outcomes to call back.
* Besides the usual status conditions, there are four conversation conditions needed for V2 likeness: **Caller hung up**, **No speech**, **Too short**, **Silence (auto-end)**. The hints under them explain how such a call behaved in V2.
* **Dial failed** — the V2 redial on the `failed` status: the dial gave no connection and telephony reported no precise reason. V2 redialed such a number; to make the script do the same, add the rule **Dial failed** → **Redial after a delay** or **Redial on the next pass**. The dial attempt is spent.
* A rule without **Times** fires once; more than 30 is not possible. If the agent has no success criterion, the **Goal not achieved** rule never fires — the cabinet notes this. For success criteria, see [Goals](https://docs.hubtalk.ai/v4/platform/agent-settings/goals.md).

## The Routing tab

![The Routing tab](https://mintcdn.com/hubtalk/imXtUGq2OJsLMMCI/images/v4_adapter_registry_routing_en.png?fit=max\&auto=format\&n=imXtUGq2OJsLMMCI\&q=85\&s=e370e12d9eda8f850db8b909c9a6a1bf)

1. Placeholder: routing rules will come with the rule builder; a registry script always goes to its agent.

Routing cannot be edited from the cabinet yet. Routing scripts (without an agent, with "by number history" rules) are a separate future improvement.

## Saving and refusals

The **Add script** / **Save** button is disabled while something is not filled in. Its hint names the first obstacle in this order:

1. script name;
2. agent;
3. classification;
4. explicit binding not finished;
5. field error;
6. agent variable not selected;
7. signature variable without a value;
8. rule error.

The summary at the bottom shows coverage: "The agent gets X variables of Y: A from the fields and B from the adapter core" and the list of fields that are not passed.

A server refusal is shown at the bottom of the window, and at the same time the window switches to the relevant tab and highlights the field:

| Refusal | Where it takes you | What to do |
| - | - | - |
| The script name must not be empty… | Script and agent → name | Fix the name. |
| The account already has a script with this name | Script and agent → name | Open the existing script instead of a new one. |
| The agent is not found in the organization of the account or is archived / The agent has never been published | Script and agent → agent | Publish the agent or select another one. |
| Select a classification for a script with an agent | Script and agent → classification | Set the purpose of dialing. |
| The dialing binding is not among the trunk subgroups available to the organization… | Script and agent → binding | Select a trunk and a subgroup the agent is bound to. |
| Schema field N is invalid: … | Fields → row N | Fix the form, limits or values. |
| The field … is reserved by the platform | Fields → row | Rename the field or the entry target. |
| The field … maps to the variable …, which the published agent does not use | Fields → row | Select an existing variable or publish the agent with this variable. |
| The variable … is set by the platform during the call | Fields → all entries with this target | Select another variable. |
| The agent signature variable … gets no value from the script | Fields → left panel | Point a field at it or add a field with this name with the **＋ field** button. |
| The fallback value of … is invalid | Fields → row | The fallback must fit the field form: length, character set, up to 1000 characters. |
| Retry rule N is invalid | Rules → rule N | Fix the condition or action. |

> [!WARNING]
>
> **A new publication of the agent does not recheck the script.** The variable map is checked against the agent's published version at the moment the script is saved. If the agent is later republished with a new signature variable, the script stays saved, but campaigns based on it stop launching, and the client gets "Internal error, try again later".
>
> After each publication of an agent used in the registry, open the script and save it again: the summary shows what has changed.

## Editing and deleting a script

* The pencil in a row opens the same window titled **Script \<name>**. All tabs are editable; changing the agent rechecks the variable map.
* If the agent is deleted, archived or not published, the cabinet shows a mark and the warning "The script will not save until it points at a live published agent."
* To delete, use the trash can in the row or the **Delete the script** button at the bottom of the window, with confirmation. After deletion, client requests with this script name are no longer accepted. Campaigns already created are not affected.

![Script delete confirmation](https://mintcdn.com/hubtalk/imXtUGq2OJsLMMCI/images/v4_adapter_registry_script_delete_en.png?fit=max\&auto=format\&n=imXtUGq2OJsLMMCI\&q=85\&s=cce2d1148f8d1e72f32d48c0b2913116)

## Checklist before handing over to the client

> [!TIP]
>
> 1. The account is active, and the password has been given to the client.
> 2. For each script name in the client's requests, there is a registry row with a published agent and a classification.
> 3. The field schema matches the real request row: no extra or missing keys.
> 4. The summary shows "binding: auto, unambiguous" or an explicit binding.
> 5. No signature variable of the agent is "without a value".
> 6. A test `create` with one row to your own number goes through, the campaign is visible in the organization cabinet, the call took place, and the agent spoke the variables.


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