CRM and sales automation with Salesforce integration for CrewAI.
Enable your agents to manage customer relationships, sales processes, and data through Salesforce. Create and update records, manage leads and opportunities, execute SOQL queries, and streamline your CRM workflows with AI-powered automation.
Before using the Salesforce integration, ensure you have:
SALESFORCE_CREATE_RECORD_CONTACT
Description: Create a new Contact record in Salesforce.
Parameters:
FirstName
(string, optional): First NameLastName
(string, required): Last Name - This field is requiredaccountId
(string, optional): Account ID - The Account that the Contact belongs toEmail
(string, optional): Email addressTitle
(string, optional): Title of the contact, such as CEO or Vice PresidentDescription
(string, optional): A description of the ContactadditionalFields
(object, optional): Additional fields in JSON format for custom Contact fieldsSALESFORCE_CREATE_RECORD_LEAD
Description: Create a new Lead record in Salesforce.
Parameters:
FirstName
(string, optional): First NameLastName
(string, required): Last Name - This field is requiredCompany
(string, required): Company - This field is requiredEmail
(string, optional): Email addressPhone
(string, optional): Phone numberWebsite
(string, optional): Website URLTitle
(string, optional): Title of the contact, such as CEO or Vice PresidentStatus
(string, optional): Lead Status - Use Connect Portal Workflow Settings to select Lead StatusDescription
(string, optional): A description of the LeadadditionalFields
(object, optional): Additional fields in JSON format for custom Lead fieldsSALESFORCE_CREATE_RECORD_OPPORTUNITY
Description: Create a new Opportunity record in Salesforce.
Parameters:
Name
(string, required): The Opportunity name - This field is requiredStageName
(string, optional): Opportunity Stage - Use Connect Portal Workflow Settings to select stageCloseDate
(string, optional): Close Date in YYYY-MM-DD format - Defaults to 30 days from current dateAccountId
(string, optional): The Account that the Opportunity belongs toAmount
(string, optional): Estimated total sale amountDescription
(string, optional): A description of the OpportunityOwnerId
(string, optional): The Salesforce user assigned to work on this OpportunityNextStep
(string, optional): Description of next task in closing OpportunityadditionalFields
(object, optional): Additional fields in JSON format for custom Opportunity fieldsSALESFORCE_CREATE_RECORD_TASK
Description: Create a new Task record in Salesforce.
Parameters:
whatId
(string, optional): Related to ID - The ID of the Account or Opportunity this Task is related towhoId
(string, optional): Name ID - The ID of the Contact or Lead this Task is related tosubject
(string, required): Subject of the taskactivityDate
(string, optional): Activity Date in YYYY-MM-DD formatdescription
(string, optional): A description of the TasktaskSubtype
(string, required): Task Subtype - Options: task, email, listEmail, callStatus
(string, optional): Status - Options: Not Started, In Progress, CompletedownerId
(string, optional): Assigned To ID - The Salesforce user assigned to this TaskcallDurationInSeconds
(string, optional): Call Duration in secondsisReminderSet
(boolean, optional): Whether reminder is setreminderDateTime
(string, optional): Reminder Date/Time in ISO formatadditionalFields
(object, optional): Additional fields in JSON format for custom Task fieldsSALESFORCE_CREATE_RECORD_ACCOUNT
Description: Create a new Account record in Salesforce.
Parameters:
Name
(string, required): The Account name - This field is requiredOwnerId
(string, optional): The Salesforce user assigned to this AccountWebsite
(string, optional): Website URLPhone
(string, optional): Phone numberDescription
(string, optional): Account descriptionadditionalFields
(object, optional): Additional fields in JSON format for custom Account fieldsSALESFORCE_CREATE_RECORD_ANY
Description: Create a record of any object type in Salesforce.
Note: This is a flexible tool for creating records of custom or unknown object types.
SALESFORCE_UPDATE_RECORD_CONTACT
Description: Update an existing Contact record in Salesforce.
Parameters:
recordId
(string, required): The ID of the record to updateFirstName
(string, optional): First NameLastName
(string, optional): Last NameaccountId
(string, optional): Account ID - The Account that the Contact belongs toEmail
(string, optional): Email addressTitle
(string, optional): Title of the contactDescription
(string, optional): A description of the ContactadditionalFields
(object, optional): Additional fields in JSON format for custom Contact fieldsSALESFORCE_UPDATE_RECORD_LEAD
Description: Update an existing Lead record in Salesforce.
Parameters:
recordId
(string, required): The ID of the record to updateFirstName
(string, optional): First NameLastName
(string, optional): Last NameCompany
(string, optional): Company nameEmail
(string, optional): Email addressPhone
(string, optional): Phone numberWebsite
(string, optional): Website URLTitle
(string, optional): Title of the contactStatus
(string, optional): Lead StatusDescription
(string, optional): A description of the LeadadditionalFields
(object, optional): Additional fields in JSON format for custom Lead fieldsSALESFORCE_UPDATE_RECORD_OPPORTUNITY
Description: Update an existing Opportunity record in Salesforce.
Parameters:
recordId
(string, required): The ID of the record to updateName
(string, optional): The Opportunity nameStageName
(string, optional): Opportunity StageCloseDate
(string, optional): Close Date in YYYY-MM-DD formatAccountId
(string, optional): The Account that the Opportunity belongs toAmount
(string, optional): Estimated total sale amountDescription
(string, optional): A description of the OpportunityOwnerId
(string, optional): The Salesforce user assigned to work on this OpportunityNextStep
(string, optional): Description of next task in closing OpportunityadditionalFields
(object, optional): Additional fields in JSON format for custom Opportunity fieldsSALESFORCE_UPDATE_RECORD_TASK
Description: Update an existing Task record in Salesforce.
Parameters:
recordId
(string, required): The ID of the record to updatewhatId
(string, optional): Related to ID - The ID of the Account or Opportunity this Task is related towhoId
(string, optional): Name ID - The ID of the Contact or Lead this Task is related tosubject
(string, optional): Subject of the taskactivityDate
(string, optional): Activity Date in YYYY-MM-DD formatdescription
(string, optional): A description of the TaskStatus
(string, optional): Status - Options: Not Started, In Progress, CompletedownerId
(string, optional): Assigned To ID - The Salesforce user assigned to this TaskcallDurationInSeconds
(string, optional): Call Duration in secondsisReminderSet
(boolean, optional): Whether reminder is setreminderDateTime
(string, optional): Reminder Date/Time in ISO formatadditionalFields
(object, optional): Additional fields in JSON format for custom Task fieldsSALESFORCE_UPDATE_RECORD_ACCOUNT
Description: Update an existing Account record in Salesforce.
Parameters:
recordId
(string, required): The ID of the record to updateName
(string, optional): The Account nameOwnerId
(string, optional): The Salesforce user assigned to this AccountWebsite
(string, optional): Website URLPhone
(string, optional): Phone numberDescription
(string, optional): Account descriptionadditionalFields
(object, optional): Additional fields in JSON format for custom Account fieldsSALESFORCE_UPDATE_RECORD_ANY
Description: Update a record of any object type in Salesforce.
Note: This is a flexible tool for updating records of custom or unknown object types.
SALESFORCE_GET_RECORD_BY_ID_CONTACT
Description: Get a Contact record by its ID.
Parameters:
recordId
(string, required): Record ID of the ContactSALESFORCE_GET_RECORD_BY_ID_LEAD
Description: Get a Lead record by its ID.
Parameters:
recordId
(string, required): Record ID of the LeadSALESFORCE_GET_RECORD_BY_ID_OPPORTUNITY
Description: Get an Opportunity record by its ID.
Parameters:
recordId
(string, required): Record ID of the OpportunitySALESFORCE_GET_RECORD_BY_ID_TASK
Description: Get a Task record by its ID.
Parameters:
recordId
(string, required): Record ID of the TaskSALESFORCE_GET_RECORD_BY_ID_ACCOUNT
Description: Get an Account record by its ID.
Parameters:
recordId
(string, required): Record ID of the AccountSALESFORCE_GET_RECORD_BY_ID_ANY
Description: Get a record of any object type by its ID.
Parameters:
recordType
(string, required): Record Type (e.g., “CustomObject__c”)recordId
(string, required): Record IDSALESFORCE_SEARCH_RECORDS_CONTACT
Description: Search for Contact records with advanced filtering.
Parameters:
filterFormula
(object, optional): Advanced filter in disjunctive normal form with field-specific operatorssortBy
(string, optional): Sort field (e.g., “CreatedDate”)sortDirection
(string, optional): Sort direction - Options: ASC, DESCincludeAllFields
(boolean, optional): Include all fields in resultspaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_SEARCH_RECORDS_LEAD
Description: Search for Lead records with advanced filtering.
Parameters:
filterFormula
(object, optional): Advanced filter in disjunctive normal form with field-specific operatorssortBy
(string, optional): Sort field (e.g., “CreatedDate”)sortDirection
(string, optional): Sort direction - Options: ASC, DESCincludeAllFields
(boolean, optional): Include all fields in resultspaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_SEARCH_RECORDS_OPPORTUNITY
Description: Search for Opportunity records with advanced filtering.
Parameters:
filterFormula
(object, optional): Advanced filter in disjunctive normal form with field-specific operatorssortBy
(string, optional): Sort field (e.g., “CreatedDate”)sortDirection
(string, optional): Sort direction - Options: ASC, DESCincludeAllFields
(boolean, optional): Include all fields in resultspaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_SEARCH_RECORDS_TASK
Description: Search for Task records with advanced filtering.
Parameters:
filterFormula
(object, optional): Advanced filter in disjunctive normal form with field-specific operatorssortBy
(string, optional): Sort field (e.g., “CreatedDate”)sortDirection
(string, optional): Sort direction - Options: ASC, DESCincludeAllFields
(boolean, optional): Include all fields in resultspaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_SEARCH_RECORDS_ACCOUNT
Description: Search for Account records with advanced filtering.
Parameters:
filterFormula
(object, optional): Advanced filter in disjunctive normal form with field-specific operatorssortBy
(string, optional): Sort field (e.g., “CreatedDate”)sortDirection
(string, optional): Sort direction - Options: ASC, DESCincludeAllFields
(boolean, optional): Include all fields in resultspaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_SEARCH_RECORDS_ANY
Description: Search for records of any object type.
Parameters:
recordType
(string, required): Record Type to searchfilterFormula
(string, optional): Filter search criteriaincludeAllFields
(boolean, optional): Include all fields in resultspaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_GET_RECORD_BY_VIEW_ID_CONTACT
Description: Get Contact records from a specific List View.
Parameters:
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_GET_RECORD_BY_VIEW_ID_LEAD
Description: Get Lead records from a specific List View.
Parameters:
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_GET_RECORD_BY_VIEW_ID_OPPORTUNITY
Description: Get Opportunity records from a specific List View.
Parameters:
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_GET_RECORD_BY_VIEW_ID_TASK
Description: Get Task records from a specific List View.
Parameters:
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_GET_RECORD_BY_VIEW_ID_ACCOUNT
Description: Get Account records from a specific List View.
Parameters:
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_GET_RECORD_BY_VIEW_ID_ANY
Description: Get records of any object type from a specific List View.
Parameters:
recordType
(string, required): Record TypelistViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursorSALESFORCE_CREATE_CUSTOM_FIELD_CONTACT
Description: Deploy custom fields for Contact objects.
Parameters:
label
(string, required): Field Label for displays and internal referencetype
(string, required): Field Type - Options: Checkbox, Currency, Date, Email, Number, Percent, Phone, Picklist, MultiselectPicklist, Text, TextArea, LongTextArea, Html, Time, UrldefaultCheckboxValue
(boolean, optional): Default value for checkbox fieldslength
(string, required): Length for numeric/text fieldsdecimalPlace
(string, required): Decimal places for numeric fieldspickListValues
(string, required): Values for picklist fields (separated by new lines)visibleLines
(string, required): Visible lines for multiselect/text area fieldsdescription
(string, optional): Field descriptionhelperText
(string, optional): Helper text shown on hoverdefaultFieldValue
(string, optional): Default field valueSALESFORCE_CREATE_CUSTOM_FIELD_LEAD
Description: Deploy custom fields for Lead objects.
Parameters:
label
(string, required): Field Label for displays and internal referencetype
(string, required): Field Type - Options: Checkbox, Currency, Date, Email, Number, Percent, Phone, Picklist, MultiselectPicklist, Text, TextArea, LongTextArea, Html, Time, UrldefaultCheckboxValue
(boolean, optional): Default value for checkbox fieldslength
(string, required): Length for numeric/text fieldsdecimalPlace
(string, required): Decimal places for numeric fieldspickListValues
(string, required): Values for picklist fields (separated by new lines)visibleLines
(string, required): Visible lines for multiselect/text area fieldsdescription
(string, optional): Field descriptionhelperText
(string, optional): Helper text shown on hoverdefaultFieldValue
(string, optional): Default field valueSALESFORCE_CREATE_CUSTOM_FIELD_OPPORTUNITY
Description: Deploy custom fields for Opportunity objects.
Parameters:
label
(string, required): Field Label for displays and internal referencetype
(string, required): Field Type - Options: Checkbox, Currency, Date, Email, Number, Percent, Phone, Picklist, MultiselectPicklist, Text, TextArea, LongTextArea, Html, Time, UrldefaultCheckboxValue
(boolean, optional): Default value for checkbox fieldslength
(string, required): Length for numeric/text fieldsdecimalPlace
(string, required): Decimal places for numeric fieldspickListValues
(string, required): Values for picklist fields (separated by new lines)visibleLines
(string, required): Visible lines for multiselect/text area fieldsdescription
(string, optional): Field descriptionhelperText
(string, optional): Helper text shown on hoverdefaultFieldValue
(string, optional): Default field valueSALESFORCE_CREATE_CUSTOM_FIELD_TASK
Description: Deploy custom fields for Task objects.
Parameters:
label
(string, required): Field Label for displays and internal referencetype
(string, required): Field Type - Options: Checkbox, Currency, Date, Email, Number, Percent, Phone, Picklist, MultiselectPicklist, Text, TextArea, Time, UrldefaultCheckboxValue
(boolean, optional): Default value for checkbox fieldslength
(string, required): Length for numeric/text fieldsdecimalPlace
(string, required): Decimal places for numeric fieldspickListValues
(string, required): Values for picklist fields (separated by new lines)visibleLines
(string, required): Visible lines for multiselect fieldsdescription
(string, optional): Field descriptionhelperText
(string, optional): Helper text shown on hoverdefaultFieldValue
(string, optional): Default field valueSALESFORCE_CREATE_CUSTOM_FIELD_ACCOUNT
Description: Deploy custom fields for Account objects.
Parameters:
label
(string, required): Field Label for displays and internal referencetype
(string, required): Field Type - Options: Checkbox, Currency, Date, Email, Number, Percent, Phone, Picklist, MultiselectPicklist, Text, TextArea, LongTextArea, Html, Time, UrldefaultCheckboxValue
(boolean, optional): Default value for checkbox fieldslength
(string, required): Length for numeric/text fieldsdecimalPlace
(string, required): Decimal places for numeric fieldspickListValues
(string, required): Values for picklist fields (separated by new lines)visibleLines
(string, required): Visible lines for multiselect/text area fieldsdescription
(string, optional): Field descriptionhelperText
(string, optional): Helper text shown on hoverdefaultFieldValue
(string, optional): Default field valueSALESFORCE_CREATE_CUSTOM_FIELD_ANY
Description: Deploy custom fields for any object type.
Note: This is a flexible tool for creating custom fields on custom or unknown object types.
SALESFORCE_WRITE_SOQL_QUERY
Description: Execute custom SOQL queries against your Salesforce data.
Parameters:
query
(string, required): SOQL Query (e.g., “SELECT Id, Name FROM Account WHERE Name = ‘Example’”)SALESFORCE_CREATE_CUSTOM_OBJECT
Description: Deploy a new custom object in Salesforce.
Parameters:
label
(string, required): Object Label for tabs, page layouts, and reportspluralLabel
(string, required): Plural Label (e.g., “Accounts”)description
(string, optional): A description of the Custom ObjectrecordName
(string, required): Record Name that appears in layouts and searches (e.g., “Account Name”)SALESFORCE_DESCRIBE_ACTION_SCHEMA
Description: Get the expected schema for operations on specific object types.
Parameters:
recordType
(string, required): Record Type to describeoperation
(string, required): Operation Type (e.g., “CREATE_RECORD” or “UPDATE_RECORD”)Note: Use this function first when working with custom objects to understand their schema before performing operations.
This comprehensive documentation covers all the Salesforce tools organized by functionality, making it easy for users to find the specific operations they need for their CRM automation tasks.
Contact our support team for assistance with Salesforce integration setup or troubleshooting.