Skip to content

Commit

Permalink
Merge pull request #64 from BrandonRomano/master
Browse files Browse the repository at this point in the history
Support 'mergeInCRM' parameter when merging Leads
  • Loading branch information
pcothenet authored Dec 28, 2018
2 parents a51b07f + d797aac commit 9fdfa2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/api/lead.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ Lead.prototype = {
}

var path = util.createPath('leads', winningLead, 'merge.json');
return this._connection.postJson(path, {data: options}, {query: {leadIds: losingLeads.join()}});
var queryParams = {leadIds: losingLeads.join()}
if ('mergeInCRM' in options) {
queryParams.mergeInCRM = options.mergeInCRM
delete options.mergeInCRM
}
return this._connection.postJson(path, {data: options}, {query: queryParams});
},

getPageToken: function(sinceDatetime, options) {
Expand Down

0 comments on commit 9fdfa2e

Please sign in to comment.