Salesforce

Learn how to use Salesforce with Composio

Overview

Enum

SALESFORCE

Description

Salesforce is a leading CRM platform integrating sales, service, marketing, and analytics to build customer relationships and drive business growth

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to full,refresh_token
instanceEndpoint
stringDefaults to /services/data/v61.0Required

Actions

Create a new lead via post, specifying content type in the header. accepts a json lead object. possible response status codes include 201 (created), 400, 401, 403, 404, 405, 415, 500, 503, along with corresponding error info.

Action Parameters

IsDeleted
boolean
MasterRecordId
string
LastName
string
FirstName
string
Salutation
string
Title
string
Company
string
Street
string
City
string
State
string
PostalCode
string
Country
string
Phone
string
Email
string
Website
string
PhotoUrl
string
Description
string
LeadSource
string
Status
string
Industry
string
Rating
string
AnnualRevenue
integer
NumberOfEmployees
integer
OwnerId
string
IsConverted
boolean
ConvertedDate
string
ConvertedAccountId
string
ConvertedContactId
string
ConvertedOpportunityId
string
IsUnreadByOwner
boolean
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
LastViewedDate
string
LastReferencedDate
string
Jigsaw
string
JigsawContactId
string
CleanStatus
string
CompanyDunsNumber
string
DandbCompanyId
string
EmailBouncedReason
string
EmailBouncedDate
string
IndividualId
string
IsPriorityRecord
boolean
SICCode__c
string
ProductInterest__c
string
Primary__c
string
CurrentGenerators__c
string
NumberofLocations__c
integer
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Retrieve account data with response codes for success and various errors (not modified, bad request, unauthorized, forbidden, not found, method not allowed, server error, service unavailable). returns sobjectrootinfo on success.

Action Parameters

Action Response

data
object
successful
boolean
error

The post /sobjects/contact endpoint creates a new contact using json; it requires a content-type header. success and error responses range from status codes 201 to 503.

Action Parameters

Id
string
IsDeleted
boolean
MasterRecordId
string
AccountId
string
LastName
string
FirstName
string
Salutation
string
Name
string
OtherStreet
string
OtherCity
string
OtherState
string
OtherPostalCode
string
OtherCountry
string
OtherLatitude
integer
OtherLongitude
integer
OtherGeocodeAccuracy
string
MailingStreet
string
MailingCity
string
MailingState
string
MailingPostalCode
string
MailingCountry
string
MailingLatitude
integer
MailingLongitude
integer
MailingGeocodeAccuracy
string
Phone
string
Fax
string
MobilePhone
string
HomePhone
string
OtherPhone
string
AssistantPhone
string
ReportsToId
string
Email
string
Title
string
Department
string
AssistantName
string
LeadSource
string
Birthdate
string
Description
string
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
LastCURequestDate
string
LastCUUpdateDate
string
LastViewedDate
string
LastReferencedDate
string
EmailBouncedReason
string
EmailBouncedDate
string
IsEmailBounced
boolean
PhotoUrl
string
Jigsaw
string
JigsawContactId
string
CleanStatus
string
IndividualId
string
IsPriorityRecord
boolean
ContactSource
string
Level__c
string
Languages__c
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

This patch endpoint allows updates to an existing opportunity object by id, accepts json payloads, and supports multiple response statuses, including 400, 401, 403, 404, 500, 405, 503, 204, and 415, indicating various error conditions or success.

Action Parameters

id
stringRequired
Id
string
IsDeleted
boolean
AccountId
string
IsPrivate
boolean
Name
string
Description
string
StageName
string
Amount
integer
Probability
integer
ExpectedRevenue
integer
TotalOpportunityQuantity
integer
CloseDate
string
Type
string
NextStep
string
LeadSource
string
IsClosed
boolean
IsWon
boolean
ForecastCategory
string
ForecastCategoryName
string
CampaignId
string
HasOpportunityLineItem
boolean
Pricebook2Id
string
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
PushCount
integer
LastStageChangeDate
string
FiscalQuarter
integer
FiscalYear
integer
Fiscal
string
ContactId
string
LastViewedDate
string
LastReferencedDate
string
HasOpenActivity
boolean
HasOverdueTask
boolean
LastAmountChangedHistoryId
string
LastCloseDateChangedHistoryId
string
DeliveryInstallationStatus__c
string
TrackingNumber__c
string
OrderNumber__c
string
CurrentGenerators__c
string
MainCompetitors__c
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

This endpoint retrieves a specific contact by id. it supports optional field selection and conditional retrieval based on modification timestamp. responses cover a range of http status codes from success to various client and server errors.

Action Parameters

id
stringRequired
fields
string

Action Response

data
object
successful
boolean
error

Update a campaign object by id with json support. requires ‘id’ path parameter and ‘content-type’ header. potential responses: 200 ok, 400, 401, 403, 404, 405, 415, 500, 503 errors, and 204 no content.

Action Parameters

id
stringRequired
Id
string
IsDeleted
boolean
Name
string
ParentId
string
Type
string
Status
string
StartDate
string
EndDate
string
ExpectedRevenue
integer
BudgetedCost
integer
ActualCost
integer
ExpectedResponse
integer
NumberSent
integer
IsActive
boolean
Description
string
NumberOfLeads
integer
NumberOfConvertedLeads
integer
NumberOfContacts
integer
NumberOfResponses
integer
NumberOfOpportunities
integer
NumberOfWonOpportunities
integer
AmountAllOpportunities
integer
AmountWonOpportunities
integer
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
LastViewedDate
string
LastReferencedDate
string
CampaignMemberRecordTypeId
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Delete an opportunity object using its unique id, handling responses for success and common http errors like bad request, unauthorized access, forbidden, not found, and server errors.

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

Get /sobjects/contact: retrieves contact info with standard response codes, including successful fetch (200) and various errors (304, 400, 401, 403, 404, 405, 412, 500, 503). json format expected.

Action Parameters

Action Response

data
object
successful
boolean
error

Patch endpoint ‘/sobjects/account/{id}’ updates an account object by its id, using ‘application/json’. requires ‘content-type’ header and may return status codes 400, 401, 403, 404, 500, 405, 503, 204, or 415.

Action Parameters

id
stringRequired
Id
string
IsDeleted
boolean
MasterRecordId
string
Name
string
Type
string
ParentId
string
BillingStreet
string
BillingCity
string
BillingState
string
BillingPostalCode
string
BillingCountry
string
BillingLatitude
integer
BillingLongitude
integer
BillingGeocodeAccuracy
string
ShippingStreet
string
ShippingCity
string
ShippingState
string
ShippingPostalCode
string
ShippingCountry
string
ShippingLatitude
integer
ShippingLongitude
integer
ShippingGeocodeAccuracy
string
Phone
string
Fax
string
AccountNumber
string
Website
string
PhotoUrl
string
Sic
string
Industry
string
AnnualRevenue
integer
NumberOfEmployees
integer
Ownership
string
TickerSymbol
string
Description
string
Rating
string
Site
string
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
LastViewedDate
string
LastReferencedDate
string
Jigsaw
string
JigsawCompanyId
string
CleanStatus
string
AccountSource
string
DunsNumber
string
Tradestyle
string
NaicsCode
string
NaicsDesc
string
YearStarted
string
SicDesc
string
DandbCompanyId
string
OperatingHoursId
string
CustomerPriority__c
string
SLA__c
string
Active__c
string
NumberofLocations__c
integer
UpsellOpportunity__c
string
SLASerialNumber__c
string
SLAExpirationDate__c
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Endpoint for creating accounts via post; accepts json with ‘content-type’ header. status codes: 201 (created), 400, 401, 403-405, 415, 500, 503.

Action Parameters

Id
string
IsDeleted
boolean
MasterRecordId
string
Name
string
Type
string
ParentId
string
BillingStreet
string
BillingCity
string
BillingState
string
BillingPostalCode
string
BillingCountry
string
BillingLatitude
integer
BillingLongitude
integer
BillingGeocodeAccuracy
string
ShippingStreet
string
ShippingCity
string
ShippingState
string
ShippingPostalCode
string
ShippingCountry
string
ShippingLatitude
integer
ShippingLongitude
integer
ShippingGeocodeAccuracy
string
Phone
string
Fax
string
AccountNumber
string
Website
string
PhotoUrl
string
Sic
string
Industry
string
AnnualRevenue
integer
NumberOfEmployees
integer
Ownership
string
TickerSymbol
string
Description
string
Rating
string
Site
string
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
LastViewedDate
string
LastReferencedDate
string
Jigsaw
string
JigsawCompanyId
string
CleanStatus
string
AccountSource
string
DunsNumber
string
Tradestyle
string
NaicsCode
string
NaicsDesc
string
YearStarted
string
SicDesc
string
DandbCompanyId
string
OperatingHoursId
string
CustomerPriority__c
string
SLA__c
string
Active__c
string
NumberofLocations__c
integer
UpsellOpportunity__c
string
SLASerialNumber__c
string
SLAExpirationDate__c
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Delete a lead object by id. errors handled for missing auth, access rights, nonexistent object, and server issues. returns no content on success (204). required: id path parameter.

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

Retrieve details of a lead by id, with optional field selection and conditional retrieval based on modification dates. supports responses for success, various client or server errors, and change detection statuses.

Action Parameters

id
stringRequired
fields
string

Action Response

data
object
successful
boolean
error

Patch /sobjects/note/{id}: update a specific note object using its id. requires ‘content-type’ header and json body with the note’s new content. responses: 204 on success, 400-415, 500, or 503 for errors.

Action Parameters

id
stringRequired
Id
string
IsDeleted
boolean
ParentId
string
Title
string
IsPrivate
boolean
Body
string
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Create a new campaign record by posting json data to ‘/sobjects/campaign’. must include ‘content-type’ header. possible responses include success (201) and various errors like 400, 401, 403, 404, 405, 415, 500, 503 with descriptive info.

Action Parameters

Id
string
IsDeleted
boolean
Name
string
ParentId
string
Type
string
Status
string
StartDate
string
EndDate
string
ExpectedRevenue
integer
BudgetedCost
integer
ActualCost
integer
ExpectedResponse
integer
NumberSent
integer
IsActive
boolean
Description
string
NumberOfLeads
integer
NumberOfConvertedLeads
integer
NumberOfContacts
integer
NumberOfResponses
integer
NumberOfOpportunities
integer
NumberOfWonOpportunities
integer
AmountAllOpportunities
integer
AmountWonOpportunities
integer
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
LastViewedDate
string
LastReferencedDate
string
CampaignMemberRecordTypeId
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Retrieve details of a specific campaign object using its id. optional query/header params allow for field selection and date-based filtering. expect standard http response codes, such as 200 ok or 404 not found, for outcomes.

Action Parameters

id
stringRequired
fields
string

Action Response

data
object
successful
boolean
error

Delete a note object by id. supports error handling for common http response statuses including 400, 401, 403, 404, 500, 405, 503, and 415; 204 for success. required parameter: ‘id’ in path.

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

Patch endpoint updates lead by id with json body per leadsobject schema, needs content-type header; responses vary from 204 to error codes 400, 401, 403, 404, 415, 500, 503 with error info.

Action Parameters

id
stringRequired
Id
string
IsDeleted
boolean
MasterRecordId
string
LastName
string
FirstName
string
Salutation
string
Name
string
Title
string
Company
string
Street
string
City
string
State
string
PostalCode
string
Country
string
Latitude
integer
Longitude
integer
GeocodeAccuracy
string
Phone
string
MobilePhone
string
Fax
string
Email
string
Website
string
PhotoUrl
string
Description
string
LeadSource
string
Status
string
Industry
string
Rating
string
AnnualRevenue
integer
NumberOfEmployees
integer
OwnerId
string
IsConverted
boolean
ConvertedDate
string
ConvertedAccountId
string
ConvertedContactId
string
ConvertedOpportunityId
string
IsUnreadByOwner
boolean
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
LastViewedDate
string
LastReferencedDate
string
Jigsaw
string
JigsawContactId
string
CleanStatus
string
CompanyDunsNumber
string
DandbCompanyId
string
EmailBouncedReason
string
EmailBouncedDate
string
IndividualId
string
IsPriorityRecord
boolean
SICCode__c
string
ProductInterest__c
string
Primary__c
string
CurrentGenerators__c
string
NumberofLocations__c
integer
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Retrieve lead data with potential responses: 200 (success), 304 (not modified), 400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 405 (method not allowed), 412 (precondition failed), 500 (server error), 503 (service unavailable).

Action Parameters

Action Response

data
object
successful
boolean
error

Create ‘opportunity’ records with required ‘content type’ header (json/xml). successfully created records return a 201 status code. errors trigger status codes 400, 401, 403, 404, 405, 415, 500, or 503 with details. ensure fields used are available based on the organization’s salesforce configuration.

Action Parameters

Id
string
IsDeleted
boolean
AccountId
string
IsPrivate
boolean
Name
string
Description
string
StageName
string
Amount
integer
Probability
integer
ExpectedRevenue
integer
TotalOpportunityQuantity
integer
CloseDate
string
Type
string
NextStep
string
LeadSource
string
IsClosed
boolean
IsWon
boolean
ForecastCategory
string
ForecastCategoryName
string
CampaignId
string
HasOpportunityLineItem
boolean
Pricebook2Id
string
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
PushCount
integer
LastStageChangeDate
string
FiscalQuarter
integer
FiscalYear
integer
Fiscal
string
ContactId
string
LastViewedDate
string
LastReferencedDate
string
HasOpenActivity
boolean
HasOverdueTask
boolean
LastAmountChangedHistoryId
string
LastCloseDateChangedHistoryId
string
DeliveryInstallationStatus__c
string
TrackingNumber__c
string
OrderNumber__c
string
CurrentGenerators__c
string
MainCompetitors__c
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Delete /sobjects/campaign/{id}“: removes a campaign object given an id. responds with 204 on success or returns error codes 400, 401, 403, 404, 405, 415, 500, 503 with details if any issues arise. the id path parameter is required.

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

Post returns report data without saving changes to an existing report or creating a new one.

Action Parameters

aggregates
array
allowedInCustomDetailFormula
boolean
buckets
array
chart
array
crossFilters
array
customDetailFormula
array
customSummaryFormula
array
currency
string
detailColumns
array
developerName
string
division
string
folderId
string
groupingsAcross
array
groupingsDown
array
hasDetailRows
booleanDefaults to True
hasRecordCount
booleanDefaults to True
historicalSnapshotDates
array
id
stringRequired
name
string
presentationOptions
object
reportBooleanFilter
string
reportFilters
array
reportFormat
stringRequired
reportType
objectRequired
scope
string
showGrandTotal
booleanDefaults to True
showSubtotals
booleanDefaults to True
sortBy
array
standardDateFilter
object
standardFilters
array
topRows
object
userOrHierarchyFilterId
string

Action Response

data
object
successful
boolean
error

Create a note record by posting json data to /sobjects/note. requires content-type header and handles various http statuses (201, 400, 401, 403, 404, 500, 405, 503, 415) signaling success or different error scenarios.

Action Parameters

Id
string
IsDeleted
boolean
ParentId
string
Title
string
IsPrivate
boolean
Body
string
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Retrieve a list of modified sobjects by using “if-modified-since” header or unmodified with “if-unmodified-since”. supports common response codes like 200, 304, and error codes 400, 401, 403, 404, 405, 412, 500, 503.

Action Parameters

Action Response

data
object
successful
boolean
error

Get /sobjects/campaign: retrieves campaign data with responses for success and various errors like missing authorization, not found, and server issues.

Action Parameters

Action Response

data
object
successful
boolean
error

Patch /sobjects/contact/{id}: update specified contact using its id. requires ‘content-type’ header and json request body. possible responses: 204 (success), 400, 401, 403, 404, 405, 415, 500, 503 (errors).

Action Parameters

id
stringRequired
Id
string
IsDeleted
boolean
MasterRecordId
string
AccountId
string
LastName
string
FirstName
string
Salutation
string
Name
string
OtherStreet
string
OtherCity
string
OtherState
string
OtherPostalCode
string
OtherCountry
string
OtherLatitude
integer
OtherLongitude
integer
OtherGeocodeAccuracy
string
MailingStreet
string
MailingCity
string
MailingState
string
MailingPostalCode
string
MailingCountry
string
MailingLatitude
integer
MailingLongitude
integer
MailingGeocodeAccuracy
string
Phone
string
Fax
string
MobilePhone
string
HomePhone
string
OtherPhone
string
AssistantPhone
string
ReportsToId
string
Email
string
Title
string
Department
string
AssistantName
string
LeadSource
string
Birthdate
string
Description
string
OwnerId
string
CreatedDate
string
CreatedById
string
LastModifiedDate
string
LastModifiedById
string
SystemModstamp
string
LastActivityDate
string
LastCURequestDate
string
LastCUUpdateDate
string
LastViewedDate
string
LastReferencedDate
string
EmailBouncedReason
string
EmailBouncedDate
string
IsEmailBounced
boolean
PhotoUrl
string
Jigsaw
string
JigsawContactId
string
CleanStatus
string
IndividualId
string
IsPriorityRecord
boolean
ContactSource
string
Level__c
string
Languages__c
string
attributes__type
string
attributes__url
string

Action Response

data
object
successful
boolean
error

Delete a contact object by id. handles errors: bad request (400), unauthorized (401), forbidden (403), not found (404), internal server error (500), method not allowed (405), service unavailable (503), and unsupported media type (415).

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

Retrieve account details by id, with optional fields and conditional headers. responds with account data or error statuses. supports if-modified/unmodified for data freshness.

Action Parameters

id
stringRequired
fields
string

Action Response

data
object
successful
boolean
error

Retrieve opportunity details by id using get. optional fields and modified-since query supported. responses range from 200 (ok) to 503 (service unavailable), including various client/server errors.

Action Parameters

id
stringRequired
fields
string

Action Response

data
object
successful
boolean
error

Delete /sobjects/account/{id}: removes an account using a unique identifier. requires the ‘id’ path parameter. possible responses include 400, 401, 403, 404, 500, 405, 503 (errors) and 204 (success).

Action Parameters

id
stringRequired

Action Response

data
object
successful
boolean
error

Access notes with /sobjects/note. possible responses range from 200 (ok) to 503 (service unavailable) and return json data.

Action Parameters

Action Response

data
object
successful
boolean
error

Retrieve a specific note object by id with optional field selection and conditional retrieval based on modification time. supports standard http response codes to indicate success or issues with the request.

Action Parameters

id
stringRequired
fields
string

Action Response

data
object
successful
boolean
error

Retrieve opportunities data. supports http 200 for success; errors return 304, 400, 401, 403, 404, 405, 412, 500, or 503 statuses with respective descriptions. response in json.

Action Parameters

Action Response

data
object
successful
boolean
error