Xero

Create Xero Contact

Adds a new contact to Xero.

Unverified

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

Create a new contact in Xero. Get a Xero access token first if you do not already have one. Confirm the name and email with the customer first, and check Get Xero Contact by Email so you do not create a duplicate. It returns the ContactID, which you need to create an invoice.

Request

PUThttps://api.xero.com/api.xro/2.0/Contacts

Headers

  • Content-Typeapplication/json
  • AuthorizationBearer {{accessToken}}
  • xero-tenant-idYOUR_XERO_TENANT_ID
  • Acceptapplication/json

Body

{
  "Name": "{{name}}",
  "EmailAddress": "{{email}}"
}

Parameters

  • name stringThe contact's full or business name.
  • email stringThe contact's email address.
  • 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": "18817158-e1d8-4927-90b1-f39ef81bde6b",
    "type": "HTTP_REQUEST",
    "label": "Create Xero Contact",
    "name": "create_xero_contact",
    "customName": false,
    "description": "Create a new contact in Xero. Get a Xero access token first if you do not already have one. Confirm the name and email with the customer first, and check Get Xero Contact by Email so you do not create a duplicate. It returns the ContactID, which you need to create an invoice.",
    "parameters": [
      {
        "name": "name",
        "type": "string",
        "description": "The contact's full or business name."
      },
      {
        "name": "email",
        "type": "string",
        "description": "The contact's email address."
      },
      {
        "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": "PUT",
        "url": "https://api.xero.com/api.xro/2.0/Contacts"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Authorization",
          "value": "Bearer {{accessToken}}"
        },
        {
          "name": "xero-tenant-id",
          "value": "YOUR_XERO_TENANT_ID"
        },
        {
          "name": "Accept",
          "value": "application/json"
        }
      ],
      "body": "{\n  \"Name\": \"{{name}}\",\n  \"EmailAddress\": \"{{email}}\"\n}",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.