Square icon

Square

Consume Square API

Customer → Search

AI-generated

Overview

This node operation allows searching for customers in the Square system based on specified search fields such as email address, phone number, and reference ID. It supports returning all matching results or limiting the number of results returned. This is useful for scenarios where you need to find specific customers or filter customers based on contact details or identifiers.

Use Case Examples

  1. Search for customers by email address to find all customers with a specific email.
  2. Search for customers by phone number to retrieve customer details associated with that number.
  3. Search for customers by reference ID to locate customers linked to a particular external system or identifier.

Properties

Name Meaning
Return All Whether to return all matching customer results or only up to a specified limit.
Limit Maximum number of customer results to return when 'Return All' is false.
Search Fields Fields to filter the customer search by, including email address, phone number, and reference ID.

Output

JSON

  • id - Unique identifier of the customer.
  • given_name - Customer's given (first) name.
  • family_name - Customer's family (last) name.
  • email_address - Customer's email address.
  • phone_number - Customer's phone number.
  • reference_id - Reference ID associated with the customer.
  • created_at - Timestamp when the customer was created.
  • updated_at - Timestamp when the customer was last updated.

Dependencies

  • Square API authentication token

Troubleshooting

  • If the search query is malformed or contains invalid JSON, the node will throw an error indicating the issue with the search query format.
  • If the API returns an error (e.g., due to invalid credentials or network issues), the node will throw an error unless 'Continue On Fail' is enabled, in which case it will output the error message as part of the execution data.
  • Ensure that at least one search field is provided; otherwise, the search may return no results or an error depending on the API behavior.

Discussion