Skip to content

Make Searches

This document describes how to use the WhiteLabelCRO Integration API search operations in Make scenarios.

How Searches Work

In Make, searches are implemented using HTTP modules that query the Integration API to find existing records. They enable the "Find or Create" pattern for deduplication and record linking.

Available Searches (2)

Find Client

Locate an existing client in WhiteLabelCRO.

Endpoint: GET /api/v1/integrations/clients/search

Search Criteria (at least one required as query parameter): - email - Client email address - phone - Client phone number - client_id - WhiteLabelCRO client ID - external_id - External system ID

Response Fields: - client_id - Unique client identifier - first_name, last_name, full_name - Client name - email, phone - Contact information - status, status_id, status_name - Current status - employee_id, employee_name - Assigned employee - affiliate_id, affiliate_name - Referring affiliate - created_utc - Enrollment date

Find Lead

Locate an existing lead in WhiteLabelCRO.

Endpoint: GET /api/v1/integrations/leads/search

Search Criteria (at least one required as query parameter): - email - Lead email address - phone - Lead phone number - client_id - WhiteLabelCRO client ID - external_id - External system ID

Response Fields: - client_id - Unique lead identifier - first_name, last_name, full_name - Lead name - email, phone - Contact information - status, status_id, status_name - Current status (Lead% pattern) - employee_id, employee_name - Assigned employee - affiliate_id, affiliate_name - Referring affiliate - created_utc - Capture date

Note: Find Lead only returns records with status matching 'Lead%' pattern. Converted clients are excluded.

Implementing Searches in Make

Basic Setup

  1. Add HTTP module to your scenario
  2. Set Method: GET
  3. Set URL: Full endpoint URL
  4. Add Query String parameters for search criteria
  5. Set Connection: Select your WhiteLabelCRO connection

Example: Find Client by Email

URL: https://your-api-url.com/api/v1/integrations/clients/search

Query String:

email={{email}}

Or add individual parameters: - Name: email - Value: {{email}}

Example: Find Client by External ID

Query String:

external_id=hubspot_{{id}}

Multiple Search Criteria

Add multiple query parameters to search with AND logic:

Query String:

email={{email}}&phone={{phone}}

All criteria must match for a result.

Search Behavior

  • Exact match only (no partial matching)
  • Case-insensitive for email
  • Returns the first matching record
  • Returns empty array if no match found

Find or Create Pattern

Implement the "Find or Create" pattern in Make:

  1. Add HTTP module (GET) to search for record
  2. Add Router module with two routes:
  3. Route 1 (Found): Filter checks if result exists
  4. Route 2 (Not Found): Filter checks if result is empty
  5. Route 1: Use existing data
  6. Route 2: Add HTTP module (POST) to create record

Filter for "Found" route: - Condition: Length of array > 0

Filter for "Not Found" route: - Condition: Length of array = 0

This pattern is essential for: - Lead capture from multiple sources - Syncing records from external CRMs - Preventing duplicate data entry

Empty Results

When no record is found: - Search returns an empty array [] - Use Filter to detect empty results - Route to "create" branch - Handle with default values or skip processing

Handling Search Results

Accessing First Result

Search returns an array. Access first result using array notation:

{{1.client_id}}
{{1.email}}
{{1.full_name}}

(Make uses 1-based indexing)

Checking for Results

Use Router with filters: - Check if array length > 0 - Check if specific field exists

Handling Multiple Matches

The API returns only the first matching record. If multiple records might match: - Use more specific criteria (email + phone) - Use external_id for guaranteed uniqueness - Review your data for duplicates if unexpected matches occur

Rate Limits

Searches count toward the "read" rate limit bucket: - 60 requests per minute per API key - Shared across all read operations (event polling, searches)

Monitor rate limit headers in responses.

Error Handling

Common Errors

400 Bad Request - No search criteria provided - Invalid parameter format

401 Unauthorized - Invalid or expired API key

404 Not Found - Endpoint URL incorrect

429 Too Many Requests - Rate limit exceeded - Wait and retry per Retry-After header

Handling in Make

  1. Add Error handler route to HTTP module
  2. Use Router to handle different error types
  3. Route errors to logging modules
  4. Implement retry logic for rate limits

Troubleshooting

Search Not Finding Records

  1. Verify the search value matches exactly (check for typos, spaces)
  2. Confirm the record exists in WhiteLabelCRO
  3. For Find Lead, ensure the status matches 'Lead%' pattern
  4. Check that your API key has integrations:read scope
  5. Test search with known values in WhiteLabelCRO

Wrong Record Found

  1. Use more specific search criteria
  2. Verify external_id mapping is correct
  3. Check for duplicate records in WhiteLabelCRO
  4. Add additional query parameters to narrow results

Search Returns Empty When Record Exists

  1. Check for whitespace or special characters in search value
  2. Verify email case (should be case-insensitive but test both)
  3. Confirm external_id format matches exactly
  4. Check if record was deleted or status changed (for Find Lead)

Best Practices

Use External ID for Linking

When syncing with external systems, always use external_id: - Format: hubspot_{{id}} - Store the external ID when creating records - Enable reliable lookups later

Prefer Email for Person Searches

Email is the most reliable criterion for finding clients/leads: - Less likely to have typos than phone - Unique per person in most systems - Case-insensitive matching

Implement Caching

For scenarios that search frequently: 1. Cache search results in data store 2. Reduce redundant API calls 3. Respect rate limits

Test with Edge Cases

Test search logic with: - Non-existent records - Multiple matches - Special characters in email/phone - Null or empty search values

Platform Compatibility

These same searches are available via: - Zapier - Using native app searches - n8n - Using HTTP Request nodes - Custom code - Direct API calls

All platforms use the same endpoints and return the same fields.