Cumulative Graph Implementation in Tableau
December 7, 2020Consuming REST Web service and publishing to JMS using Mule 4
December 8, 2020Salesforce Integration through Mule 4 :
Salesforce integration Inserting new contact records to Salesforce using Mule4.
Challenges to User/Developer-
Adding the records bypassing all the Validations.
Solution: Salesforce integration
Approach-
Create a mule4 flow to connect to Salesforce for inserting contact records.
Mule Overview –
The mule runtime engine is a lightweight integration engine that runs Mule applications and supports domains and policies. Mule applications, domains, and policies share an XML DSL (domain-specific language).
Mule Applications –
Mule applications connect systems, services, APIs, and devices using API-led connectivity instead of point-to-point integrations. Mule applications provide functionality for message routing, data mapping, orchestration, reliability, security, and scalability.
Technical Solution –
- Create a Mule4 flow in a mule project and add an HTTP Listener component to it.
- Configure the listener by adding the necessary protocol, host and port, and endpoint in the path.
- Add a Transform Message component into the flow and define the Json example which contains Name, Phone, and Email as input metadata.
- Map these Names, Phone, and Email to the Output metadata.
- Add the Create component from the Salesforce module to the flow.
- Provide the connector configuration by entering Username, Password, Security Token and Authorization URL for your Salesforce Account.
- As the expectation is to create contact records select the type as contact and set the records as payload.
- Add another transform message to get the response data from Salesforce.
- Save and run the flow.
Once the build and deployment are successful:
Send the request through postman by giving the necessary host, protocol, and endpoint details which are provided in the HTTP listener.
If the response status is 200OK the data will be consumed and added to the Queue/Topic successfully.
Advantages–
Records can be added to Salesforce efficiently.
Conclusion–
Using this way we can connect to Salesforce easily and insert records to the objects in Salesforce Integration through Mule 4.