Query ConnectWise Companies
The Query ConnectWise Companies action searches for companies in ConnectWise Manage. This is a low-level API action that makes a single API call, returning companies 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 company by name, identifier, or domain
- You want to look up company details for use in subsequent actions
- You need to verify a company exists before associating a ticket
- You're building custom company 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, Identifier, Company Name, Status, Account Number
Contact:
- Phone Number, Fax Number, Website, Default Contact
Address:
- Address Line 1, Address Line 2, City, State, Zip Code, Country
Business Details:
- Territory, Market, Annual Revenue, Number of Employees, Year Established, SIC Code
Billing:
- Billing Terms, Billing Contact, Invoice Delivery Method, Invoice Email Address
Flags:
- Deleted, Is Lead, Unsubscribed, Is Vendor
Dates:
- Date Acquired, Date Deleted
Relationships:
- Parent Company
Social Media:
- Facebook URL, LinkedIn URL, Twitter URL
Company Type Filters
Filter by company type. Companies can have multiple types assigned.
| Field | Description |
|---|---|
| Company Type ID | Filter by type ID |
| Company Type Name | Filter by type name |
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 companies. When disabled, returns only the first company. |
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 company object.
When "Return all results" is enabled: Returns an array of company objects.
Company Object Properties
| Property | Type | Description |
|---|---|---|
id | number | Company ID |
identifier | string | Company identifier (short code) |
name | string | Company name |
status | object | Status info (id, name) |
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 |
phoneNumber | string | Primary phone |
faxNumber | string | Fax number |
website | string | Website URL |
territory | object | Territory info |
market | object | Market info |
accountNumber | string | Account number |
defaultContact | object | Default contact info |
dateAcquired | string | Acquisition date |
annualRevenue | number | Annual revenue |
numberOfEmployees | number | Employee count |
leadFlag | boolean | Whether this is a lead |
deletedFlag | boolean | Whether company is deleted |
types | array | Company types |
customFields | array | Custom field values |
Example Use Cases
Find Company by Domain
Look up a company by website:
| Setting | Value |
|---|---|
| Condition | website contains {{email.from.domain}} |
| Return all results | Disabled |
Find Company by Name
Search for a specific company:
| Setting | Value |
|---|---|
| Condition | name equals {{custom.companyName}} |
| Return all results | Disabled |
Find Active Customers
Get all active customer companies:
| Setting | Value |
|---|---|
| Conditions | status/name equals "Active" AND leadFlag equals false AND deletedFlag equals false |
| Return all results | Enabled |
Check if Company Exists
Before creating a company:
| Setting | Value |
|---|---|
| Condition | identifier equals {{custom.proposedIdentifier}} |
| Return all results | Disabled |
Find Companies by Type
Get all companies of a specific type:
| Setting | Value |
|---|---|
| Company Type Condition | name equals "Managed Services" |
| Return all results | Enabled |
FAQs
How do I find a company by email domain?
Use the website field with a "contains" operator and the domain from the email address: website contains {{email.from.domain}}.
What's the difference between ID and Identifier?
- ID: Numeric database ID (e.g., 123)
- Identifier: Short text code (e.g., "ACME")
How do I filter by multiple company types?
Use OR conditions in the Company Type Filters section to match any of several types.
Can I search by custom fields?
Yes. Custom fields appear in the query builder and can be used in conditions.
Related Actions
- Query ConnectWise Contacts: Find contacts at a company
- Query ConnectWise Tickets: Find tickets for a company
- Create ConnectWise Ticket: Create tickets for a company