Query CRM data
Use the externalItems GraphQL query to retrieve CRM data based on matching search text.
Example response
The first sample code block illustrates a request to retrieve all contacts that have a specific email address.
{
externalItems(
namespace: "salesforce"
filter: {
type: "Contact"
searchText:"jsmith@company.com"
}
) {
edges {
node {
... on Contact {
identity {
id
}
name
phone
email
createdDate
}
}
}
}
}
Example request
The second code block illustrates the corresponding response with with the requested contact details.
{
"data": {
"externalItems": {
"edges": [
{
"node": {
"identity": {
"id": "0033Y00002ohnoEQAQ"
},
"name": "John Smith",
"phone": "+4412345678890",
"email": "jsmith@company.com",
"createdDate": "2019-06-11T09:13:47Z"
}
}
]
}
}
}