From xero
Searches Xero for contacts (customers/suppliers) by name, email, or account number, with optional type and status filters.
How this command is triggered — by the user, by Claude, or both
Slash command
/xero:search-contacts <query> [type] [status]Files this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Search Xero Contacts Find a contact (customer or supplier) in Xero by name, email, or account number. ## Prerequisites - Valid Xero OAuth2 credentials configured (`XERO_CLIENT_ID`, `XERO_CLIENT_SECRET`) - Xero tenant ID configured (`XERO_TENANT_ID`) - OAuth scope `accounting.contacts` or `accounting.contacts.read` granted ## Steps 1. **Authenticate with Xero** 2. **Build search query** - Determine if query is a name, email, or account number - Construct the appropriate where clause 3. **Execute search** 4. **Apply additional filters** - Filter by type (cust...
Find a contact (customer or supplier) in Xero by name, email, or account number.
XERO_CLIENT_ID, XERO_CLIENT_SECRET)XERO_TENANT_ID)accounting.contacts or accounting.contacts.read grantedAuthenticate with Xero
ACCESS_TOKEN=$(curl -s -X POST https://identity.xero.com/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "${XERO_CLIENT_ID}:${XERO_CLIENT_SECRET}" \
-d "grant_type=client_credentials&scope=accounting.contacts.read" \
| jq -r '.access_token')
Build search query
# Search by name (default)
WHERE="Name.Contains(%22${QUERY}%22)"
# Search by email
WHERE="EmailAddress==%22${QUERY}%22"
# Search by account number
WHERE="AccountNumber==%22${QUERY}%22"
Execute search
curl -s -X GET "https://api.xero.com/api.xro/2.0/Contacts?where=${WHERE}&order=Name%20ASC" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "xero-tenant-id: ${XERO_TENANT_ID}" \
-H "Accept: application/json"
Apply additional filters
Format and return results
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| query | string | Yes | - | Search term (name, email, or account number) |
| type | string | No | all | Filter: customer, supplier, or all |
| status | string | No | active | Filter: active, archived, or all |
/search-contacts "Acme"
/search-contacts "[email protected]"
/search-contacts "ACME001"
/search-contacts "Corp" --type customer
/search-contacts "Old Client" --status all
/search-contacts "Microsoft" --type supplier
Found 1 contact matching "Acme Corp"
Contact: Acme Corp
================================================================
Contact ID: abc12345-6789-0abc-def0-123456789abc
Account Number: ACME001
Contact Number: MSP-001
Email: [email protected]
Status: ACTIVE
Type: Customer
Address (Street):
123 Main Street
Springfield, IL 62704
US
Phone: (217) 555-0123
Financial Summary:
Outstanding AR: $2,500.00
Overdue AR: $0.00
Quick Actions:
- Create invoice: /create-invoice "Acme Corp" --description "..." --amount ...
- Payment status: /payment-status "Acme Corp"
- View in Xero: https://go.xero.com/Contacts/...
================================================================
Found 3 contacts matching "Acme"
+------------------------+------------+--------+----------+-------------+-----------+
| Name | Account # | Status | Type | Outstanding | Overdue |
+------------------------+------------+--------+----------+-------------+-----------+
| Acme Corp | ACME001 | Active | Customer | $2,500.00 | $0.00 |
| Acme East Division | ACME002 | Active | Customer | $1,200.00 | $1,200.00 |
| Acme Supplies Inc | - | Active | Supplier | $450.00 | $0.00 |
+------------------------+------------+--------+----------+-------------+-----------+
Select a contact:
/search-contacts "Acme Corp"
/search-contacts "ACME001"
No contacts found matching "Xyz Company"
Suggestions:
- Check spelling of the name
- Try a partial match: /search-contacts "Xyz"
- Search all statuses: /search-contacts "Xyz" --status all
- Search by email: /search-contacts "[email protected]"
Create a new contact in Xero if this is a new client.
Found 1 contact matching "Old Client" (archived)
Contact: Old Client Inc (ARCHIVED)
================================================================
Contact ID: def12345-6789-0abc-def0-123456789abc
Account Number: OLD001
Status: ARCHIVED
Type: Customer
Financial Summary:
Outstanding AR: $0.00
WARNING: This contact is archived. Reactivate in Xero before
creating new invoices.
================================================================
# Name contains
curl -s -X GET "https://api.xero.com/api.xro/2.0/Contacts?where=Name.Contains(%22Acme%22)" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "xero-tenant-id: ${XERO_TENANT_ID}" \
-H "Accept: application/json"
# Name starts with
curl -s -X GET "https://api.xero.com/api.xro/2.0/Contacts?where=Name.StartsWith(%22Acme%22)" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "xero-tenant-id: ${XERO_TENANT_ID}" \
-H "Accept: application/json"
# Exact name match
curl -s -X GET "https://api.xero.com/api.xro/2.0/Contacts?where=Name==%22Acme%20Corp%22" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "xero-tenant-id: ${XERO_TENANT_ID}" \
-H "Accept: application/json"
# Active customers with outstanding balance
curl -s -X GET "https://api.xero.com/api.xro/2.0/Contacts?where=ContactStatus==%22ACTIVE%22&&IsCustomer==true" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "xero-tenant-id: ${XERO_TENANT_ID}" \
-H "Accept: application/json"
# Recently modified contacts
curl -s -X GET "https://api.xero.com/api.xro/2.0/Contacts" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "xero-tenant-id: ${XERO_TENANT_ID}" \
-H "If-Modified-Since: 2026-02-01T00:00:00" \
-H "Accept: application/json"
Error: OAuth2 token request failed
Possible causes:
- Invalid XERO_CLIENT_ID or XERO_CLIENT_SECRET
- Custom Connection not authorized
Resolution:
- Verify credentials in Xero Developer Portal
- Re-authorize the Custom Connection
Error: Rate limit exceeded (429)
Resolution:
- Wait 60 seconds and retry
- Reduce request frequency
Error: Invalid filter expression
Possible causes:
- Special characters in search query not URL-encoded
- Invalid operator in where clause
Resolution:
- URL-encode the where parameter value
- Use valid operators: ==, !=, .Contains(), .StartsWith()
Before creating an invoice, verify the contact exists:
/search-contacts "Acme Corp"
/create-invoice "Acme Corp" --description "Managed Services - March 2026" --amount 2500.00
Review all MSP clients and their outstanding balances:
/search-contacts "" --type customer
Find a vendor before recording a bill payment:
/search-contacts "Microsoft" --type supplier
Look up a client using the account number from your PSA:
/search-contacts "ACME001"
/create-invoice - Create an invoice for a found contact/payment-status - Check outstanding balances for a contact/reconciliation-summary - Verify billing completenessnpx claudepluginhub wyre-technology/msp-claude-plugins --plugin xero/search-customersSearches QuickBooks Online customers by name with optional filters for status (active/inactive/all) and positive balance. Returns customer details including contact info and balance.
/lookup-contactSearches Autotask for contacts by name, email, phone, or company, with optional filters for company ID, active status, and result limit. Returns contact details and supports quick actions for ticket creation.
/search-contactsSearches HubSpot CRM contacts by name, email, or company. Returns matching contacts with key details and supports filtering by field and lifecycle stage.
/search-contactsSearches Salesbuildr contacts by name or email, optionally filtered by company. Displays results with company association.
/search-customersSearches Atera customers by name or domain, with optional contact lists and agent online/offline summaries.
/list-customersLists all customers under your Sherweb service provider account with optional search, status filter, and accounts receivable data.