Add this first. This tool needs an access token, so add Get Xero Access Token to the same bot. The bot calls it first and passes the token in.
What the model is told
Look up a Xero invoice by its invoice number, such as INV-0001. Get a Xero access token first if you do not already have one. Use it when a customer asks about the status of an invoice. Report the status (DRAFT, SUBMITTED, AUTHORISED, PAID or VOIDED), the total and the amount due. If the Invoices list is empty, say you could not find that invoice. Never read out contact details.
Request
GEThttps://api.xero.com/api.xro/2.0/Invoices?InvoiceNumbers={{invoiceNumber}}&summaryOnly=true
Headers
AuthorizationBearer {{accessToken}}xero-tenant-idYOUR_XERO_TENANT_IDAcceptapplication/json
Parameters
invoiceNumber stringThe invoice number to look up.accessToken stringThe access_token value returned by Get Xero Access Token. Reuse it for the rest of the conversation.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "b5ef1d05-a864-4741-a6a6-6a233c4a4a93",
"type": "HTTP_REQUEST",
"label": "Get Xero Invoice by Number",
"name": "get_xero_invoice_by_number",
"customName": false,
"description": "Look up a Xero invoice by its invoice number, such as INV-0001. Get a Xero access token first if you do not already have one. Use it when a customer asks about the status of an invoice. Report the status (DRAFT, SUBMITTED, AUTHORISED, PAID or VOIDED), the total and the amount due. If the Invoices list is empty, say you could not find that invoice. Never read out contact details.",
"parameters": [
{
"name": "invoiceNumber",
"type": "string",
"description": "The invoice number to look up."
},
{
"name": "accessToken",
"type": "string",
"description": "The access_token value returned by Get Xero Access Token. Reuse it for the rest of the conversation."
}
],
"config": {
"endpoint": {
"method": "GET",
"url": "https://api.xero.com/api.xro/2.0/Invoices?InvoiceNumbers={{invoiceNumber}}&summaryOnly=true"
},
"headers": [
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
},
{
"name": "xero-tenant-id",
"value": "YOUR_XERO_TENANT_ID"
},
{
"name": "Accept",
"value": "application/json"
}
],
"body": null,
"timeout": null
}
}
}IDs are regenerated on every copy.