Query ConnectWise Contacts
The Query ConnectWise Contacts action searches for contacts in ConnectWise Manage. This is a low-level API action that makes a single API call, returning contacts that match your query conditions.
This is a single API call action. You define the query conditions and the action makes one API call to retrieve the results. Learn more about the difference between workflow actions and single API call actions.
When to Use This Action
Use this action when:
- You need to find a contact by email address
- You want to look up contact details for a company
- You need to verify a contact exists before associating with a ticket
- You're building custom contact lookup logic
Configuration
Connection
| Field | Description |
|---|---|
| ConnectWise Connection | Select the ConnectWise connection to use. |
Query Conditions
Use the query builder to create filter conditions. Available fields include:
Basic Info:
- ID, First Name, Last Name, Nickname, Title, Gender
Company:
- Company ID, Company Identifier, Company Name, Site ID, Site Name, Department
Communication:
- Default Phone, Phone Extension, Default Phone Type
Address:
- Address Line 1, Address Line 2, City, State, Zip Code, Country
Relationships:
- Relationship, Manager Contact, Assistant Contact
Flags:
- Inactive, Is Default Contact, Is Default Billing, Unsubscribed, Portal Login Disabled
Social Media:
- Facebook URL, LinkedIn URL, Twitter URL
Communication & Type Filters
Filter by email, phone, or contact type. These conditions apply to the same communication item, allowing you to search for specific email addresses or phone numbers.
| Field | Description |
|---|---|
| Email/Phone/Fax Value | The communication value to match |
| Communication Type | Type of communication (Email, Phone, Fax) |
| Is Default Communication | Whether this is the default communication method |
| Contact Type | The contact's type classification |
Pagination
| Field | Description |
|---|---|
| Page Size | Number of results per page (1-1000). Default: 25. |
| Page | Page number to retrieve. Default: 1. |
| Return all results | When enabled, returns an array of all matching contacts. When disabled, returns only the first contact. |
Error Handling
| Field | Description |
|---|---|
| Error Handling | Action to take if the query fails (Exception, Continue, Stop, Stop All). |
Returned Variables
When you configure Store the results in Variable:
When "Return all results" is disabled: Returns a single contact object.
When "Return all results" is enabled: Returns an array of contact objects.
Contact Object Properties
| Property | Type | Description |
|---|---|---|
id | number | Contact ID |
firstName | string | First name |
lastName | string | Last name |
company | object | Company info (id, identifier, name) |
site | object | Site info |
title | string | Job title |
department | object | Department info |
addressLine1 | string | Address line 1 |
addressLine2 | string | Address line 2 |
city | string | City |
state | string | State/province |
zip | string | Zip/postal code |
country | object | Country info |
relationship | object | Relationship type |
inactiveFlag | boolean | Whether contact is inactive |
defaultFlag | boolean | Whether this is the default contact |
communicationItems | array | Email, phone, and fax entries |
types | array | Contact types |
customFields | array | Custom field values |
Communication Items Structure
Each item in communicationItems:
| Property | Type | Description |
|---|---|---|
type | object | Communication type (id, name) |
value | string | Email address, phone number, or fax number |
defaultFlag | boolean | Whether this is the default for its type |
Example Use Cases
Find Contact by Email
Look up a contact by their email address:
| Setting | Value |
|---|---|
| Communication Filter | value equals {{email.from.address}} |
| Return all results | Disabled |
Find All Contacts at Company
Get all contacts for a specific company:
| Setting | Value |
|---|---|
| Condition | company/id equals {{custom.company.id}} |
| Return all results | Enabled |
Find Active Contacts
Get non-inactive contacts:
| Setting | Value |
|---|---|
| Condition | inactiveFlag equals false |
| Return all results | Enabled |
Check if Contact Exists
Before creating a contact:
| Setting | Value |
|---|---|
| Communication Filter | value equals {{email.from.address}} |
| Return all results | Disabled |
Then check if the result is empty.
Find Default Contact for Company
Get the primary contact:
| Setting | Value |
|---|---|
| Conditions | company/id equals {{custom.company.id}} AND defaultFlag equals true |
| Return all results | Disabled |
FAQs
How do I search by email address?
Use the Communication & Type Filters section:
- Set "value" to the email address
- Optionally set "Communication Type" to "Email" to be more specific
Why use Communication Filters instead of Query Conditions?
Communication items (emails, phones) are stored in a nested array. The Communication Filters ensure you're matching the value and type on the same communication item, not across different items.
How do I get a contact's email address from the results?
Loop through communicationItems to find items where type.name equals "Email":
{{custom.contact.communicationItems[0].value}}
Or use conditional logic to find the default email.
Can I search by custom fields?
Yes. Custom fields appear in the query builder.
Related Actions
- Query ConnectWise Companies: Find the contact's company
- Query ConnectWise Tickets: Find tickets for a contact
- Create ConnectWise Ticket: Create tickets with contact association