Add this first. This tool needs an access token, so add Get QuickBooks Access Token to the same bot. The bot calls it first and passes the token in.
What the model is told
Look up a QuickBooks invoice by its invoice number (DocNumber). Get a QuickBooks access token first if you do not already have one. Use it when a customer asks about an invoice. Report the total (TotalAmt), the balance still due (Balance) and the due date (DueDate). A balance of 0 means it is paid. The result is in QueryResponse.Invoice. If the QueryResponse is empty, say you could not find the invoice.
Request
GEThttps://quickbooks.api.intuit.com/v3/company/YOUR_QUICKBOOKS_REALM_ID/query?query=select%20Id%2C%20DocNumber%2C%20TxnDate%2C%20DueDate%2C%20TotalAmt%2C%20Balance%20from%20Invoice%20where%20DocNumber%20%3D%20'{{invoiceNumber}}'%20maxresults%201&minorversion=75
Headers
AuthorizationBearer {{accessToken}}Acceptapplication/json
Parameters
invoiceNumber stringThe invoice number to look up.accessToken stringThe access_token value returned by Get QuickBooks Access Token. Reuse it for the rest of the conversation.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "12935674-fa49-4f13-84cf-8a33eb223424",
"type": "HTTP_REQUEST",
"label": "Get QuickBooks Invoice by Number",
"name": "get_quickbooks_invoice_by_number",
"customName": false,
"description": "Look up a QuickBooks invoice by its invoice number (DocNumber). Get a QuickBooks access token first if you do not already have one. Use it when a customer asks about an invoice. Report the total (TotalAmt), the balance still due (Balance) and the due date (DueDate). A balance of 0 means it is paid. The result is in QueryResponse.Invoice. If the QueryResponse is empty, say you could not find the invoice.",
"parameters": [
{
"name": "invoiceNumber",
"type": "string",
"description": "The invoice number to look up."
},
{
"name": "accessToken",
"type": "string",
"description": "The access_token value returned by Get QuickBooks Access Token. Reuse it for the rest of the conversation."
}
],
"config": {
"endpoint": {
"method": "GET",
"url": "https://quickbooks.api.intuit.com/v3/company/YOUR_QUICKBOOKS_REALM_ID/query?query=select%20Id%2C%20DocNumber%2C%20TxnDate%2C%20DueDate%2C%20TotalAmt%2C%20Balance%20from%20Invoice%20where%20DocNumber%20%3D%20'{{invoiceNumber}}'%20maxresults%201&minorversion=75"
},
"headers": [
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
},
{
"name": "Accept",
"value": "application/json"
}
],
"body": null,
"timeout": null
}
}
}IDs are regenerated on every copy.