# Execute Composite Request In Salesforce

MuleSoft Salesforce connector helps you to work with Salesforce Batch and sobject Tree API’s 

Prerequisites:
- Salesforce Developer Account 
- Installing salesforce connector (by login into Anypoint exchange from studio you can install the salesforce connector)
-  Authentication OAuth Username and Password.
          Username
          Password
          Consumer Key
          Consumer Secret
          Security Token
          Token Endpoint

As we need to Create, Get, Update and Upsert Account in Salesforce using execute Composite Request in Salesforce 

Create a Project in Anypoint Studio and drag and drop the salesforce Execute Composite Request 

![Screenshot 1944-02-05 at 11.33.59 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1650909897111/ww7Yzk6gp.png)
- Configure the connection details for Salesforce and use OAuth Username and Password 
![Screenshot 1944-02-12 at 8.16.02 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1651502780382/lC7o8cgK8.png align="left")

-  Create the payload to CREATE the Account in Salesforce
		url: "/services/data/v50.0/sobjects/Account"

![Screenshot 1944-02-06 at 12.11.48 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1650912121940/D4U8pkqaZ.png)


- Create the payload to UPDATE the Account in Salesforce
		url: "/services/data/v50.0/sobjects/Account/{Id}"

![Screenshot 1944-02-12 at 8.08.16 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1651502334189/_McujGSLf.png align="left")


- Create the payload to UPSERT the Account in Salesforce
      1. url: "/services/data/v50.0/sobjects/Account/EXTERNALId/{Id}"
      2. EXTERNALId : it can be Id or External_Id Type


![Screenshot 1944-02-12 at 8.12.21 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1651502567912/kOc9v7Sue.png align="left")

