# Coordination: who holds the customer now, and one effect per business fact | Niadra

> Before acting, the agent asks: who holds the customer, among agents, people and systems; what was already done; whether it may contact them now. A business fact causes one effect, the suppression list holds for every vendor, and an outbound message only leaves with a token your gateway checks without talking to Niadra.

URL: https://niadra.com/en/produtos/coordenacao

Coordination

# Who holds the customer now, among agents, people and systems, and the most restrictive wins.

Your company’s customer is served by agents from several vendors, by people in panels no agent sees and by routines that call nobody. Each of them can contact the same person, act on the same object or repeat what another already did. The memory knows who holds the customer, by declaration and by observation, what already went out and what was already done, and answers before the agent acts: now, wait, no, or hand it to whoever holds them. A business fact causes one effect: the first check reserves the key, and every later check with the same key hears it is done. Your company is the one that sends and the one that bars: the decision becomes a token your gateway checks without talking to Niadra, and the suppression list is the floor every vendor honors.

[Talk to us](/en/enterprise)[Read the docs(opens docs.niadra.com)](https://docs.niadra.com/en/concepts/coordination)

## How it works

### Before acting, the agent asks

example

Who asksWhat it wants to doAnswer

-   Voice agent · vendor B farewell · service · key farewell:call-5521 now Effect reserved. Declare how it ended.
-   WhatsApp agent · vendor A farewell · the same key, 2:09 pm no Effect already done by the voice agent.
-   Billing agent · internal bill reminder · collection · outbound · WhatsApp wait The customer is with the voice agent until 2:22 pm: ownership observed in the contact center’s panel.
-   Offers agent · vendor C offer · marketing · outbound · WhatsApp no The customer asked not to receive marketing on this channel. Suppression list.

Niadra answers and records the decision. Your agent is the one that sends; your gateway is the one that bars a message without a token.

-   Ownership by declaration and by observation: a service panel that opened a human session counts, even when nobody asked. The most restrictive wins
-   Four answers: now, wait until a given time, no for this purpose, or hand it to whoever holds them. A message the customer sent is never denied
-   An ambiguous effect is never sent again on its own: an attempt whose outcome nobody knows stays as it is until a person or the system of record says what happened
-   A contact budget per purpose, added up over every agent and vendor, and the channel window: outside it, only an approved template; in quiet hours, the contact waits
-   An outbound message only leaves with a token your gateway checks without talking to Niadra: an Ed25519 signature, two minutes of life, single use
-   The suppression list holds for every vendor, with keys only someone who already knows the phone or the email can match, and each source applies its own copy, read every 60 seconds
-   Each level is useful on its own: shadow, suppression, check and declare, dispatch with a token. Where the dispatch point is a third party’s that checks no token, the coverage is shadow plus suppression

One farewell per conversation, whichever agent tries it first

```
from niadra import Niadra, phone

def farewell_once(conversation, send):
    key = f"farewell:{conversation.id}"
    decision = conversation.check(
        "farewell", purpose="service", effect_key=key
    )
    if decision.decision != "allow":
        # already said by another agent, or the customer is held
        return False
    send("Thanks for reaching out! Anything else, just call.")
    conversation.declare.effect(key, "done")
    return True

niadra = Niadra(channel="whatsapp")
customer = phone(customer_phone)
with niadra.conversation(
    thread_id, subject=customer, agent_id="closing"
) as conversation, conversation.turn():
    farewell_once(conversation, conversation.agent)

# the suppression list, applied from the local copy
niadra.may_contact(customer, "marketing", channel="whatsapp")
```

-   Python
-   TypeScript

From the SDK’s examples/coordination.py: the first check reserves the effect, the agent sends and declares, and the suppression list is applied from the local copy.

### In the documentation

-   [Coordination(opens docs.niadra.com)](https://docs.niadra.com/en/concepts/coordination)
-   [Gateways and the contact token(opens docs.niadra.com)](https://docs.niadra.com/en/guides/gateways)
-   [Asking before acting, in the API reference(opens docs.niadra.com)](https://docs.niadra.com/en/api/coordination-check)
-   [Signals and constraints: what the customer wants and refuses(opens docs.niadra.com)](https://docs.niadra.com/en/concepts/signals)

## One memory, thirteen products

Connect

What goes into the memory

-   [SystemsThe events your systems already emit, tied to the right customer.](/en/produtos/sistemas)

SDK, API and MCP

Any agent connects to the memory with three calls, in Python, TypeScript, HTTP or MCP, with a ready-made adapter for the most used voice and agent frameworks.

[See the documentation(opens docs.niadra.com)](https://docs.niadra.com/en)

Remember

What the memory knows

-   [MemoryWhat was said and done, with a date, a source and evidence.](/en/produtos/memoria)
-   [IdentityPeople, companies and partners, recognized on any channel.](/en/produtos/identidade)
-   [PatternsWhat each customer repeats, computed from the history and delivered to every agent.](/en/produtos/padroes)
-   [StateWhat holds now for each customer, with the age and the source of every value.](/en/produtos/estado)

Deliver

What each agent receives

-   [ContextWhat each agent needs to know before it starts.](/en/produtos/contexto)
-   [HistoryEverything that ever happened, for the agent to search.](/en/produtos/historico)
-   [AlertsA signed webhook to your system the moment something happens.](/en/produtos/avisos)
-   [ClaimsWhat the agent may state, and the check of what it stated, with no extra model.](/en/produtos/afirmacao)
-   CoordinationYou are hereWho holds the customer now and what was already done, before an agent acts.

Govern

What your team controls

-   [MeasurementWhether each agent used the context it received.](/en/produtos/medicao)
-   [Turn recordWhy the agent did what it did, turn by turn, and the replay in your CI.](/en/produtos/registro)
-   [ConsoleWho read what, review, export and erasure.](/en/produtos/console)
