Skip to main content

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.

Single API Call Action

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​

FieldDescription
ConnectWise ConnectionSelect 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.

FieldDescription
Company Type IDFilter by type ID
Company Type NameFilter by type name

Pagination​

FieldDescription
Page SizeNumber of results per page (1-1000). Default: 25.
PagePage number to retrieve. Default: 1.
Return all resultsWhen enabled, returns an array of all matching companies. When disabled, returns only the first company.

Error Handling​

FieldDescription
If no results are returnedSelect what the workflow should do when the requested page contains no companies. Default: Continue.
If more than one result is returnedSelect what the workflow should do when the requested page contains more than one company. Default: Continue.
Error HandlingAction to take if the query fails (Exception, Continue, Stop, Stop All).

The action counts companies on the requested page before applying the output settings. These result-count options apply whether Return all results is enabled or disabled.

Each selector shows only the choices available in the current workflow context. Choices can include Continue processing, Stop current rule, Stop all rules, Generate an exception and stop processing, Bounce email to sender for email workflows, and Exit macro for macros.

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​

PropertyTypeDescription
idnumberCompany ID
identifierstringCompany identifier (short code)
namestringCompany name
statusobjectStatus info (id, name)
addressLine1stringAddress line 1
addressLine2stringAddress line 2
citystringCity
statestringState/province
zipstringZip/postal code
countryobjectCountry info
phoneNumberstringPrimary phone
faxNumberstringFax number
websitestringWebsite URL
territoryobjectTerritory info
marketobjectMarket info
accountNumberstringAccount number
defaultContactobjectDefault contact info
dateAcquiredstringAcquisition date
annualRevenuenumberAnnual revenue
numberOfEmployeesnumberEmployee count
leadFlagbooleanWhether this is a lead
deletedFlagbooleanWhether company is deleted
typesarrayCompany types
customFieldsarrayCustom field values

Example Use Cases​

Find Company by Domain​

Look up a company by website:

SettingValue
Conditionwebsite contains {{email.from.domain}}
Return all resultsDisabled

Find Company by Name​

Search for a specific company:

SettingValue
Conditionname equals {{custom.companyName}}
Return all resultsDisabled

Find Active Customers​

Get all active customer companies:

SettingValue
Conditionsstatus/name equals "Active" AND leadFlag equals false AND deletedFlag equals false
Return all resultsEnabled

Check if Company Exists​

Before creating a company:

SettingValue
Conditionidentifier equals {{custom.proposedIdentifier}}
Return all resultsDisabled

Find Companies by Type​

Get all companies of a specific type:

SettingValue
Company Type Conditionname equals "Managed Services"
Return all resultsEnabled

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.