Skip to content

Latest commit

 

History

History
76 lines (46 loc) · 3.13 KB

working-with-environments.md

File metadata and controls

76 lines (46 loc) · 3.13 KB

Back to main page

Working with environments to connect to multiple Salesforce orgs

You can use Postman environments to work with multiple Salesforce orgs in parallel.

⚠️ Using environments means that you will store Salesforce credentials in clear in Postman. Do this at your own risks.

Import the Template Environment

  1. Open the master collection from the Salesforce Developers workspace with this link or using Postman's search bar.

  2. Fork the Salesforce APIs Environment Template environment:

    1. Select the Environments tab.
    2. Click Salesforce APIs Environment Template.
    3. Click Fork.

    Export environment screenshot

    1. Enter a label for your fork (e.g.: “My fork”).
    2. Select the workspace that contains your working copy of the collection.
    3. Click Fork Environment.

Configure the Environment

  1. Click on the “three dots” icon on the right and select Duplicate from the menu.

    Duplicate environment screenshot

    This creates a Salesforce Environment Template Copy template.

  2. Click Salesforce APIs Environment Template Copy.

  3. Rename the environment with something meaningful in relation with your Salesforce org (e.g.: “Playground 1”).

  4. Set values in the CURRENT VALUE column for the following variables:

    Variable Current Value
    url Either:
    - https://MyDomainName--SandboxName.sandbox.my.salesforce.com for sandboxes or Scratch orgs.
    - https://MyDomainName.my.salesforce.com for production, Trailhead Playground and Developer Edition orgs.
    username Your username
    password Your password
    secretToken Your personal security token (if required by your org)
  5. Click Save.

  6. Select your environment from the environment dropdown.

    Select environment screenshot

Change the Collection Authorization Type

  1. Navigate to the Collections tab and select your collection.

  2. In the Authorization tab, select Bearer Token as the authorization type.

    Change collection authorization screenshot

  3. Enter {{_accessToken}} for the Token value.

  4. Click Save

Authenticate with Salesforce

  1. Open the collection’s Auth folder and select the SOAP Login request
  2. Click Send

At this point, if your environment is correctly set up, you should see a 200 OK status. This means that you have successfully authenticated with Salesforce and that you can now use the other collection’s requests.

Authenticate screenshot

Back to main page