Created
July 15, 2016 11:34
-
-
Save graut/53f63f68f5ace107646760de32990719 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Ghanshyam on 2/7/16. | |
*/ | |
var AgileCRMManager = require("./agilecrm.js"); | |
var obj = new AgileCRMManager("your_domain", "your_rest_api_key", "your_user_email"); | |
var success = function (data) { | |
console.log(data); | |
}; | |
var error = function (data) { | |
console.log(data); | |
}; | |
var contact = { | |
"lead_score": "92", | |
"tags": [ | |
"Lead", | |
"Likely Buyer" | |
], | |
"properties": [ | |
{ | |
"type": "SYSTEM", | |
"name": "first_name", | |
"value": "Los " | |
}, | |
{ | |
"type": "SYSTEM", | |
"name": "address", | |
"value": "{\"address\":\"225 George Street\",\"city\":\"NSW\",\"state\":\"Sydney\",\"zip\":\"2000\",\"country\":\"Australia\"}" | |
} | |
] | |
}; | |
obj.contactAPI.add(contact, success, error); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment