This repository contains the key code elements necessary for deploying a simple Ruby app to Heroku. The application acts as a simple web-form which posts data to a custom Salesforce Apex Web Service (NewPartnerOnboarding.apxc). In order to use this repository, you will need the following in place:
- A Heroku account with the Heroku CLI installed
- A Salesforce Trailhead playground org or developer edition account
- A can-do attitude 👍
On its own, this app isn't very useful. The bulk of the work comes on the Salesforce end of things, including the configuration of a custom Apex Web Service.
In your Salesforce org, you will need to complete the following app and configuration changes:
- Create a new Campaign record; you'll use the Id from this record in Step 4
- Create a new connected app for authentication into Salesforce
- As the app as configured does not use OAuth authentication, you do not need to include that in your connected app options
- After you create the app, you'll need to capture the Client Key and Secret information. These values belong in your Heroku Config Vars or, locally, your .env file
- Create a new Custom Metadata Type called 'Active Partner Campaign'
- Add two new fields: Campaign Id (text, unique, case-sensitive), Is Active (checkbox)
- Add a new MDT record with the Campaign Id from Step 1 and Is Active value of true
- From the Developer Console, create two new classes (NewPartnerOnboarding and NewPartnerOnboardingTest) from the files in this repository
I've never done this with a button before so here goes nothing!
This application makes use of the restforce Ruby gem. After you deploy your app to Heroku, you will need to update your app's config vars with the necessary information required for password authentication. Reference the restforce README for more details.
Made with ☕️ in Reston