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 a new customer in QuickBooks Online. Get a QuickBooks access token first if you do not already have one. Confirm the name, email and phone with the customer first. Display names must be unique, so an error about a duplicate name means the customer may already exist. It returns the customer Id, which you need to create an invoice.
Request
POSThttps://quickbooks.api.intuit.com/v3/company/YOUR_QUICKBOOKS_REALM_ID/customer?minorversion=75
Headers
Content-Typeapplication/jsonAuthorizationBearer {{accessToken}}Acceptapplication/json
Body
{
"DisplayName": "{{displayName}}",
"GivenName": "{{givenName}}",
"FamilyName": "{{familyName}}",
"PrimaryEmailAddr": {
"Address": "{{email}}"
},
"PrimaryPhone": {
"FreeFormNumber": "{{phone}}"
}
}Parameters
displayName stringThe name shown in QuickBooks. Must be unique.givenName stringThe customer's first name.familyName stringThe customer's last name.email stringThe customer's email address.phone stringThe customer's phone number.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": "0fabaf1a-950b-4850-b621-3d787e71ed95",
"type": "HTTP_REQUEST",
"label": "Create QuickBooks Customer",
"name": "create_quickbooks_customer",
"customName": false,
"description": "Create a new customer in QuickBooks Online. Get a QuickBooks access token first if you do not already have one. Confirm the name, email and phone with the customer first. Display names must be unique, so an error about a duplicate name means the customer may already exist. It returns the customer Id, which you need to create an invoice.",
"parameters": [
{
"name": "displayName",
"type": "string",
"description": "The name shown in QuickBooks. Must be unique."
},
{
"name": "givenName",
"type": "string",
"description": "The customer's first name."
},
{
"name": "familyName",
"type": "string",
"description": "The customer's last name."
},
{
"name": "email",
"type": "string",
"description": "The customer's email address."
},
{
"name": "phone",
"type": "string",
"description": "The customer's phone number."
},
{
"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/customer?minorversion=75"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer {{accessToken}}"
},
{
"name": "Accept",
"value": "application/json"
}
],
"body": "{\n \"DisplayName\": \"{{displayName}}\",\n \"GivenName\": \"{{givenName}}\",\n \"FamilyName\": \"{{familyName}}\",\n \"PrimaryEmailAddr\": {\n \"Address\": \"{{email}}\"\n },\n \"PrimaryPhone\": {\n \"FreeFormNumber\": \"{{phone}}\"\n }\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.