Overview
This node, "Search Core Companies," allows users to search for companies within the EnlightenedMSP platform using various filters and sorting options. It is useful in scenarios where you need to retrieve company data based on specific criteria such as company name, ticket level, hourly rate, billing status, activity status, or other attributes. For example, you might want to find all active companies with a default hourly rate greater than a certain amount or companies whose names contain a particular substring.
The node supports pagination and field selection, enabling efficient retrieval of large datasets and control over the returned data structure.
Properties
| Name | Meaning |
|---|---|
| Name Filter | Filter companies by their name. Operations: Equals, Not Equals, Contains, Not Contains. |
| Default Ticket Level Filter | Filter companies by their default ticket level. Operations: Equals, Not Equals, Contains, Not Contains. |
| Default Hourly Rate Filter | Filter companies by their default hourly rate. Operations: Equals, Greater Than, Less Than. |
| Billing Configured | Boolean indicating whether billing is configured for the company. |
| Active | Boolean indicating whether the company is active. |
| Is Own Company | Boolean indicating whether this is our own company. |
| Autotask Company ID | Numeric filter for the Autotask company ID. |
| Sort By | Field to sort results by. Options: Name, Default Hourly Rate, ID. |
| Sort Order | Sort order for results. Options: Ascending, Descending. |
| Page | Page number for pagination (integer). |
| Limit | Number of results per page (integer). |
| Fields | String listing fields to return in the response, separated by newlines. Default includes id, name, defaultTicketLevel, defaultHourlyRate, billingConfigured, active, isOwnCompany, autotaskCompanyId. |
Output
The node outputs two main items:
- Output (main output):
companies: An array of company objects matching the search criteria.totalCount: Total number of companies matching the filters.page: Current page number.limit: Number of results per page.
Each company object contains the fields specified in the "Fields" property.
- Tool (secondary output):
- This output is present but not detailed in the provided code; it may be used internally or for AI tool integration.
No binary data is output by this node.
Dependencies
- Requires an API key credential for accessing the EnlightenedMSP GraphQL endpoint.
- The node uses a bundled GraphQL client (
SearchCoreCompaniesGraphql) to perform queries. - Proper configuration of the API endpoint and authentication credentials in n8n is necessary.
Troubleshooting
- Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect filter values or operations may result in no data returned.
- Pagination parameters out of range could lead to empty results.
- Error messages:
- Errors from the API are caught and can be output if "Continue On Fail" is enabled.
- Typical errors include network issues, invalid query parameters, or permission errors.
- Resolution tips:
- Verify API credentials and endpoint configuration.
- Check filter syntax and ensure values match expected types.
- Adjust pagination settings to valid ranges.
Links and References
- EnlightenedMSP Documentation (primary documentation link provided in node metadata)