Connect Your Agent to APIs and Real-Time Data
Connectors allow your agent to call external APIs to access real-time data from your systems:
Result: The agent responds with up-to-date information from your real systems.
Customer: "What's the status of my order #12345?"
Agent: "I'll check your order. Orders take 3-5 days."
Customer: "What's the status of my order #12345?"
[Agent calls your inventory API]
Agent: "Your order #12345 shipped today from the warehouse.
It will arrive tomorrow between 2-5 PM. Tracking: TR123456789"
Every Connector needs 4 parts:
Your API domain:
https://api.yourcompany.com
How your API validates requests:
Option 1: API Key
Header: Authorization: Bearer sk_live_abc123def456
Option 2: OAuth
Requires login. Meta handles the flow automatically.
Option 3: Basic Auth
Header: Authorization: Basic base64(user:password)
The actions the agent can perform:
GET /orders/{order_id} → Get order status
GET /customers/{email} → Get customer data
POST /tickets → Create support ticket
GET /inventory → Check stockThe data the agent sends to each endpoint:
GET /orders/{order_id}
Parameters:
- order_id (required) → Order ID
- format (optional) → json/xmlConnector: Inventory + Orders
Endpoints:
Benefit: Customer gets real answer in 2 seconds with no intermediaries.
Connector: CRM + Account Data
Endpoints:
Benefit: Tech support without manual access to systems.
Connector: Calendar + CRM
Endpoints:
Benefit: Agent schedules appointments without human intervention.
In WOZTELL:
Channels
→ Your channel
→ Meta AI Agent
→ Scroll down
→ "Advanced"
→ "Connectors"
https://api.yourcompany.com
API Key (Recommended for simple APIs)
Type: API Key
Location: Header (Bearer)
Key: sk_live_abc123def456
OAuth (For complex systems like Salesforce)
Requires OAuth credentials already in your API
WOZTELL handles the flow automatically
Basic Auth
Username: your_user
Password: your_password
Click "Add Tool" for each endpoint the agent can use:
Example:
Tool 1: Get Order Status
Method: GET
Path: /orders/{order_id}
Parameters:
- order_id (string, required)
Tool 2: Get Product Stock
Method: GET
Path: /products/{sku}/stock
Parameters:
- sku (string, required)
WOZTELL should let you make a test call:
GET /orders/123
Response: {
"order_id": "123",
"status": "shipped",
"tracking": "TR123456789"
}
The Connector appears in the list. Now Skills can use it.
Once the Connector is configured, Skills can access it:
Name: "Check Order Status"
When to use it:
"When customer asks about their order status or tracking"
What the agent should do:
"1. Ask for the order ID if not provided
2. Call the Connector: GET /orders/{order_id}
3. Respond with status and tracking number
4. If shipped, mention estimated delivery date"
Meta Business Agent automatically:
| Method | What It Does | Example |
|---|---|---|
| GET | Read data | GET /orders/123 → get status |
| POST | Create new data | POST /tickets → create ticket |
| PUT | Update existing data | PUT /customers/123 → update profile |
| DELETE | Delete data | DELETE /bookings/456 → cancel appointment |
API Base:
https://your-store.myshopify.com/admin/api/2023-04
Authentication:
API Key in header:
Authorization: Bearer your_access_token
Tools:
1. GET /products/{id}.json
→ Get product details
2. GET /orders/{id}.json
→ Get order status
3. POST /fulfillments/{order_id}.json
→ Update shipping statusAPI Base:
https://www.googleapis.com/calendar/v3
Authentication:
OAuth (Google provides access token)
Tools:
1. GET /calendars/{calendar_id}/events
→ Get today's events
2. POST /calendars/{calendar_id}/events
→ Create event/appointmentAPI Base:
https://your-domain.zendesk.com/api/v2
Authentication:
Basic Auth:
User: your_email@example.com
Password: your_api_token
Tools:
1. GET /users/search?email={email}
→ Search customer
2. POST /tickets
→ Create ticket
3. GET /tickets/{id}
→ Get ticket detailsYour API may have limits (e.g., 100 calls/minute). Monitor:
API calls take time. If your API takes >5 seconds:
Never share credentials in chat or documents:
The agent might expose data that shouldn't be public:
Bad: "Your balance is $5,000 and your SSN is 123-45-6789"
Good: "Your balance is $5,000. Need changes? Contact support?"
| Problem | Cause | Solution |
|---|---|---|
| "Connector doesn't respond" | Your API is down | Verify your server is online |
| "Error 401 Unauthorized" | API Key / Auth incorrect | Verify credentials in WOZTELL |
| "Timeout (>5 seconds)" | Your API is slow | Optimize queries or use cache |
| "Response malformed" | API returns wrong format | Verify it returns valid JSON |