> 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.Query

- Component: `appmixer.salesforce.crm.Query`
- Kind: Action
- Version: 1.0.0
- 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.Query>

Executes the specified SOQL query. See more in the [SOQL Docs](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select.htm).

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| SQL Query (`query`) | text | Enter an SOQL query. See more in the [SOQL Docs](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select.htm). |
| Output Type (`outputType`) | select | Choose whether you want to receive the result set as one complete list, or one row at a time or stream the rows to a file. For large datasets, streaming the rows to a file is the most efficient method. |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/salesforce/crm/Query?outPort=out`.

### Port `emptyResult`

| Field | Type | Description |
| --- | --- | --- |
| `totalSize` | - | - |
| `done` | - | - |
| `records` | array | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.salesforce.crm.Query",
  "author": "Vladimir Talas <lades@client.io>",
  "icon": "(data URI omitted)",
  "description": "Executes the specified SOQL query. See more in the <a href='https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select.htm' target='_blank'> SOQL Docs </a>.",
  "trigger": true,
  "webhook": true,
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:salesforce"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "outputType": {
            "type": "string"
          }
        }
      },
      "inspector": {
        "inputs": {
          "query": {
            "type": "text",
            "index": 0,
            "label": "SQL Query",
            "tooltip": "Enter an SOQL query. See more in the <a href='https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select.htm' target='_blank'> SOQL Docs </a>."
          },
          "outputType": {
            "type": "select",
            "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",
            "index": 1,
            "label": "Output Type",
            "tooltip": "Choose whether you want to receive the result set as one complete list, or one row at a time or stream the rows to a file. For large datasets, streaming the rows to a file is the most efficient method."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/salesforce/crm/Query?outPort=out",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/outputType": "inputs/in/outputType"
          }
        }
      }
    },
    {
      "name": "emptyResult",
      "options": [
        {
          "label": "totalSize",
          "value": "totalSize",
          "schema": {
            "example": 25
          }
        },
        {
          "label": "done",
          "value": "done",
          "schema": {
            "example": true
          }
        },
        {
          "label": "records",
          "value": "records",
          "schema": {
            "type": "array",
            "example": [],
            "items": {
              "type": "object",
              "properties": {}
            }
          }
        }
      ]
    }
  ]
}
```
