mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Update automatic sales lead importing
Shifting distributions around a bit.
This commit is contained in:
parent
b2bdae274f
commit
102139ce8f
2 changed files with 13 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
// Follow up on Close.io leads
|
// Follow up on Close.io leads
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
if (process.argv.length !== 7) {
|
if (process.argv.length !== 8) {
|
||||||
log("Usage: node <script> <Close.io general API key> <Close.io mail API key1> <Close.io mail API key2> <Close.io mail API key3> <mongo connection Url>");
|
log("Usage: node <script> <Close.io general API key> <Close.io mail API key1> <Close.io mail API key2> <Close.io mail API key3> <mongo connection Url>");
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@ const demoRequestEmailTemplatesAuto2 = ['tmpl_HJ5zebh1SqC1QydDto05VPUMu4F7i5M35L
|
||||||
|
|
||||||
const scriptStartTime = new Date();
|
const scriptStartTime = new Date();
|
||||||
const closeIoApiKey = process.argv[2];
|
const closeIoApiKey = process.argv[2];
|
||||||
const closeIoMailApiKeys = [process.argv[3], process.argv[4], process.argv[5]]; // Automatic mails sent as API owners
|
const closeIoMailApiKeys = [process.argv[3], process.argv[4], process.argv[5], process.argv[6]]; // Automatic mails sent as API owners
|
||||||
const mongoConnUrl = process.argv[6];
|
const mongoConnUrl = process.argv[7];
|
||||||
const MongoClient = require('mongodb').MongoClient;
|
const MongoClient = require('mongodb').MongoClient;
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
const request = require('request');
|
const request = require('request');
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Upsert new lead data into Close.io
|
// Upsert new lead data into Close.io
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
if (process.argv.length !== 9) {
|
if (process.argv.length !== 10) {
|
||||||
log("Usage: node <script> <Close.io general API key> <Close.io mail API key1> <Close.io mail API key2> <Close.io mail API key3> <Close.io EU mail API key> <Intercom 'App ID:API key'> <mongo connection Url>");
|
log("Usage: node <script> <Close.io general API key> <Close.io mail API key1> <Close.io mail API key2> <Close.io mail API key3> <Close.io mail API key4> <Close.io EU mail API key> <Intercom 'App ID:API key'> <mongo connection Url>");
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,18 +64,22 @@ const closeIoMailApiKeys = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
apiKey: process.argv[4],
|
apiKey: process.argv[4],
|
||||||
weight: .25
|
weight: .20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
apiKey: process.argv[5],
|
apiKey: process.argv[5],
|
||||||
weight: .05
|
weight: .05
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
apiKey: process.argv[6],
|
||||||
|
weight: .05
|
||||||
|
},
|
||||||
];
|
];
|
||||||
const closeIoEuMailApiKey = process.argv[6];
|
const closeIoEuMailApiKey = process.argv[7];
|
||||||
const intercomAppIdApiKey = process.argv[7];
|
const intercomAppIdApiKey = process.argv[8];
|
||||||
const intercomAppId = intercomAppIdApiKey.split(':')[0];
|
const intercomAppId = intercomAppIdApiKey.split(':')[0];
|
||||||
const intercomApiKey = intercomAppIdApiKey.split(':')[1];
|
const intercomApiKey = intercomAppIdApiKey.split(':')[1];
|
||||||
const mongoConnUrl = process.argv[8];
|
const mongoConnUrl = process.argv[9];
|
||||||
const MongoClient = require('mongodb').MongoClient;
|
const MongoClient = require('mongodb').MongoClient;
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
const countryData = require('country-data');
|
const countryData = require('country-data');
|
||||||
|
|
Loading…
Reference in a new issue