Sommaire | ||
---|---|---|
|
...
Name | Description |
---|---|
method | The API method you want to call |
apikey | Your API Key |
username | Your username (Same as your PUBLITRAC login) *Note that we can provide you a specific user to use the API |
mot de passe | Your password (Same as your PUBLITRAC login) |
parameters | The number of parameters required depend on the method called. |
Syntaxe
https://app.publitrac.com/api?method=[Method Name]&apikey=[Your API Key]&username=[Your user]&password=[Your password]&[Your parameters (email, query, viewName, listName)]
Examples
Bloc de code | ||
---|---|---|
| ||
https://app.publitrac.com/api?method=getLeads&apikey=1234e567-890c-123e-4567-8901b234c56&username=MyUser&password=MyPassw0rd&query=<XML representation of your search> https://app.publitrac.com/api?method=getLead&apikey=1234e567-890c-123e-4567-8901b234c56&username=MyUser&password=MyPassw0rd&email=Email representing your search |
...
Url | |
Supported | POST |
Methode | syncLead |
Mandatory Parameters | method : syncLead apiKey : Your API Key username : Your username password : Your password query : Xml representation of the lead to update |
Remarks | This method will add a new lead if the token, the crmLeadId or the email address are not in the database. Unique identifiers are in this order: the ‘token’, the ‘crmLeadId’ and then the ‘email address’. The email address is always mandatory and must be valid. It is possible to synchronize your leads with different unicity keys;
It is also possible to merge or ignore the Anonymous leads. That means, if you synchronized your leads from a web form, you may want to use a custom unicity key, for example, the CRM Lead ID and make sure to merge the interactions which ocurred before the acquisition based on his Token. In this case you'll configure mergeAnonymous to 1 (true) useToken to 0 (false) and specify the corresponding token and crmLeadId in the lead information. If the values mergeAnonymous or useToken are not set, the default value is set to 0 (false). Be careful with the following most common errors :
|
Examples
Bloc de code | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <request> <mergeAnonymous>0</mergeAnonymous> <useToken>1</useToken> <customUnicityKeys> <key>crmLeadId</key> <key>customKey2</key> </customUnicityKeys> <lead> <token>_nl-yourdomain.com-1323891914130-53205</token> <crmLeadId>CRM_ID134</crmLeadId> <firstName>John</firstName> <lastName>Smith</lastName> <middleName></middleName> <company>ACME</company> <phone>555-423-2453</phone> <email>johnsmith@mydomain.com</email> <mailingAddress>134 Ocean Street</mailingAddress> <leadSource>New Production ABC</leadSource> <originalSource> New Production ABC</originalSource> <originalSourceType>Organic</originalSourceType> <jobTitle>Software Engineer</jobTitle> <score>90</score> <postalCode>90211</postalCode> <country>USA</country> <city>Compton</city> <state>CA</state> <doNotCall>0</doNotCall> <doNotCallReason></doNotCallReason> <unsubscribed>0</unsubscribed> <unsubscribeCause></unsubscribeCause> <unsubscribeReason></unsubscribeReason> <fax>555-324-2134</fax> <mobile>555-432-1242</mobile> <isCustomer>0</isCustomer> <isAnonymous>0</isAnonymous> <emailInvalid>0</emailInvalid> <emailInvalidCause></emailInvalidCause> <notes>This lead is very interest in product ABC</notes> <suspended>0</suspended> <suspendedReason></suspendedReason> <blacklisted>0</blacklisted> <blacklistedCause></blacklistedCause> <customerId></customerId> <website>http://www.acme.com</website> <language>fr</language> <nbrEmployees>4</nbrEmployees> <revenue>400000</revenue> <customFields> <carColor>Red</carColor> <carMaker>Infiniti</carMaker> </customFields> </lead> </request> |
...
The country list is ISO_3166-1 in alpha-2 code
Language
The language is ISO_639-1 (currently supported only en/fr)
Opportunity Objet
Mandatory fields:
- Id: Your system ID to identify the opportunity.
- Name: The name of the opportunity.
- Sales Stages:
- Prospecting
- Qualification
- Needs Analysis
- Value Proposition
- Id. Decision Makers
- Perception Analysis
- Proposal/Price Quote
- Negotiation/Review
- Closed Won
- Closed Lost
- Amount: Integer
- Date Closed: Mandatory if opportunity is closed. Use your own data format.
- Probability: Integer from 1 to 100
- Leads: List of lead ids attached to the opportunity. ID is your internal crmLeadId and must have been previously added using addLead method.
...