No description, website, or topics provided.
JavaScript Makefile HTML
Switch branches/tags
rh-release-99.99.0-rc1 rh-release-8.8.92-rc1 release-88.88.0-rc1 release-87.87.0-rc1 release-13.18.0-rc1 release-10.18.0-rc2 release-10.18.0-rc1 release-9.18.0-rc1 release-8.18.0-rc1 release-4.3.0-rc1 release-3.18.0-rc3 release-3.18.0-rc2 release-3.18.0-rc1 release-3.17.3 release-3.17.3-rc1 release-3.17.2 release-3.17.2-rc2 release-3.17.2-rc1 release-3.17.1 release-3.17.1-rc1 release-3.17.0 release-3.17.0-rc6 release-3.17.0-rc5 release-3.17.0-rc4 release-3.17.0-rc3 release-3.17.0-rc2 release-3.17.0-rc1 release-3.16.5-rc1 release-3.16.4 release-3.16.4-rc1 release-3.16.3 release-3.16.3-rc1 release-3.16.2 release-3.16.2-rc1 release-3.16.1-rc1 release-3.16.0 release-3.16.0-rc7 release-3.16.0-rc6 release-3.16.0-rc5 release-3.16.0-rc4 release-3.16.0-rc3 release-3.16.0-rc2 release-3.16.0-rc1 release-3.15.2 release-3.15.1-rc1 release-3.15.0-rc2 release-3.15.0-rc1 release-3.14.0-rc4 release-3.14.0-rc3 release-3.14.0-rc2 release-3.14.0-rc1 release-3.13.1-rc1 release-3.13.0 release-3.13.0-rc4 release-3.13.0-rc3 release-3.13.0-rc2 release-3.13.0-rc1 release-3.12.0-rc3 release-3.12.0-rc2 release-3.12.0-rc1 release-3.11.1 release-3.11.0 release-3.11.0-rc4 release-3.11.0-rc3 release-3.11.0-rc2 release-3.11.0-rc1 release-3.10.1 release-3.10.1-rc3 release-3.10.1-rc2 release-3.10.1-rc1 release-3.10.0 release-3.10.0-rc3 release-3.10.0-rc2 release-3.10.0-rc1 release-3.9.1 release-3.9.0 release-3.9.0-rc4 release-3.9.0-rc2 release-3.9.0-rc1 release-3.8.0 release-3.8.0-rc4 release-3.8.0-rc3 release-3.8.0-rc2 release-3.8.0-rc1 release-3.7.1 release-3.7.0 release-3.7.0-rc4 release-3.7.0-rc2 release-3.7.0-rc1 release-3.7.0-dr2 release-3.6.0 release-3.6.0-rc5 release-3.6.0-rc4 release-3.5.3-rc1 migrate_to_express_4 0.0.1
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
public
test/unit
.gitignore
.jshintrc
.travis.yml
CONTRIBUTING.md
Gruntfile.js
LICENSE.txt
Makefile
README.md
application.js
main.js
package.json

README.md

SalesForce Connector API

Dependency Status

Group SalesForce Connector API

Login

The login service exposes SalesForce login directly, when not using FH AAA Authentication.

Endpoint /cloud/login
HTTP Method POST

Request (application/json)

Body
{
  "username": "user1",
  "password": "password1"
}

Response 200 (application/json)

Body
{
  "status": "TODO - accesstoken or something returned??"
}

List Accounts

List SalesForce Accounts

Endpoint /cloud/listAccounts
HTTP Method POST

Request (application/json)

Body
{
  "accessToken": "",
  "instanceUrl": "" 
}

Response 200 (application/json)

Body
{
  "accounts": ["TODO"]
}

Get Account Details

Endpoint /cloud/getAccountDetails
HTTP Method POST

Request (application/json)

Body
{
  "accountId": "",
  "auth": {
    "instanceUrl": "",
    "accessToken": ""
  }
}

Response 200 (application/json)

Body
{
  "account": ["TODO"]
}

List Cases

Endpoint /cloud/listCases
HTTP Method POST

Request (application/json)

Body
{
  "accessToken": "",
  "instanceUrl": "" 
}

Response 200 (application/json)

Body
{
  "cases": ["TODO"]
}

Get Case Details

Endpoint /cloud/getCaseDetails
HTTP Method POST

Request (application/json)

Body
{
  "accountId": "",
  "auth": {
    "instanceUrl": "",
    "accessToken": ""
  }
}

Response 200 (application/json)

Body
{
  "account": ["TODO"]
}

List Campaigns

Endpoint /cloud/listCampaigns
HTTP Method POST

Request (application/json)

Body
{
  "accessToken": "",
  "instanceUrl": "" 
}

Response 200 (application/json)

Body
{
  "Campaigns": ["TODO"]
}

Group Push Topics

Registering a new Salesforce Push Topic to listen for. Part of the salesforce connector is the ability to set up Push Notifications based on an existing topic defined by a developer in Salesforce. To define such a topic - in this example, changes to the Account object:

  1. Log into salesforce

  2. Click username - > Developer Console (pops up)

  3. In dev console popup, Debug -> Open Annon Execute Window

  4. Enter this code, and click execute - you have registered a push topic. Change query to alter data that comes back.

    PushTopic pushTopic = new PushTopic();
    pushTopic.Name = 'AccountChanges2';
    pushTopic.Query = 'SELECT Id, Name FROM Account';
    pushTopic.ApiVersion = 29.0;
    pushTopic.NotifyForOperationCreate = true;
    pushTopic.NotifyForOperationUpdate = true;
    pushTopic.NotifyForOperationUndelete = true;
    pushTopic.NotifyForOperationDelete = true;
    pushTopic.NotifyForFields = 'All';
    insert pushTopic;
  5. Set up environment variables for salesforce topic polling user, INCLUDING security token - process.env.SF_TOPIC_USERNAME, process.env.SF_TOPIC_PASSWORD

  6. Register for this notification in node-salesforce

More info: http://wiki.developerforce.com/page/Getting_Started_with_the_Force.com_Streaming_API

Tests

All the tests are in the "test/" directory. The cloud app is using mocha as the test runner.

Unit tests

npm run serve
npm run unit

or

npm run test

Unit coverage

npm run coverage