info@getoncrm.com
+91-7405042484
GetOnCRM Solutions
  • Company
    • About
  • Services
    • Salesforce Sales Cloud
    • Salesforce Service Cloud
    • Salesforce Community Cloud
    • Salesforce Lightning
    • Salesforce Pardot
    • Salesforce CPQ
    • Contract Lifecycle Management
    • Salesforce Appexchange
    • Salesforce Integration
    • Data Management
    • Salesforce Mobile Application
    • Salesforce Commerce Cloud
    • Apttus CPQ
    • Salesforce Einstein
    • Salesforce Marketing Cloud
  • Case Study
  • Blog
  • Career
  • Contact Us
  • Let’s talk
GetOnCRM Solutions
  • Company
    • About
  • Services
    • Salesforce Sales Cloud
    • Salesforce Service Cloud
    • Salesforce Community Cloud
    • Salesforce Lightning
    • Salesforce Pardot
    • Salesforce CPQ
    • Contract Lifecycle Management
    • Salesforce Appexchange
    • Salesforce Integration
    • Data Management
    • Salesforce Mobile Application
    • Salesforce Commerce Cloud
    • Apttus CPQ
    • Salesforce Einstein
    • Salesforce Marketing Cloud
  • Case Study
  • Blog
  • Career
  • Contact Us
  • Let’s talk
GetOnCRM Solutions
  • Company
    • About
  • Services
    • Salesforce Sales Cloud
    • Salesforce Service Cloud
    • Salesforce Community Cloud
    • Salesforce Lightning
    • Salesforce Pardot
    • Salesforce CPQ
    • Contract Lifecycle Management
    • Salesforce Appexchange
    • Salesforce Integration
    • Data Management
    • Salesforce Mobile Application
    • Salesforce Commerce Cloud
    • Apttus CPQ
    • Salesforce Einstein
    • Salesforce Marketing Cloud
  • Case Study
  • Blog
  • Career
  • Contact Us
  • Let’s talk
  • Company
    • About
  • Services
    • Salesforce Sales Cloud
    • Salesforce Service Cloud
    • Salesforce Community Cloud
    • Salesforce Lightning
    • Salesforce Pardot
    • Salesforce CPQ
    • Contract Lifecycle Management
    • Salesforce Appexchange
    • Salesforce Integration
    • Data Management
    • Salesforce Mobile Application
    • Salesforce Commerce Cloud
    • Apttus CPQ
    • Salesforce Einstein
    • Salesforce Marketing Cloud
  • Case Study
  • Blog
  • Career
  • Contact Us
  • Let’s talk
Blog
Home Salesforce Integration How to do Integration of Salesforce with Ruby on Rails?
Salesforce Integration

How to do Integration of Salesforce with Ruby on Rails?

getoncrm October 17, 2019 0 Comments

Salesforce integration with ROR creates a Connected app in our salesforce org.

How to Create Connected Apps in Salesforce

To create Connected Apps in Salesforce, do the following:

Log in to Salesforce as an administrator.

In the drop-down list of the account (in the upper-right corner), select Setup.

In the left-hand pane, go to App Setup > Create >Apps.

In the Connected Apps panel, click the New button.

blog image

On the New Connected App page, fill the following required fields under Basic Information:
     Connected App Name. For example, REST Integration.
     API name. For example, REST_ Integration.
     Contact Email.

blog image

Go to API (Enable OAuth Settings), and select Enable OAuth Settings.
In the Callback URL field, enter https://login.salesforce.com/services/oauth2/token

In the Selected OAuth Scopes field, select Access and manage your data (api), Full Access (Full), Perform request on your behalf  at any time (refresh_token, offline_access) and then click Add.

blog image

Click the Save button to save the new Connected App.
In the Connected Apps list, find the App that you just created, and then click Manage.
On the page that opens, click the Edit button.
Under OAuth policies, select All users may self-authorize in the Permitted Users list, and then click the Save button.

blog image

Click on Custom Apps. Go back to the Connected Apps list, and click the App that you just created.

blog image

Go to API (Enable OAuth Settings), and note down the Consumer Key and Consumer Secret, which will be used for the configuration of Credential in REST_ Integration.

blog image

Now Generate Access Token using POSTMAN Application
Select POST Method and Pass URLhttps://login.salesforce.com/services/oauth2/token
Select Body and Select x-www-from-urlencoded
Pass KEY and VALUE as below and Where Red characters in VALUE, pass actual values

KEY VALUE
grant_type – password
client_id –  consumer key
client_secret – consumer secret key
username – user name
password – password+security token without space
How to get security token in Salesforce Org :-

User Menu> My Setting>Personal>Rest My Security Token and click on Reset Security Token
You get Security Token on your email id

blog image
blog image

When you Click on Send you get Access_Token  as below which will be help to update your data on Contact object

blog image

1. How to rubby on rail create access_token of salesforce

blog image

2. Create REST services apex class in our org.

  • Create Require JSON to update Contact object’s Fields

Create Require JSON to update Contact object’s Fields
{
"completed_at" : "complete at on",
"distribution_link" : "https://www.google.com/",
"Email" : "george1234@gmail.com",
"loyalty_level" : "text level",
"Name" : "John Methw",
"seq_test_nps_level_c" : "test score nps level",
"seq_nps_score" : 987,
"seq_score" : "test score"

}

Create REST API @HttpPost using below link example
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_code_sample_basic.htm
Create Test class for REST API
Now How to update data using POSTMAN Application 
Select POST Method and Pass URL 
Instacne_url which we generate +/services/apexrest/+ url mapping which we use in REST API in our class
Example:- https://ns123.salesforce.com/services/apexrest/updateContact
Pass KEY and VALUE as below and Where Red characters in VALUE, pass actual values

KEY VALUE
Authorization Bearer and pass access_token with one space
Content-Type application/json

blog image

Now Select Body and pass in Body require json. Select row and Select JSON(application/json)

Click on Send 

You get success message of post request

blog image
Salesforce Integration
16
1203 Views
Introduction of Salesforce Einstein. How it is useful to boost your sales?PrevIntroduction of Salesforce Einstein. How it is useful to boost your sales?October 15, 2019
GetOnCRM Solutions have Successfully Launched CRP Analyst App on AppExchangeOctober 18, 2019GetOnCRM Solutions have Successfully Launched CRP Analyst App on AppExchangeNext

Related Posts

Salesforce Integration

Building Angular Applications on Salesforce

In this post, I am going to share the information about salesforce...

getoncrm September 26, 2019
Salesforce Integration

Integration of Salesforce With Dialogflow to Build Action For Google Home Assistant

Prerequisites :- 1.Google dialogflow account 2.npm 3.ngrok.exe This...

getoncrm July 26, 2019

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts
  • How Salesforce Community Cloud Help Nonprofit Organizations?
  • Most Popular Salesforce Integration For Your Business
  • Salesforce Community Cloud: Why It Is Important For Your Business?
  • Ways how CRM software converts leads into opportunities
  • Reasons Why CRM Is Essential For SMBs
Categories
  • Apttus 1
  • Contract Lifecycle Management 1
  • CRM 4
  • Sales Cloud 1
  • Salesforce 23
  • Salesforce AppExchange 2
  • Salesforce Commerce Cloud 3
  • Salesforce Community Cloud 4
  • Salesforce CPQ 9
  • Salesforce CRM 5
  • Salesforce Einstein 3
  • Salesforce Integration 9
  • Salesforce Lightning 10
  • Salesforce Mobile App 6
  • Salesforce Pardot 5
  • Service Cloud 3

We are a global Salesforce consulting company that serves a broad mix of businesses, ranging from startups to big corporations. We help our clients make significant and lasting improvements to their performance and realize their most important goals, using Salesforce as a platform to enable digital processes.

  • About
  • Career
  • Services
  • Case Study
  • Blog
  • Contact Us
  • Let’s Talk
GetOnCRM Solutions
INDIA
Ahmedabad: B/706, Ganesh Plaza, Nr. Navrangpura Bus Stand, Navrangpura, Ahmedabad, Gujarat-380009,India.
info@getoncrm.com
minkesh.asc
info@getoncrm.com            
minkesh.asc
+91-7405042484
info@getoncrm.com            
minkesh.asc
Vadodara: 1008, 10th floor, OCEAN, Nr. Centre Square Mall, Sarabhai Compound, Dr. Vikram Sarabhai Marg, Vadodara, Gujarat, India.
USA
Address: 3080 Cowper Street Palo Alto, California 94306, USA
+1 (650) 704-5436
CANADA
Address: 1204 29 Ave NW Edmonton, AB T6T 0K8, Canada
+1 (250) 329-6480

Terms of use | Privacy Environmental Policy

Copyright © 2020 GetonCRM.  All Rights Reserved.

Copyright © 2020 GetOnCRM.  All Rights Reserved.

Copyright © 2019 GetOnCRM.
All Rights Reserved.

Book a Consultation

    We use cookies to deliver the best possible experience to you. By using our website, you agree to the use of cookies Find out more.