> 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.salesforce.crm.FindContactsByField

- Component: `appmixer.salesforce.crm.FindContactsByField`
- Kind: Action
- Version: 1.1.2
- Visibility: Public
- Connector: [appmixer.salesforce 1.7.7](https://connectors.appmixer.com/connector/appmixer.salesforce/1.7.7.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.salesforce/1.7.7/component/appmixer.salesforce.crm.FindContactsByField>

Get all contacts related to a chosen Contact field value, for example every contact matching a specific Campaign ID, Account or custom field.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Field (`fieldName`) | text | The Contact field to filter on, for example AccountId, LeadSource or a custom field. |
| Field Value (`fieldValue`) | text | The value the chosen field must match, for example the Campaign ID or an email address. |
| Match Type (`matchType`) | select | How the field value is compared. Contains and Starts with use a SOQL LIKE query and only work on text fields — for ID, number or date fields use Exact match. |
| Output Type (`outputType`) | select | Choose whether you want to receive the result set as one complete list, or one item at a time or stream the items to a file. For large datasets, streaming the items to a file is the most efficient method. |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/salesforce/crm/FindContactsByField?outPort=out&ignoreAuth=true`.

### Port `notFound`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.salesforce.crm.FindContactsByField",
  "author": "Appmixer <info@appmixer.ai>",
  "description": "Get all contacts related to a chosen Contact field value, for example every contact matching a specific Campaign ID, Account or custom field.",
  "private": false,
  "auth": {
    "service": "appmixer:salesforce"
  },
  "quota": {
    "manager": "appmixer:salesforce",
    "resources": "requests"
  },
  "version": "1.1.2",
  "dependencies": {
    "service": "1.1.2"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "fieldName": {
            "type": "string"
          },
          "fieldValue": {
            "type": "string"
          },
          "matchType": {
            "type": "string"
          },
          "outputType": {
            "type": "string"
          }
        }
      },
      "inspector": {
        "inputs": {
          "fieldName": {
            "type": "text",
            "label": "Field",
            "index": 1,
            "tooltip": "The Contact field to filter on, for example AccountId, LeadSource or a custom field.",
            "source": {
              "url": "/component/appmixer/salesforce/crm/GetObjectFields?outPort=out",
              "data": {
                "messages": {
                  "in": {
                    "objectName": "Contact"
                  }
                },
                "transform": "./transformers#fieldsToSelectOptions",
                "properties": {
                  "variableFetch": true
                }
              }
            }
          },
          "fieldValue": {
            "type": "text",
            "label": "Field Value",
            "index": 2,
            "tooltip": "The value the chosen field must match, for example the Campaign ID or an email address."
          },
          "matchType": {
            "type": "select",
            "label": "Match Type",
            "index": 3,
            "options": [
              {
                "content": "Exact match",
                "value": "exact"
              },
              {
                "content": "Contains",
                "value": "contains"
              },
              {
                "content": "Starts with",
                "value": "startsWith"
              }
            ],
            "defaultValue": "exact",
            "tooltip": "How the field value is compared. Contains and Starts with use a SOQL LIKE query and only work on text fields — for ID, number or date fields use Exact match."
          },
          "outputType": {
            "type": "select",
            "label": "Output Type",
            "index": 4,
            "tooltip": "Choose whether you want to receive the result set as one complete list, or one item at a time or stream the items to a file. For large datasets, streaming the items to a file is the most efficient method.",
            "options": [
              {
                "content": "All items at once",
                "value": "array"
              },
              {
                "content": "One item at a time",
                "value": "object"
              },
              {
                "content": "Save items to file",
                "value": "file"
              }
            ],
            "defaultValue": "array"
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/salesforce/crm/FindContactsByField?outPort=out&ignoreAuth=true",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/fieldName": "inputs/in/fieldName",
            "in/fieldValue": "inputs/in/fieldValue",
            "in/outputType": "inputs/in/outputType"
          }
        }
      }
    },
    {
      "name": "notFound"
    }
  ],
  "icon": "(data URI omitted)"
}
```
