graph api fix
This commit is contained in:
parent
248acba741
commit
6810f392cc
2 changed files with 22 additions and 18 deletions
|
|
@ -229,21 +229,21 @@ Authorization: Bearer urmi_live_<your_api_key>
|
|||
| **Slug** | `agent_run_completion` |
|
||||
| **Meta template name** | `agent_run_completion` |
|
||||
| **Header** | Agent Run Complete |
|
||||
| **Body** | Hello {{1}}, your agent run is complete… |
|
||||
| **Body** | Hello {{customer_name}}, your agent run is complete… |
|
||||
| **Button** | View Report → `https://urmiai.com/reports/{{1}}` |
|
||||
|
||||
The Meta template uses **positional** variables (not named):
|
||||
| Component | Meta format | API field | Example |
|
||||
|-----------|-------------|-----------|---------|
|
||||
| Body | **Named** `customer_name` | `customer_name` | `Team Desi Clans` |
|
||||
| Button URL | Positional `{{1}}` suffix | `report_group`/`report_id` | `desi-clans-test/2026-10-03` |
|
||||
|
||||
| Variable | Maps to API field | Example |
|
||||
|----------|-------------------|---------|
|
||||
| `{{1}}` (body) | `customer_name` | `Suyash` |
|
||||
| `{{1}}` (button) | `report_group`/`report_id` path suffix | `desi-clans-test/2026-10-03` |
|
||||
|
||||
Urmi sends the button suffix `desi-clans-test/2026-10-03` so the final link is:
|
||||
Urmi sends the button suffix so the final link should be:
|
||||
|
||||
`https://urmiai.com/reports/desi-clans-test/2026-10-03`
|
||||
|
||||
> **Common bug:** If body parameters are sent as named (`parameter_name`) instead of positional, Meta leaves `{{1}}` literal in the URL, producing broken links like `https://urmiai.com/reports/%7B%7B1%7D%7Ddesi-clans-test/2026-10-03`.
|
||||
> **400 Invalid parameter:** Body must use named `parameter_name: "customer_name"` — positional body params fail on this template.
|
||||
>
|
||||
> **Broken button URL:** If the approved Meta template button URL contains a literal `{{1}}` prefix (e.g. `https://urmiai.com/reports/{{1}}{{1}}`), fix it in WhatsApp Manager → Message templates → edit button URL to `https://urmiai.com/reports/{{1}}` only.
|
||||
|
||||
### Example
|
||||
|
||||
|
|
@ -256,7 +256,8 @@ curl -X POST 'https://urmiai.com/api/v1/agent/messages/send' \
|
|||
"to": "919149154337",
|
||||
"customer_name": "Suyash",
|
||||
"report_group": "desi-clans-test",
|
||||
"report_id": "desi-clans-demo-v1"
|
||||
"report_id": "2026-10-03",
|
||||
"report_url": "https://urmiai.com/reports/desi-clans-test/2026-10-03"
|
||||
}'
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue