Skip to content

cloud-elements/intro-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud Elements Starter App

This basic application demonstrates how some of the fundamental features of the Could Elements platform can be used.

Installation & Setup

  1. If you don't have node and npm installed, do that first.

PROTIP: node version must be >= v4.0.0

Install the node dependencies.

# Navigate to this directory
$ cd intro-app

# Install all necessary npm packages:
$ npm install
  1. Create an https tunnel and point it to your localhost

Hint: Use ngrok.io

  1. Create a Salesforce app per these instructions: https://developers.cloud-elements.com/docs/elements/salesforce/salesforce-endpoint-setup.html and write down the clientId and secret. Enter a redirect URI in the Salesforce app that has this structure: ngrokTunnel + "/callback"

  2. Create a Cloud Elements environment at cloudelements.io and retrieve the User and Org secrets

  3. The app will run on localhost:3000 - if you use a different port, change it in your .env file or directly in the app.js.

  4. Add the ngrok tunnel and relevant Cloud Elements and SalesForce secrets and tokens to your .env file. Or add them directly to the application.

NGROK=https://12345xyz.ngrok.io
CE_USER_SECRET=your-secret-here
CE_ORG_SECRET=your-org-secret
SFDC_APP_KEY=your-sfdc-key
SFDC_APP_SECRET=your-sfdc-secret
PORT=3000

Leave the sfdcToken and the authHeaderSFDC blank. TIP: After adding your keys & secrets, add the .env file to your .gitignore file.

  1. Run the application
$ node app.js

Using the App

  1. Click the Salesforce icon to create an instance.

  2. Create an organization level transformation for the SFDC instance and map it in the console. Name it commonContact and it should only have the fields firstname, lastname, and email (mapped to FirstName, LastName, and Email)

  3. Enter a contact's first, last name, and email to create a contact from the app UI.

  4. Enter a contact in the Salesforce account. Wait 2 minutes and then click on the "Get Contact" download button.

About

A starter application for using Cloud Elements integrations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published