Recordatorio de cita médica
Medical appointment reminder
El agente de la clínica manda un SMS 24 h antes de la cita. Si el paciente responde, AMI dispara un webhook y el agente confirma, reagenda o cancela en su CRM.
The clinic agent sends an SMS 24 h before the appointment. When the patient replies, AMI fires a webhook and the agent confirms, reschedules or cancels in its CRM.
Tools
Tools
ami.send_smswebhook: sms.inbound
Snippet
Snippet
from ami import AMI
ami = AMI(api_key="ami_live_...")
ami.send_sms(
to="+34911234567",
body="Hola Marta, tu cita es mañana 10:00. Responde OK, R para reagendar.",
)
# El webhook sms.inbound entrega la respuesta al agente.
Salida esperada
Expected output
Respuesta esperada: {"id":"sms_01H...","status":"queued"}. Cuando el paciente contesta, llega un POST sms.inbound con el cuerpo.
Expected response: {"id":"sms_01H...","status":"queued"}. When the patient replies, a POST sms.inbound is delivered with the body.
Cobros amistosos escalables
Friendly collections, escalated
Al vencer una factura, el agente empieza por un SMS suave. Si no hay respuesta en 48 h, escala a una llamada de voz bridgeada a un motor de voz en tiempo real con tono empático.
When an invoice is overdue, the agent starts with a gentle SMS. If there is no reply in 48 h, it escalates to a voice call bridged to a real-time voice engine with an empathetic tone.
Tools
Tools
ami.send_smsami.place_call
Snippet
Snippet
from ami import AMI
ami = AMI(api_key="ami_live_...")
ami.send_sms(to=customer, body="Recordatorio: tu factura #A-1042 vence hoy.")
# 48 h después, si sigue sin pagar:
ami.place_call(
to=customer,
callback_sip_uri="sip:collections@voice.acme.ai",
)
Salida esperada
Expected output
El SDK devuelve un call_id. Cuando el cliente descuelga, AMI bridgea la llamada al motor de voz indicado en callback_sip_uri.
The SDK returns a call_id. When the customer picks up, AMI bridges the call to the voice engine at callback_sip_uri.
Recepción por voz 24/7
24/7 voice reception
Cualquier llamada entrante al número del agente se enruta directamente a un motor de voz en tiempo real que actúa de recepcionista: transfiere a humano o toma mensaje.
Any inbound call to the agent's number is routed straight to a real-time voice engine that acts as the receptionist: transfers to a human or takes a message.
Tools
Tools
ami.set_inbound_sip_uriwebhook: call.inbound
Snippet
Snippet
from ami import AMI
ami = AMI(api_key="ami_live_...")
# Una sola vez al provisionar el número:
ami.set_inbound_sip_uri(
mid="mid_01H...",
sip_uri="sip:reception@voice.acme.ai",
)
# A partir de ahora todas las llamadas entrantes
# se entregan al motor de voz vía SIP.
Salida esperada
Expected output
Cada llamada entrante dispara un webhook call.inbound con el caller, timestamp y SIP session id para auditoría.
Every inbound call fires a call.inbound webhook with the caller, timestamp and SIP session id for audit.
◓
Retail / SaaS
Retail / SaaS
Encuesta NPS post-venta
Post-purchase NPS survey
Tres días después de la compra, el agente envía un SMS con una sola pregunta. La respuesta vuelve por webhook sms.inbound y se almacena en el panel del cliente.
Three days after the purchase, the agent sends a one-question SMS. The reply comes back via sms.inbound webhook and is stored in the customer panel.
Tools
Tools
ami.send_smswebhook: sms.inbound
Snippet
Snippet
from ami import AMI
ami = AMI(api_key="ami_live_...")
ami.send_sms(
to=customer.phone,
body=(
"Del 0 al 10, ¿qué tan probable es que recomiendes Acme?\n"
"Responde con un número."
),
)
Salida esperada
Expected output
El webhook sms.inbound entrega la respuesta. Un parser local extrae el dígito y lo guarda contra el order_id.
The sms.inbound webhook delivers the reply. A local parser extracts the digit and stores it against the order_id.
◈
Seguridad / Identity
Security / Identity
2FA entre agentes
Agent-to-agent 2FA
Un servicio envía un código de verificación al número del agente. El agente lo recibe vía webhook, lo parsea y lo presenta en su flujo. Útil para verificación entre agentes.
A service sends a verification code to the agent's number. The agent receives it via webhook, parses it and presents it in its flow. Useful for agent-to-agent verification.
Tools
Tools
webhook: sms.inboundlocal parsing
Snippet
Snippet
import re
def on_sms_inbound(event):
body = event["sms"]["body"]
match = re.search(r"\b(\d{6})\b", body)
if not match:
return
code = match.group(1)
agent.present_otp(code) # entrega al flujo que lo pidió
Salida esperada
Expected output
El handler corre dentro del worker del agente. El código queda firmado por AMI en el evento y queda auditado.
The handler runs inside the agent worker. The code is signed by AMI in the event and remains auditable.
◑
Logística / E-commerce
Logistics / E-commerce
Confirmación de delivery
Delivery confirmation
Cuando el repartidor está a 15 min, el agente avisa por SMS con un link de tracking. Si el cliente responde 'delay', el agente revisa el historial y propone una nueva ventana.
When the courier is 15 min away, the agent sends an SMS with a tracking link. If the customer replies 'delay', the agent reviews the history and proposes a new window.
Tools
Tools
ami.send_smswebhook: sms.inboundami.list_sms
Snippet
Snippet
from ami import AMI
ami = AMI(api_key="ami_live_...")
ami.send_sms(
to=order.phone,
body=f"Tu pedido llega en ~15 min. Track: {order.tracking_url}",
)
# Si responde "delay", recuperamos el hilo completo:
history = ami.list_sms(peer=order.phone, limit=20)
Salida esperada
Expected output
list_sms devuelve el hilo bidireccional ordenado por timestamp, listo para que el agente razone sobre el contexto del cliente.
list_sms returns the bidirectional thread sorted by timestamp, ready for the agent to reason over customer context.