Overview
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.Prerequisites
Before using the Salesforce integration, ensure you have:- A CrewAI Enterprise account with an active subscription
- A Salesforce account with appropriate permissions
- Connected your Salesforce account through the Integrations page
Available Tools
Record Management
SALESFORCE_CREATE_RECORD_CONTACT
SALESFORCE_CREATE_RECORD_CONTACT
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 fields
SALESFORCE_CREATE_RECORD_LEAD
SALESFORCE_CREATE_RECORD_LEAD
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 fields
SALESFORCE_CREATE_RECORD_OPPORTUNITY
SALESFORCE_CREATE_RECORD_OPPORTUNITY
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 fields
SALESFORCE_CREATE_RECORD_TASK
SALESFORCE_CREATE_RECORD_TASK
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 fields
SALESFORCE_CREATE_RECORD_ACCOUNT
SALESFORCE_CREATE_RECORD_ACCOUNT
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 fields
SALESFORCE_CREATE_RECORD_ANY
SALESFORCE_CREATE_RECORD_ANY
Record Updates
SALESFORCE_UPDATE_RECORD_CONTACT
SALESFORCE_UPDATE_RECORD_CONTACT
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 fields
SALESFORCE_UPDATE_RECORD_LEAD
SALESFORCE_UPDATE_RECORD_LEAD
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 fields
SALESFORCE_UPDATE_RECORD_OPPORTUNITY
SALESFORCE_UPDATE_RECORD_OPPORTUNITY
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 fields
SALESFORCE_UPDATE_RECORD_TASK
SALESFORCE_UPDATE_RECORD_TASK
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 fields
SALESFORCE_UPDATE_RECORD_ACCOUNT
SALESFORCE_UPDATE_RECORD_ACCOUNT
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 fields
SALESFORCE_UPDATE_RECORD_ANY
SALESFORCE_UPDATE_RECORD_ANY
Record Retrieval
SALESFORCE_GET_RECORD_BY_ID_CONTACT
SALESFORCE_GET_RECORD_BY_ID_CONTACT
recordId
(string, required): Record ID of the Contact
SALESFORCE_GET_RECORD_BY_ID_LEAD
SALESFORCE_GET_RECORD_BY_ID_LEAD
recordId
(string, required): Record ID of the Lead
SALESFORCE_GET_RECORD_BY_ID_OPPORTUNITY
SALESFORCE_GET_RECORD_BY_ID_OPPORTUNITY
recordId
(string, required): Record ID of the Opportunity
SALESFORCE_GET_RECORD_BY_ID_TASK
SALESFORCE_GET_RECORD_BY_ID_TASK
recordId
(string, required): Record ID of the Task
SALESFORCE_GET_RECORD_BY_ID_ACCOUNT
SALESFORCE_GET_RECORD_BY_ID_ACCOUNT
recordId
(string, required): Record ID of the Account
SALESFORCE_GET_RECORD_BY_ID_ANY
SALESFORCE_GET_RECORD_BY_ID_ANY
recordType
(string, required): Record Type (e.g., “CustomObject__c”)recordId
(string, required): Record ID
Record Search
SALESFORCE_SEARCH_RECORDS_CONTACT
SALESFORCE_SEARCH_RECORDS_CONTACT
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 pageCursor
SALESFORCE_SEARCH_RECORDS_LEAD
SALESFORCE_SEARCH_RECORDS_LEAD
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 pageCursor
SALESFORCE_SEARCH_RECORDS_OPPORTUNITY
SALESFORCE_SEARCH_RECORDS_OPPORTUNITY
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 pageCursor
SALESFORCE_SEARCH_RECORDS_TASK
SALESFORCE_SEARCH_RECORDS_TASK
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 pageCursor
SALESFORCE_SEARCH_RECORDS_ACCOUNT
SALESFORCE_SEARCH_RECORDS_ACCOUNT
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 pageCursor
SALESFORCE_SEARCH_RECORDS_ANY
SALESFORCE_SEARCH_RECORDS_ANY
recordType
(string, required): Record Type to searchfilterFormula
(string, optional): Filter search criteriaincludeAllFields
(boolean, optional): Include all fields in resultspaginationParameters
(object, optional): Pagination settings with pageCursor
List View Retrieval
SALESFORCE_GET_RECORD_BY_VIEW_ID_CONTACT
SALESFORCE_GET_RECORD_BY_VIEW_ID_CONTACT
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursor
SALESFORCE_GET_RECORD_BY_VIEW_ID_LEAD
SALESFORCE_GET_RECORD_BY_VIEW_ID_LEAD
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursor
SALESFORCE_GET_RECORD_BY_VIEW_ID_OPPORTUNITY
SALESFORCE_GET_RECORD_BY_VIEW_ID_OPPORTUNITY
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursor
SALESFORCE_GET_RECORD_BY_VIEW_ID_TASK
SALESFORCE_GET_RECORD_BY_VIEW_ID_TASK
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursor
SALESFORCE_GET_RECORD_BY_VIEW_ID_ACCOUNT
SALESFORCE_GET_RECORD_BY_VIEW_ID_ACCOUNT
listViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursor
SALESFORCE_GET_RECORD_BY_VIEW_ID_ANY
SALESFORCE_GET_RECORD_BY_VIEW_ID_ANY
recordType
(string, required): Record TypelistViewId
(string, required): List View IDpaginationParameters
(object, optional): Pagination settings with pageCursor
Custom Fields
SALESFORCE_CREATE_CUSTOM_FIELD_CONTACT
SALESFORCE_CREATE_CUSTOM_FIELD_CONTACT
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 value
SALESFORCE_CREATE_CUSTOM_FIELD_LEAD
SALESFORCE_CREATE_CUSTOM_FIELD_LEAD
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 value
SALESFORCE_CREATE_CUSTOM_FIELD_OPPORTUNITY
SALESFORCE_CREATE_CUSTOM_FIELD_OPPORTUNITY
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 value
SALESFORCE_CREATE_CUSTOM_FIELD_TASK
SALESFORCE_CREATE_CUSTOM_FIELD_TASK
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 value
SALESFORCE_CREATE_CUSTOM_FIELD_ACCOUNT
SALESFORCE_CREATE_CUSTOM_FIELD_ACCOUNT
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 value
SALESFORCE_CREATE_CUSTOM_FIELD_ANY
SALESFORCE_CREATE_CUSTOM_FIELD_ANY
Advanced Operations
SALESFORCE_WRITE_SOQL_QUERY
SALESFORCE_WRITE_SOQL_QUERY
query
(string, required): SOQL Query (e.g., “SELECT Id, Name FROM Account WHERE Name = ‘Example’”)
SALESFORCE_CREATE_CUSTOM_OBJECT
SALESFORCE_CREATE_CUSTOM_OBJECT
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
SALESFORCE_DESCRIBE_ACTION_SCHEMA
recordType
(string, required): Record Type to describeoperation
(string, required): Operation Type (e.g., “CREATE_RECORD” or “UPDATE_RECORD”)