Install Atmosphere® for Salesforce Application

Overview

With Atmosphere® Integration for Salesforce, you can easily enable real-time communications into your Salesforce workflows. Build communications-enabled workflows and applications using Salesforce and Atmosphere® SmartFlows and  Atmosphere® Engage.


Integrating with Atmosphere®

 

Getting Started

To get started immediately, log into your Salesforce account, go to Admin Settings.


Connected App Creation

Go to Setup->Apps->App Manager-> click the New Connected App button

 

 

1. Enter the 3 required fields and other fields if you want to.

2. Activate the Enable oAuth Settings.


 

3. Enter the call back URL: https://login.salesforce.com/services/oauth2/token

 

4. Select all the items under the Available OAuth Scopes list and click the Add button to add them to the Selected OAuth Scopes list

 

5. Click on Save to get the following page:

 

 

  1.  

 

 

Use the consumer key, consumer secret, user credential (username, password) to create the request URL to connect to Salesforce.

 

 

 

Getting access token from Salesforce through REST API

 

Open Postman REST client

 

We need to have access-token to make an API call. In this process, we are using Salesforce username, password, consumer key, and consumer secret to achieve it.

 

1. Change the value to POST.

Click the Authorization tab

for the TYPE select Bearer Token

in the Token field enter the access_token returned from the Getting access token from Salesforce through REST API step

 

2. Change the Authorization type to OAuth2.0.

 

3. Enter the following URL: https://login.salesforce.com/services/oauth2/token 

b Enter the following key/value parameters under the Params tab:

Key

Value

grant_type

password

client_id

{your Salesforce Consumer Key – generated from the Connected App Creation step}

client_secret

{your Salesforce Consume Secret – generated from the Connected App Creation step }

username

{your Salesforce user Login}

password

{your Salesforce Password}

 

The above params will generate the correct URL for the request, following is an example of the URL for the access token request:

 

https://login.salesforce.com/services/oauth2/token?grant_type=password&client_id=3MVG9yZ.WNe7cyQBMXq.PrTbt537gjQ1Ms5SdBsrLLmJ7lTo9T.wANyJvboB1BNeKRLKcUdf1cnp_3ZUtAGCO&client_secret=876CF1EA0801B5683C889921FACDF7BB963FC2B21FB9F26893EE7C5D62A5CE53&username=user@intelepeer.com&password=eGqF5k6Xfg69Fb

 

Response

{

“access_token”: “00D0n0000000PTP!AQIAQAu4SllatFOZjFeer_QIzDu__DfYvlKBFpKXXXXXXXXXXXXXXXXXXXXX”,

“instance_url”: “https://.my.salesforce.com”,

“id”: “https://test.salesforce.com/id/00D0n0000000PTPEA2/005A0000000iem0IAA”,

“token_type”: “Bearer”,

“issued_at”: “1548668798292”,

“signature”: “YsLA8OVynXSo3kw4GVgzlWPAKm6Mzt0XXXXXX

}

Connecting to Salesforce using the access token

 

1. Choose request type POST and write the following URL:

https://<Your Salesforce Instance>.my.salesforce.com/services/apexrest/postSms

 

Click the Authorization tab

for the TYPE select Bearer Token

in the Token field enter the access_token returned from the Getting access token from Salesforce through REST API step

2. Click on the header.

 

3. In the header select the key value Authorization and assign its value with the following URL:

Bearer 00D0n0000000PTP!AQIAQDPwh.SjwLKwPubL3eK41Ab7fWeBPwjq0r6XHZADyq2xDU87mfRNnMeZeTOQcpoQfHVxVYh49EoIE9COnAunyzka5hSb

 

4. Add the following key/value parameter

Key

Value

Content-Type

application/json

 

 

 

 

5. Click on body.

 

6. Enter the parameters in json Format.

 

7. Click on send.

 

8. See the status and received values from the API call.

Method: POST

URL:  https://<Your Salesforce instance>.my.salesforce.com/services/apexrest/postsms   

Authorization:

Click the Authorization tab

for the TYPE select Bearer Token

in the Token field enter the access_token returned from the Getting access token from Salesforce through REST API step

              

Header:

Add the following key/value parameter

Key

Value

Content-Type

application/json

 

Body:

Please enter the Salesforce contact’s mobile number for the ANI parameter value:

{

                “ANI”:”+17017318901″,

                “message_Body”: “Hello from Postman send text to Salesforce contact”

}      

 

 
 
Changes Reflected in Salesforce

 

  1. You can see the message received in the chat box.
  2. After the successful API call, a related record is created in the SMS Storage object.