Atmosphere® Integration for Salesforce Quick Start Guide

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

1.Go to Setup->Apps->App Manager

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 value as https://www.getpostman.com/oauth2/callback

4. Click on Save to get the following page:

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

The above functionality has been created in a Salesforce sandbox

Getting access token from Salesforce through REST API

  1. 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.

2. Change the Authorization type to OAuth2.0.

3.Enter the following URL

https://test.salesforce.com/services/oauth2/token?grant_type=password&client_id=<Your Salesforce Consumer ID>

&client_secret=2084690B975F5979CF7BF316DA35209EB3E40EDFCB1127BD4067183649D6FB5A

&username=<Your Salesforce Login>&password=<Your SalesForce Password>

 

 

 Response

{

“access_token”: “00D0n0000000PTP!AQIAQAu4SllatFOZjFeer_QIzDu__DfYvlKBFpKXXXXXXXXXXXXXXXXXXXXX”,

“instance_url”: “https://<Your Salesforce Instance>.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://intelepeerdev–GyanSysDev.my.salesforce.com/services/apexrest/restApiTextSms

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. Enter another key as content type and assign its value as application/json.

1. Click on body

2. Enter the parameters in json Format.

3. Click on send.

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

Link:https://intelepeerdev–GyanSysDev.my.salesforce.com/services/apexrest/restApiTextSms

Authorization:

Bearer 00D0n0000000PTP!AQIAQDPwh.SjwLKwPubL3eK41Ab7fWeBPwjq0r6XHZADyq2xDU87mfRNnMeZeTOQcpoQfHVxVYh49EoIE9COnAunyzka5hSb

Contect-type: application/json

Body:

{

“contactDetails”:”7685310975″,

“textBody”: “hiiieee”

}

Response

“success”

Changes Reflected in Salesforce

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

Outbound message:

{

“ANI”:”<SMS Recipient Phone Number>″,

“msgBody”: “testing for outbound message”,

“DNS”:”+<SMS From Number>”,

“flowId”:”<Atmosphere SmartFlows Id”

}