Analyzes all your Atlassian Marketplace data, generates contacts/deals, and puts them into HubSpot.
More specifically:
- Downloads and analyzes HubSpot and Atlassian Marketplace data
- Generates contacts from all License/Transaction contact info
- Identifies and flags Contact-Type for each Contact/Company
- Matches up related MPAC events via similarity-scoring
- Updates Contacts based on match results
- Generates Deals based on match results
- Upserts all generated/updated HubSpot data entities
This runs in an ENV-configurable loop.
Read about the engine logic in detail in docs/ENGINE.md.
Implemented in Node.js (TypeScript) and can build a Docker image (hosted by GitHub).
See docs/HUBSPOT.md.
Install Node.js 16+ and NPM 7+
Copy .sample.env to .env and set values.
Install dependencies:
$ npm installCompile TypeScript in background:
$ npm run watchFor general development:
$ npm run download # Download MPAC & HubSpot data
$ npm run once [fast] # Dry-run engine once on cached inputs
$ npm run 3x [fast] # Dry-run engine 3x, piping output to input- Data must be downloaded before local dry-runs
- Engine log files are written under
data/[input-dir]/[log-dir]/ - Running with
fastskips time-consuming logs
Running tests:
$ npm run test # Run once
$ npm run test -- --watchAll # Run during dev$ node out/bin/main.js # This always uses live inputs/outputsSee Analyse Data Shift docs for this sub-functionality.
- Fixed bug preventing
HUBSPOT_ASSOCIATION_TYPE_MAPPINGSfrom being used
- Changed Contact 'Deployment' field; see field in HUBSPOT.md for details
- Fixed bug that might have prevented some multi-select fields from updating
- Fixed bug that crashed the engine when deals have duplicates and they all have some manual activity
- Deprecated
HUBSPOT_API_KEYin favor ofHUBSPOT_ACCESS_TOKENwith private apps - Added support for custom HubSpot API associations via ENV variable
HUBSPOT_ASSOCIATION_TYPE_MAPPINGS
- Added Managed Fields; see HUBSPOT.md for details
- Added
KEEP_DATA_SETSENV variable. - Added
LATE_TRANSACTION_THRESHOLD_DAYSENV variable. - Added
npm run analyze-data-shifttask. - Main loop now analyzes and reports on data shift.
- Docker image now requires persistent
./datadirectory - Engine logs now written to input subdirectory
- Fixed occasional bug when writing large log files
- Removed
logleveloption- Info statements are now logged to stdout
- Warnings and errors are now logged to stderr
- Verbose logs are now written to log files
- Removed
savelogsoption- Now always saves all logs
- Added
fastoption to skip slow logs
CLI changes:
- Renamed
npm starttonpm run once. - Renamed
npm run multipletonpm run 3x. - Added
helpoption. - Added
savelogs=somediroption. - Removed
--cached-fnsoption. - Removed
--inand--out.npm run oncealways uses local IO (for local development)- Docker image always uses remote IO (for production)
- Removed
--prefix from CLI arguments
ENV changes:
- Renamed ENV variables
MPAC_PASStoMPAC_API_KEY - Added new HubSpot keys (see HUBSPOT.md)
Engine changes:
- Added optional "Associated Partner" keys on Deals and Contacts.
- Fixed bug where refunds sometimes weren't being processed by MAE.
- Deals now always use transaction ID when available.
- Refunded deals now have their amounts set to zero.
- Purchased inactive licenses are set to closed-won if not refunded.
- Sped up license scorer down to 12% original run time in some cases.
- Fixed bug where duplicate deals were not correctly identified.
- Fixed bug that sometimes didn't print some duplicate deals.
- First public version