Salesforce Component
Query, create, update or delete Salesforce records
Component key: salesforceDescription
Salesforce is a customer relationship management (CRM) platform. This component gives you the ability to manage sales leads and records within the Salesforce platform.
This component includes CRUD (create, read, update, delete) actions for records and a create action for leads. For more complex queries, you can use Salesforce Object Query Language and the query action of this component.
Listening for events in Salesforce
Salesforce can notify you when a record is created, updated, deleted, or undeleted. To listen for these events, you can use the Outbound Messaging feature of Salesforce.
Within an instance deploy-triggered flow, you can Create a Workflow Outbound Message that points to a sibling flow within your integration. Then, you can Create a Workflow Rule using that outbound message name.
When you create a workflow rule, you specify which conditions cause the rule to run. When those conditions are met, Salesforce sends an outbound message to the URL you specified in the outbound message.
For an example integration that uses outbound messaging, see our examples repo in GitHub.
Connections
Salesforce Basic Connection
If you select Basic Auth, you will need to supply your Salesforce username and a password. Depending on your Salesforce setup, your password may have a security token attached to it. If security tokens in your Salesforce account are disabled, the password you need to supply is simply your Salesforce password. If security tokens are enabled in your Salesforce account, then the password you need to enter is the concatenation of your password and your security token.
For example, if your Salesforce password is p@$sw0rD
and the security token that Salesforce provides is ExAmPlE0000000000ExAmPlE
, then you should enter p@$sw0rDExAmPlE0000000000ExAmPlE
as your password in Prismatic.
You can manage security tokens by clicking your profile picture on the top-right of Salesforce, select My Settings, and then open Personal -> Reset My Security Token.
Salesforce OAuth 2.0
If you select OAuth 2.0, you will need to create and configure a Connected App within Salesforce. When you create your "Connected App" be sure to check Enable OAuth Settings, and enter Prismatic's OAuth callback URL - https://oauth2.prismatic.io/callback - as a Callback URL. Consult Salesforce to determine the proper OAuth Scopes to assign - to grant your integrations the same permissions that the user authenticating through OAuth has, select Full access (full). Also select Perform requests at any time. Select Require Secret for Web Server Flow and Require Secret for Refresh Token Flow:
Once the app has been created, you will be provided with a Consumer Key and Consumer Secret. Take note of these keys:
If you need to return to this screen, click PLATFORM TOOLS -> Apps -> App Manager, click the dropdown menu to the right of your app and select Edit. From there you can manage callback URLs. Click Save and then Manage Consumer Details to view the consumer key and secret again.
Now, configure OAuth 2.0 settings in Prismatic.
Add a Salesforce action to your integration. This will automatically create a connection config variable for Salesforce. Enter the Consumer Key and Consumer Secret that you noted previously.
You should now be able to authenticate a user through Salesforce using OAuth 2.0.
If you would like to connect to a Salesforce sandbox organization for testing purposes, edit your connection's Authorize URL, Token URL and Revoke URLs to read test.salesforce.com
instead of login.salesforce.com
.
Be sure to change these values back when your testing is done.
Triggers
Webhook
Trigger for handling webhook requests from the Salesforce platform. Returns the expected response to Salesforce and converts the XML payload to an object for more convenient use in the rest of the flow. | key: webhook
Data Sources
Record Type Field Preview
A list of fields of the specified Record Type for use as a preview during configuration. | key: previewRecordTypeFields | type: picklist
Record Type Field Value Preview
A list of values of the specified Record Type field for use as a preview during configuration. | key: previewRecordTypeFieldValues | type: picklist
Record Type Fields
A map of a list of fields to Salesforce Record Type fields. | key: mapRecordTypeFields | type: objectFieldMap
Record Types
A subset of Salesforce Record Types. | key: selectRecordTypes | type: objectSelection
Record Types With Fields
A subset of Salesforce Record Types. | key: selectRecordTypesWithFields | type: objectSelection
Actions
Add Attachment
Attach a file attachment to an account, opportunity or contact | key: addAttachment
Add User Permission Set
Adds a Permission Set to the specified User | key: addUserPermissionSet
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Create Account
Create a Salesforce Account Record | key: createAccount
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Create Contact
Create a Salesforce contact | key: createContact
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Create Customer
Create a Salesforce customer account | key: createCustomer
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Create Lead
Create a Salesforce Lead Record | key: createLead
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Create Opportunity
Create a Salesforce Opportunity Record, which is a sale or pending deal | key: createOpportunity
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Create Profile
Create a Salesforce Profile | key: createProfile
Create Record
Create a Salesforce Record | key: createRecord
Create User
Create a Salesforce User | key: createUser
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Create Workflow Outbound Message
Create a Workflow Outbound Message | key: createWorkflowOutboundMessage
Create Workflow Rule
Create a Workflow Rule | key: createWorkflowRule
Delete Account
Delete an existing account record | key: deleteAccount
Delete Contact
Delete an existing contact record | key: deleteContact
Delete Customer
Delete an existing customer account record | key: deleteCustomer
Delete Lead
Delete a Salesforce Lead Record | key: deleteLead
Delete Opportunity
Delete an existing opportunity record | key: deleteOpportunity
Delete Profile
Delete a Salesforce Profile | key: deleteProfile
Delete Record
Delete an existing Salesforce Record | key: deleteRecord
Delete Workflow Outbound Message
Delete a Workflow Outbound Message | key: deleteWorkflowOutboundMessage
Delete Workflow Rule
Delete a Workflow Rule | key: deleteWorkflowRule
Describe Object
Describe attributes of a Salesforce Record Type | key: describeObject
Describe Permissions
Describe permissions of a Salesforce Record Type | key: describePermissions
Find Record
Find a single Salesforce Record | key: findRecord
Find Records
Find and fetch Salesforce Records | key: findRecords
Get Attachment
Get a file attachment from an account, opportunity or contact | key: getAttachment
Get Current User
Return information about the current session's user | key: getCurrentUser
Get Record
Get a single Salesforce Record by Id | key: getRecord
List Workflow Outbound Messages
List all Workflow Outbound Messages | key: listWorkflowOutboundMessages
List Workflow Rules
List all Workflow Rules | key: listWorkflowRules
Metadata API: Create Fields
Create custom fields from metadata | key: createFieldsFromMetadata
Metadata API: Create Objects
Create custom objects from metadata | key: createObjectsFromMetadata
Metadata API: List Object Metadata
Get all metadata for all objects (standard and custom) | key: listObjectMetadata
Metadata API: Read Metadata of Object
Get the metadata of an object by full name | key: getObjectMetadataByName
Raw Request
Send a raw HTTP request to Salesforce API | key: rawRequest
Remove User Permission Set
Removes a Permission Set from the specified User | key: removeUserPermissionSet
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Salesforce Query
Run an SOQL Query Against SalesForce | key: query
Send Transactional Email
Sends a message to a single recipient via Salesforce | key: sendTransactionalEmail
Subscribe to Record Change
Create a workflow rule to subscribe to Record Changes in Salesforce. | key: subscribeToRecordChange
Update Account
Update an existing account record | key: updateAccount
Update Contact
Update an existing contact record | key: updateContact
Update Customer
Update an existing customer account record | key: updateCustomer
Update Lead
Update a Salesforce Lead Record | key: updateLead
Update Opportunity
Update an existing opportunity record | key: updateOpportunity
Update Profile
Update a Salesforce Profile | key: updateProfile
Update Record
Updates an existing Salesforce Record | key: updateRecord
Update User
Update a Salesforce User | key: updateUser
Output Example Payload
{
"data": {
"id": "06Q606ExampleId",
"success": true
}
}
Upsert Record
Updates a Salesforce Record if it exists, otherwise creates a new Salesforce Record | key: upsertRecord
Validate Connection
Returns a boolean value that specifies whether the provided Connection is valid | key: validateConnection