Skip to content

Latest commit

 

History

History
84 lines (50 loc) · 3.5 KB

working-with-environments.md

File metadata and controls

84 lines (50 loc) · 3.5 KB

Back to main page

Working with environments to connect to multiple Salesforce orgs

You can use the Postman desktop app with 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. Using a browser, sign up/in to Postman.

  2. Open the main collection with this link.

  3. Select the Environments tab (item A in following screenshot)

  4. Click Salesforce Environment Template (B)

  5. Click on the “three dots” icon on the right (C) and select Export from the menu.

    Export environment screenshot

    This downloads a Salesforce Template Environment.postman_environment.json file.

  6. Close the browser tab. We'll continue the installation on the Postman app.

  7. In the Postman app, click Import.

  8. Drag and drop the JSON file you just downloaded in the gray zone.

  9. Click Import.

Configure the Environment

  1. Click on the Manage Environment icon

    Manage environment screenshot

  2. Click on the Duplicate Environment icon next to the Salesforce Template Environment

    Duplicate environment screenshot

    This creates a Salesforce Environment Template Copy template.

  3. Click Salesforce Environment Template Copy.

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

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

    Variable Current Value
    url Either:
    - https://test.salesforce.com for sandboxes or Scratch orgs.
    - https://login.salesforce.com for production, Trailhead Playground and Developer Edition orgs.
    - your custom My Domain URL.
    username Your username
    password Your password
    secretToken Your personal security token (if required by your org)
  6. Click Update and close the environments dialog.

  7. Select your environment from the environment dropdown.

    Select environment screenshot

Change the Collection Authorization Type

  1. Move your mouse over the “Salesforce APIs” collection, click on the “three dots” icon next to it and select Edit from the menu.

    Edit collection screenshot

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

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

  4. Click Update

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