what is salesforce ?
Salesforce is a cloud-based customer relationship management (CRM) platform that helps businesses manage and analyze customer interactions and data. It provides a suite of tools and services designed to assist organizations in various aspects of their sales, marketing, customer service, and overall business operations. Salesforce is known for its flexibility, scalability, and customization capabilities, making it suitable for businesses of all sizes and industries.
Prerequisites:
- AnyPoint Studio
- Salesforce developer account
- Security token
Salesforce:
Create an account ondevelopers.salesforce.com.
On the home page, click on My Settings located in the top right corner under your name after you sign in.
Go to the Personal Tab and select “Reset My Security Token.” You will get the security token in the registered mail id.
Create a New Mule Project
Open Anypoint Studio. Click on “File” > “New” > “Mule Project.” Enter a project name and click “Finish.”
Drag and drop Salesforce Connector
Add a connector configuration and select Salesforce: Basic Authentication.Enter your username, password, and security token.
Then click on Validate Configuration to test the connection.
Query:
Query is a connector which is similar to db query but this connector we use to execute salesforce query(SOQL). We use a query connector to get the details of the salesforce object.
Example Query: SELECT Id, Name, BillingCity FROM Account.
Add the Connector configuration and Salesforce Select query.
Response payload:
Create Operation:
Creating anew records Account in Salesforce.
Before calling Create connector place a ‘Transform Message’ component for the request payload. Below is the snapshot of the details.
Add the Connector configuration select the type as ‘Account’.
Go to the Postman and hit the endpoint. Now account is created in Salesforce.