This project is the code for the Salesforce IFTTT Channel and the managed package on the App Exchange.
To setup a local development environment do the following:
-
Clone this repo
-
Start a local Redis server
-
Setup ngrok
- Install ngrok: https://ngrok.com/
- Start ngrok:
ngrok 9000
-
Create a Salesforce OAuth App
- OAuth Callback URL:
https://<YOUR ID>.ngrok.com/services/oauth2/authorized
- OAuth Callback URL:
-
Create a new IFTTT channel for testing: https://developers.ifttt.com/channels
Details > API URL Prefix
=https://<YOUR ID>.ngrok.com
Authentication > Scheme
=My Channel has users with expiring OAuth2 access tokens and uses refresh tokens.
Authentication > OAuth2 Settings > Client ID
=<YOUR OAUTH CLIENT ID>
Authentication > OAuth2 Settings > Client Secret
=<YOUR OAUTH CLIENT Secret>
Authentication > OAuth2 Settings > Authorization URL
=https://<YOUR ID>.ngrok.com/services/oauth2/authorize
Authentication > OAuth2 Settings > Token URL
=https://<YOUR ID>.ngrok.com/services/oauth2/token
-
Install the Salesforce IFTTT Managed Package into a testing org: http://ifttt-salesforce.herokuapp.com/
-
Obtain an Access Token for a user in that testing org
-
Set some env vars for the local Play app:
export IFTTT_CHANNEL_ID=<YOUR IFTTT CHANNEL SLUG> export IFTTT_CHANNEL_KEY=<YOUR IFTTT CHANNEL KEY> export IFTTT_TEST_ACCESSTOKEN=<YOUR TESTING SALESFORCE ACCESS TOKEN>
-
Start the Play app:
./sbt ~run
-
Run the IFTTT Channel Activation Test
-
Setup the IFTTT Triggers and Actions
- TODO
-
Setup sample data on Salesforce for IFTTT tests
- Create 3 new Opportunities with a
Closed/Won
status - Create 3 new
IFTTT Events
objects with thetype
field set totest
- Create 3 new Opportunities with a
-
Run the IFTTT Channel Endpoint Test
Fetch the metadata:
[email protected] SALESFORCE_PASSWORD=password ./sbt force:fetch
Deploy the metadata:
[email protected] SALESFORCE_PASSWORD=password ./sbt force:deploy