> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.square.core.FindCustomers

- Component: `appmixer.square.core.FindCustomers`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.square 1.1.1](https://connectors.appmixer.com/connector/appmixer.square/1.1.1.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.square/1.1.1/component/appmixer.square.core.FindCustomers>

Search and retrieve customer profiles.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Email Address (`emailAddress`) | text | Filter customers by email address (fuzzy search - partial matches allowed) |
| Phone Number (`phoneNumber`) | text | Filter customers by phone number (fuzzy search - partial matches allowed) |
| Created After (`createdAtFrom`) | date-time | Find customers created after this date (ISO 8601 format) |
| Created Before (`createdAtTo`) | date-time | Find customers created before this date (ISO 8601 format) |
| Updated After (`updatedAtFrom`) | date-time | Find customers updated after this date (ISO 8601 format) |
| Updated Before (`updatedAtTo`) | date-time | Find customers updated before this date (ISO 8601 format) |
| Creation Source (`creationSource`) | select | Filter by creation source(s) |
| Group IDs (`groupIds`) | multiselect | Filter by customer group IDs |
| Sort Field (`sortField`) | select | Field to sort results by |
| Sort Order (`sortOrder`) | select | Sort order |
| Limit (`limit`) | number | Maximum number of results to return (1-100, default 100) |
| Output Type (`outputType`) | select | Choose how to receive the results |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/square/core/FindCustomers?outPort=out`.

### Port `notFound`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.square.core.FindCustomers",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Search and retrieve customer profiles.",
  "version": "1.0.0",
  "private": false,
  "auth": {
    "service": "appmixer:square"
  },
  "quota": {
    "manager": "appmixer:square",
    "resources": "requests"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "createdAtFrom": {
            "type": "string"
          },
          "createdAtTo": {
            "type": "string"
          },
          "updatedAtFrom": {
            "type": "string"
          },
          "updatedAtTo": {
            "type": "string"
          },
          "creationSource": {
            "type": [
              "array",
              "string"
            ]
          },
          "groupIds": {
            "type": [
              "array",
              "string"
            ]
          },
          "sortField": {
            "type": "string"
          },
          "sortOrder": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "outputType": {
            "type": "string"
          }
        }
      },
      "inspector": {
        "inputs": {
          "emailAddress": {
            "type": "text",
            "tooltip": "Filter customers by email address (fuzzy search - partial matches allowed)",
            "label": "Email Address",
            "index": 1
          },
          "phoneNumber": {
            "type": "text",
            "tooltip": "Filter customers by phone number (fuzzy search - partial matches allowed)",
            "label": "Phone Number",
            "index": 2
          },
          "createdAtFrom": {
            "type": "date-time",
            "tooltip": "Find customers created after this date (ISO 8601 format)",
            "label": "Created After",
            "index": 3
          },
          "createdAtTo": {
            "type": "date-time",
            "tooltip": "Find customers created before this date (ISO 8601 format)",
            "label": "Created Before",
            "index": 4
          },
          "updatedAtFrom": {
            "type": "date-time",
            "tooltip": "Find customers updated after this date (ISO 8601 format)",
            "label": "Updated After",
            "index": 5
          },
          "updatedAtTo": {
            "type": "date-time",
            "tooltip": "Find customers updated before this date (ISO 8601 format)",
            "label": "Updated Before",
            "index": 6
          },
          "creationSource": {
            "type": "select",
            "tooltip": "Filter by creation source(s)",
            "label": "Creation Source",
            "index": 7,
            "multiple": true,
            "options": [
              {
                "clearItem": true,
                "content": "-- Clear selection --"
              },
              {
                "label": "Other",
                "value": "OTHER"
              },
              {
                "label": "Appointments",
                "value": "APPOINTMENTS"
              },
              {
                "label": "Coupon",
                "value": "COUPON"
              },
              {
                "label": "Deletion Recovery",
                "value": "DELETION_RECOVERY"
              },
              {
                "label": "Directory",
                "value": "DIRECTORY"
              },
              {
                "label": "E-Gifting",
                "value": "EGIFTING"
              },
              {
                "label": "Email Collection",
                "value": "EMAIL_COLLECTION"
              },
              {
                "label": "Feedback",
                "value": "FEEDBACK"
              },
              {
                "label": "Import",
                "value": "IMPORT"
              },
              {
                "label": "Invoices",
                "value": "INVOICES"
              },
              {
                "label": "Loyalty",
                "value": "LOYALTY"
              },
              {
                "label": "Marketing",
                "value": "MARKETING"
              },
              {
                "label": "Merge",
                "value": "MERGE"
              },
              {
                "label": "Online Store",
                "value": "ONLINE_STORE"
              },
              {
                "label": "Instant Profile",
                "value": "INSTANT_PROFILE"
              },
              {
                "label": "Terminal",
                "value": "TERMINAL"
              },
              {
                "label": "Third Party",
                "value": "THIRD_PARTY"
              },
              {
                "label": "Third Party Import",
                "value": "THIRD_PARTY_IMPORT"
              },
              {
                "label": "Unmerge Recovery",
                "value": "UNMERGE_RECOVERY"
              }
            ]
          },
          "groupIds": {
            "type": "multiselect",
            "tooltip": "Filter by customer group IDs",
            "label": "Group IDs",
            "index": 8,
            "source": {
              "url": "/component/appmixer/square/core/ListCustomerGroups?outPort=out",
              "data": {
                "messages": {
                  "in/isSource": true
                },
                "transform": "./transformers#customerGroupsToSelectArray"
              }
            }
          },
          "sortField": {
            "type": "select",
            "tooltip": "Field to sort results by",
            "label": "Sort Field",
            "index": 9,
            "options": [
              {
                "clearItem": true,
                "content": "-- Clear selection --"
              },
              {
                "label": "Default",
                "value": "DEFAULT"
              },
              {
                "label": "Created At",
                "value": "CREATED_AT"
              }
            ]
          },
          "sortOrder": {
            "type": "select",
            "tooltip": "Sort order",
            "label": "Sort Order",
            "index": 10,
            "defaultValue": "ASC",
            "options": [
              {
                "clearItem": true,
                "content": "-- Clear selection --"
              },
              {
                "label": "Ascending",
                "value": "ASC"
              },
              {
                "label": "Descending",
                "value": "DESC"
              }
            ]
          },
          "limit": {
            "type": "number",
            "tooltip": "Maximum number of results to return (1-100, default 100)",
            "label": "Limit",
            "index": 11,
            "defaultValue": 100
          },
          "outputType": {
            "type": "select",
            "label": "Output Type",
            "index": 12,
            "defaultValue": "array",
            "tooltip": "Choose how to receive the results",
            "options": [
              {
                "label": "First Item Only",
                "value": "first"
              },
              {
                "label": "All items at once",
                "value": "array"
              },
              {
                "label": "One item at a time",
                "value": "object"
              },
              {
                "label": "Store to CSV file",
                "value": "file"
              }
            ]
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/square/core/FindCustomers?outPort=out",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/outputType": "inputs/in/outputType"
          }
        }
      }
    },
    {
      "name": "notFound"
    }
  ],
  "icon": "(data URI omitted)"
}
```
