You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 10, 2025. It is now read-only.
push: function(input, options) {
if (!.isArray(input) && !.isEmpty(input)) {
var msg = 'input must be an array of leads';
log.error(msg);
return Promise.reject(msg);
}
var data = _.extend({}, options, {
input: input
});
var path = util.createPath('leads', 'push.json');
return this._connection.postJson(path, data)
.then(function(data) {
if (data.success) {
return data;
} else {
log.warn('Cannot push lead: ', data);
return Promise.reject('Cannot get lead(s) from input: ' + JSON.stringify(input));
}
});
// Push a lead to Marketo program namemarketo.lead.push([{'email': 'email@one.com'},{'email': 'email@two.com'}],{lookupField: 'email',programName: 'Test program name'})