Create Records In Salesforce
MuleSoft’s Salesforce Connector helps you to accelerate your Salesforce integrations across Sales Cloud, Service Cloud, Salesforce Platform, and Force.com. The connector gives you access to all Salesforce entities to enable automation of your business processes to help maximize your investments in services and solutions like enabling your sales teams, increasing revenue, and serving your customers better. This connector:
- Provides a powerful solution to implement top Salesforce integration patterns.
- Supports all create, read, upsert, and delete operations across Salesforce objects. Additionally it supports Salesforce’s bulk operations that are optimized for working with large sets of data.
- Enables you to easily leverage custom fields and custom entities to solve integration needs to your custom Salesforce instance.
In this tutorial we will demonstrate how can we Create Records In Salesforce, Create operation Adds one or more new records to your organization’s data.
Prerequisites:
- Installing salesforce connector(by login into anypoint exchange from studio you can install the salesforce connector)
- Salesforce developer account
- Security token
- Consumer key and secret(If you are using the Salesforce connector to access an OAuth API, you also need a consumer key and secret)
As a use case we will create an Account object in Salesforce using Salesforce connector
Create project in Anypoint studio
Drag and drop Salesforce Create Connector
Configure the connection details for Salesforce and use the Basic Username and Password connection(Username,Password,Securitytoken),you can also use other connections as well to do the configuration like Oauth UserName and Password etc
Create the payload to create the Account in Salesforce
Deploy the application and test
Test the API using POSTMAN
Test2 account is created in Salesforce
Could you please include in this example a field that is declared in SalesForce as a Lookup field? Knowing how to map a simple field is easy, once the process is understood. But in real life, there are very few tables that do not include lookups, and there is not any documentation anywhere that effectively demonstrates what you have done here, but that also includes lookups.
Thanks Armin for your suggestion…..point noted and we will update/add tutorial for this suggestion. If you already have something around this, then we are more than happy to publish the same as per our contributory guideline – http://mulesy.com/contributory/