Execute Composite Request In Salesforce

Table of contents

No heading

No headings in the article.

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

  • Configure the connection details for Salesforce and use OAuth Username and Password Screenshot 1944-02-12 at 8.16.02 PM.png

  • 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

  • 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

  • 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