CRM Automation Actions
The CRM Actions enable ThinkAutomation to integrate directly with popular Customer Relationship Management (CRM) platforms. These actions allow your Automations to query, create, update, or delete CRM records as part of your workflow. They are commonly used to synchronize data, enrich messages with customer details, log new leads, maintain contact records, or trigger CRM-based workflows. By mapping CRM fields to ThinkAutomation variables, you can seamlessly move data between systems and keep your CRM up to date without manual entry.
ThinkAutomation can read and update entities in the following CRM systems: Microsoft Dynamics (Online), Salesforce, Zoho CRM & Sugar CRM. See: CRM Connection Notes for specific CRM connection details.
Get CRM Entity
Performs a query against a CRM system to lookup a single entity and assign entity values to variables.
Click Connect to connect to a CRM system. Currently ThinkAutomation can connect to:
- Microsoft Dynamics CRM (Online)
- Salesforce
- Sugar CRM
- Zoho CRM
See: CRM Connection Notes for specific CRM connection details.
Once connected select the Entity Type to query.
You then create Query Conditions to lookup an entity of the Entity Type specified. The query can contain %variable% replacements. You can create multiple query conditions, for example: FirstName Equal To %Name% AND Email Contains %Company%.
The query will return the first record that matches the query conditions.
In the Assign Returned Entity Values To Variables list, select each CRM entity value that you want to assign to a ThinkAutomation Variable. If the query returns no entity then the selected ThinkAutomation variables will be set to blank values.
Update CRM Entity
Creates or updates entities in a CRM system,
Click Connect to connect to a CRM system. Currently ThinkAutomation can connect to:
- Microsoft Dynamics CRM (Online)
- Salesforce
- Sugar CRM
- Zoho CRM
See: CRM Connection Notes for specific CRM connection details.
Select Create New Entity, Update Existing Entity or Delete Existing Entity from the Action To Take selector.
Select the Entity Type to update.
When updating or deleting existing entities, you must specify the Entity ID To Update - this can be a ThinkAutomation variable that has received an Id from a previous Get CRM Entity action.
In the Update Entity Fields grid you map Entity fields to ThinkAutomation variables. Each field for the selected Entity Type will be listed. In the Set Value To column enter a value or select a ThinkAutomation variable to assign to the field. ThinkAutomation will automatically convert the value to the correct data type when updating your CRM. If the Entity field has a maximum length then the value will be truncated if required. The Required column shows if the Entity Field is marked as a required field in the CRM system. You should ensure that required fields are assigned a value to prevent updates from being rejected.
The updated entity Id can be returned to a ThinkAutomation variable. Select from the Assign Entity ID To list. When creating a new entity, the new id will be returned. When updating or deleting an existing entity, the same id passed with the Entity ID To Update entry will be returned - or blank if the existing entity could not be found.
Query CRM Entities
Perform a generic query to read one or more CRM entities as Json text, CSV or Markdown.
Click Connect to connect to a CRM system. Currently ThinkAutomation can connect to:
- Microsoft Dynamics CRM (Online)
- Salesforce
- Sugar CRM
- Zoho CRM
See: CRM Connection Notes for specific CRM connection details.
Select the Entity Type to query from the SELECT FROM list.
You can then select one or more columns to return from the Columns list or leave blank to select all columns.
You then create a WHERE clause to lookup entities of the Entity Type specified. The query can use %variable% replacements. You can create multiple query conditions, for example: FirstName Equal To %Name% AND Email Contains %Company%.
The query will return all records that match the query conditions - up to the Limit value.
In the ORDER BY list you can optionally select one or more columns to order the results by.
The results can be returned as either a Json Array text, CSV text or Markdown table text. Select the type from the Return As list.
Select the variable to receive the results from the Assign To list.
You can also optionally assign the number of records returned from the Assign Count To list.
For example:
Using Salesforce, entity type Contact, we could select the columns: FirstName, Email, LastName, & Title. With a WHERE clause of Email Contains 'test' and a Limit of 2 records. The json returned would be:
{
"Contact": [
{
"FirstName": "Howard",
"Email": "test@mycompamy.com",
"LastName": "Williams",
"Title": "Director"
},
{
"FirstName": "Joe",
"Email": "joe@testemail.com",
"LastName": "Bloggs",
"Title": null
}
]
}
If the Return As was set to CSV then the returned text would be:
Howard,test@mycompany.com,Williams,Director
Joe,joe@testemail.com,Bloggs,,
You can use the CSV option with the For..Each line action - to loop through each CSV line, along with the Parse CSV Line action to get specific values (for example, to read a CRM for Contact records and send an email to each email address returned).
For CSV you also have the option to Include CSV Headers Line. If this is enabled then the returned CSV text will contain the field name headers line.
The the Return As was set to Markdown then a Markdown table will be returned. You can use the Set action to convert this markdown to html if required.
If no records are returned the Assign To variable will be set to blank text.