@trifinlabs/ramp-salesforce-analytics-api
v2.13.0
Published
RAMP Salesforce analytics API
Downloads
8
Readme
Ramp salesforce analytics api
Installation
Install package
npm i @trifinlabs/ramp-salesforce-analytics-api
Copy environment variables
cat ./node_modules/@trifinlabs/ramp-salesforce-analytics-api/.env.dist >> .env
Fill the variables with your salesforce credentials
SALESFORCE_USERNAME=your-username
SALESFORCE_PASSWORD=your-password
[email protected]
Setup rabbitmq and set rabbitmq dsn to env
RABBITMQ_DSN=amqp://192.168.99.100:5556
Set env
Run
REQUEST_REPORT_QUEUE=request
FETCH_REPORT_QUEUE=fetch
PERSIST_REPORT_QUEUE=persist
and run
node ./node_modules/.bin/report-collector
and
node ./node_modules/.bin/report-fetcher
and
./node_modules/ramp-api-worker/bin/ramp-api-worker-linux ./bin/report-persister
and
./node_modules/ramp-api-worker/bin/ramp-api-worker-linux ./bin/report-runner [-r '0 0 * * *']
Heroku workers
cat ./node_modules/@trifinlabs/ramp-salesforce-analytics-api/Procfile >> Procfile
Development
docker-compose up -d
Workflow
| report-runner.js | -> | report-collector.js | -> | report-fetcher.js | -> | report-persister.js | | --- | --- | --- | --- | --- | --- | --- | | Get all reports | collector queue | run report async | fetcher queue | fetch report result | persister queue | persist report to database |