The Claude Agent · Run it
Jobs and event jobs
What it answers and what it starts.
Pro
Jobs say what an agent is for. Each job is a switch on the agent’s Jobs tab: a job that is on adds its own instructions and unlocks the tools it needs. The preset you started from switched on the usual ones. There are three kinds, in three groups on the tab.
When a customer writes
These run on incoming WhatsApp messages.
- Answer questions — Customer support and FAQs from your knowledge and website.
- Sell and qualify leads — Understand what the customer needs, recommend, and capture lead details.
- Take orders — Take the whole order in the chat: basket, details, delivery, payment, confirmation.
- Order status — “Where is my order?”, pay links, address changes, returns and problems.
- Bookings — Explain services, check the customer’s appointments, take booking requests.
- Follow-ups — Keeps its promises: “I’ll check and get back to you tomorrow” — and does.
- Rating after a chat — When a conversation is resolved, asks for a one-tap rating and tags the contact with it.
- After-hours reply — Outside business hours, tell people when you are back and take a message.
- Owner assistant — When you (an owner number) message the agent: stats, approvals, drafting website posts.
Every preset switches on Answer questions and Owner assistant; switch on the others you need. Follow-ups are scheduled only when the agent promised to get back to someone or the customer asked for a reminder; if the customer writes first, the follow-up is cancelled. Rating after a chat is told to ask at most once per conversation, and never after a hand-off or a complaint.
When something happens: event jobs
Event jobs are started by your website, n8n or the API. The agent writes one message to the person on that event — the customer on the order, the person who filled in the form — never someone it picks. It uses only the facts the event carries.
- Order updates — When an order changes status on the website, tell the customer.
Started by:order.status_changed, order.paid, order.created, order.shipped - Payment reminder — Remind customers of an unpaid order with its payment link.
Started by:order.created - Cash-on-delivery confirmation — Check each new cash-on-delivery order with the customer before it ships; confirm or cancel it from their answer.
Started by:order.created (only when the event names this job and the order is cash on delivery) - Booking reminders — Remind customers of upcoming appointments.
Started by:booking.reminder, booking.created - Form follow-up — Follow up website form submissions on WhatsApp (people who left their number).
Started by:form.submitted - Review request — After a completed order, ask for a review.
Started by:order.status_changed - Cart recovery — Gently remind opted-in customers about an abandoned cart.
Started by:cart.abandoned - Back-in-stock alerts — Tell customers who asked when a sold-out product is back.
Started by:stock.back_in - Custom event job — Any other event your website or automations send.
Started by:any type, when the event names this job
Where events come from
- Your WordPress site — the free plugin sends the events you set to Agent task on its Events tab: new orders, status changes, bookings, form entries and any plugin’s own actions. Its Setup sets the events a recipe needs, only where they are still off. See Connect a WordPress site.
- n8n — the SocialMate node’s Agent resource. See the n8n docs.
- Your own code —
POST /v1/agents/{id}/events:
curl -X POST http://localhost:3456/v1/agents/AGENT_ID/events \
-H "x-api-key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{
"type": "order.shipped",
"idempotencyKey": "wc-order-1042-shipped",
"recipient": { "phone": "+1 555 123 0001", "name": "Jane" },
"data": { "orderNumber": "1042", "courier": "DHL", "trackingUrl": "https://track.example.com/JD0142" }
}'
The type picks the matching job the agent has switched on; job names one directly. instruction (up to 1,000 characters) tells the agent what to do for this event in your words, and audience: "owner" sends the message to one of the agent’s owner numbers instead of a customer. 202 means queued; 200 with skipped or duplicate means nothing will be sent, with a reason. Every field is in the API reference.
Consent and frequency
- Order updates, payment reminders, booking reminders and cash-on-delivery confirmations are about the customer’s own order or booking and need no opt-in.
- Every other job needs a recorded opt-in, or a
consentobject on the event with its source. Cart recovery, review requests and back-in-stock alerts need a real marketing opt-in — consent tied to one order is not enough. - At most 2 messages per job per contact in 12 hours. Owner notifications are not capped.
- A contact who opted out, a chat handed to a person and a chat you paused are left alone: the event is skipped. Groups are never messaged by an event.
When the number is not ready: retries
Event jobs are stored, so a restart loses nothing. If a job cannot run right now — the WhatsApp number is disconnected, the anti-ban limits are pausing sends, or a person is active in that chat — it is tried again every 15 minutes, up to 3 attempts, and then skipped. Other refusals (agent paused, budget used up, no consent) skip it at once. A job that fails, or was interrupted and never finished, fires the agent.job_failed webhook.
On a schedule
Owner daily brief — every morning the agent sends each owner number a short summary: yesterday’s and today’s conversations, open hand-offs, approvals waiting, orders to ship or payments to check when a store is connected, and anything unusual. It goes out once a day at your business-hours opening time (or 08:30 without business hours) in the agent’s time zone, and never more than three hours late, so switching it on at night does not send a “morning” brief. It needs at least one owner number.
Fewer jobs, better answers. Each job adds instructions the model reads on every turn. Switch on only what this number really does.