# Order Status Agent

- **URL:** https://agentline.cloud/build/order-status
- **Category:** Support
- **Keywords:** AI order status SMS, where is my order AI agent, AI SMS agent, inbound support agent, SMS for AI agents

> Callers and inbound texts ask where the order is — agent answers

High-volume status line. A customer calls or texts an order ID; the agent looks it up in your system and speaks or stores the answer. No phone tree.

## How it works

1. Publish the number on receipts and the help center.
2. Inbound voice or sms.received includes the order ID.
3. Your webhook or relay looks up the order and pushes a short answer.
4. The caller hears it, or you reply on the next inbound text.

## Greeting

Need an order update? Give me the order number.

## System prompt

```
You are an order-status agent. Keep every spoken turn under 15 words.

Rules:
- Ask for the order ID if missing.
- Never invent shipping status. If lookup fails, say so and offer a human.
- Read status, carrier, and ETA only from the injected context.
- For inbound SMS, extract the order ID from the text.
- Outbound SMS is not available — if they texted you, wait for the next inbound or call them.
```

## Python

```python
from agentline import AgentLine

client = AgentLine(api_key="al_live_...")

agent = client.agents.create(
    name="Order Status Agent",
    voice_id="female-1",
    initial_greeting="Need an order update? Give me the order number.",
    system_prompt="""You are an order-status agent. Keep turns under 15 words.
Never invent shipping status. Use only injected lookup context.""",
)

number = client.numbers.buy(agent_id=agent.id, country="US", area_code="415")
print("Customers call or text:", number)

# On call.utterance, look up the order then:
# client.calls.push_context(call_id, turn_id=turn_id, context="Order 1842 shipped yesterday via UPS, ETA Thursday.")
```

## Node.js

```ts
import AgentLine from "agentline";

const client = new AgentLine({ apiKey: "al_live_..." });

const agent = await client.agents.create({
  name: "Order Status Agent",
  voiceId: "female-1",
  initialGreeting: "Need an order update? Give me the order number.",
  systemPrompt: `You are an order-status agent. Keep turns under 15 words.
Never invent shipping status. Use only injected lookup context.`,
});

const number = await client.numbers.buy({
  agentId: agent.id,
  country: "US",
  areaCode: "415",
});
console.log("Customers call or text:", number);
```

## Tell your AI

```
Create an order-status phone and inbound-SMS agent on AgentLine. Follow https://agentline.cloud/skill.md then apply https://agentline.cloud/build/order-status.md
```

## FAQ

**Can customers text an order ID to an AI agent?**

Yes. Inbound SMS arrives as sms.received. The agent extracts the ID and looks it up. Outbound SMS is not enabled, so spoken replies or a follow-up inbound text are the response paths.

**How does the agent know the real status?**

Your code looks it up. On a live call, push one or two sentences via the call context endpoint so the caller hears the actual ETA — never a hallucinated one.

**Will this cut support ticket volume?**

Ecommerce teams using a status line like this typically see a large drop in 'where's my order' tickets because there is no hold time or phone tree.
