QuickBooks

Create QuickBooks Invoice

Creates an invoice with one line for an existing customer.

Unverified

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

Create an invoice in QuickBooks Online for an existing customer. Get a QuickBooks access token first if you do not already have one. You need the customer Id and the Id of the product or service item. Confirm the description and amount with the customer first. The invoice is not emailed. It returns the invoice including its DocNumber, which you can tell the customer.

Request

POSThttps://quickbooks.api.intuit.com/v3/company/YOUR_QUICKBOOKS_REALM_ID/invoice?minorversion=75

Headers

  • Content-Typeapplication/json
  • AuthorizationBearer {{accessToken}}
  • Acceptapplication/json

Body

{"CustomerRef":{"value":"{{customerId}}"},"Line":[{"DetailType":"SalesItemLineDetail","Amount":{{amount}},"Description":"{{description}}","SalesItemLineDetail":{"ItemRef":{"value":"{{itemId}}"}}}]}

Parameters

  • customerId stringThe QuickBooks customer Id.
  • itemId stringThe Id of the product or service item being sold.
  • description stringWhat the line is for.
  • amount numberThe line total as a number, without a currency symbol.
  • 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": "28fc313f-ff12-4cb9-94c9-dc3000f4c4c6",
    "type": "HTTP_REQUEST",
    "label": "Create QuickBooks Invoice",
    "name": "create_quickbooks_invoice",
    "customName": false,
    "description": "Create an invoice in QuickBooks Online for an existing customer. Get a QuickBooks access token first if you do not already have one. You need the customer Id and the Id of the product or service item. Confirm the description and amount with the customer first. The invoice is not emailed. It returns the invoice including its DocNumber, which you can tell the customer.",
    "parameters": [
      {
        "name": "customerId",
        "type": "string",
        "description": "The QuickBooks customer Id."
      },
      {
        "name": "itemId",
        "type": "string",
        "description": "The Id of the product or service item being sold."
      },
      {
        "name": "description",
        "type": "string",
        "description": "What the line is for."
      },
      {
        "name": "amount",
        "type": "number",
        "description": "The line total as a number, without a currency symbol."
      },
      {
        "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": "POST",
        "url": "https://quickbooks.api.intuit.com/v3/company/YOUR_QUICKBOOKS_REALM_ID/invoice?minorversion=75"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Authorization",
          "value": "Bearer {{accessToken}}"
        },
        {
          "name": "Accept",
          "value": "application/json"
        }
      ],
      "body": "{\n  \"CustomerRef\": {\n    \"value\": \"{{customerId}}\"\n  },\n  \"Line\": [\n    {\n      \"DetailType\": \"SalesItemLineDetail\",\n      \"Amount\": {{amount}},\n      \"Description\": \"{{description}}\",\n      \"SalesItemLineDetail\": {\n        \"ItemRef\": {\n          \"value\": \"{{itemId}}\"\n        }\n      }\n    }\n  ]\n}",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.