Salesforce integration #577
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to support the ExperienceCS customer success team, this PR ensures that newly-verified School records are synchronised into Salesforce as
Account
records.Setting up a Salesforce account and application in the Sandbox
The RPF sandbox salesforce environment is here: https://raspberrypi--digital.sandbox.lightning.force.com
Step 1
Liesl Quinn created me an account using my
[email protected]
email address. She sent me a password reset email to allow me to set a new password, and changed my profile to allow API access.Step 2
Once in salesforce I needed to
View profile > My personal information > Reset my security token
to generate a new security token.Step 3
I then visited
Setup > Setup for current app > platform tools > Apps > External Client Apps > Settings
and enabled "Allow creation of connected apps".I clicked "New Connected App"
I created an
editorapi
app with OAuth settings:I copied the Consumer key and secret from "Manage consumer details".
Connecting to salesforce using
restforce
With the above in place I was able to use
restforce
to connect to salesforce:Where
username
andpassword
are from step 1,security_token
from step 2 andclient_id/client_secret
from step 3 above. Note that thehost
is not the same as the URL you use to login to salesforce,lightning.force.com
is replaced withmy.salesforce.com
.I could then create an
Account
in Salesforce withTODO
editorapi
application with correct usereditorapi
to the minimum required (currently "Full access" in the salesforce sandbox)Client
records in Salesforce or if these are already created as part of another sync.Application
record in Salesforce. This is suggested in the google sheet Jason and Emma put together, but I can't see it defined in the sandbox environment