Synchronize unsubscribed PUBLITRAC with your database

If you transfer your leads to PUBLITRAC via a synchronization by API, you can automatically retransfer the leads with an Unsubscribed PUBLITRAC status to your database, as soon as the unsubscribe link is clicked. The Unsubscribed leads will be marked (tagged) as Done (by a custom field) and To Remove. Unsubscribed leads marked as done will be placed in a list for this purpose and which will allow you to delete them easily by using this list.

Note that the names of the lists or campaigns below are only examples and you can name them at your convenience.

Step 1:  Ceate in PUBLITRAC the ToSync and ToDelete custom fields

1. Go to Settings by clicking on the gear wheels    ..

2. Select Settings.



     3. Select the Custom Fields



   The screen below will appear.

4. Click Add

5. At the bottom of the list, enter the name of the Custom Field (for example, ToSync). Enter it without a space or special characters. In field 5, we enter the name assigned to the system.

6. Enter the name of the custom field as it will be displayed for the Lead Details fields. If you are in the French version of PUBLITRAC, enter the name in French. For the English version of the same custom field, you will need to, once the process of the creation in French completely finished, change the language of PUBLITRAC to English and register the name of the custom field in English. For our example, Unsubscribed to synchronize.

7. Enter the category assigned to this custom field (the following values are available in the  drop-down menu: Check box ; Date; Text; Digital; Drop-down list; Multiple values; Interest; Multi-line text). In our example, we select check box.

8. Enter a value when the field must contain a pre-established answer choice. In our example, there is no value to enter, we have a check box that must not be checked by default.

9. Click Save.

 

 Step 2: Create a trigger campaign (the trigger being Opt-out request) which puts the custom field ToSync to the value True. Name the campaign UnsubscribeSync.

1. Click Campaigns.

2. Select Configure automation campaign.

3. Click Add.

                  

     The screen below will appear.

                

  

4. Enter the Name of the campaign*. In our example: UnsubscribeSync.

5. Enter the Category *. In our example: Direct.

6. Click Next.

The screen below will appear.

           

7. Select Triggers.

The screen below will appear.

       8. Select Email unsubscribed and slide it to the left by using the left button of the mouse.

The screen below will appear.

     

9. Choose the Is and Any options. The campaign will then be triggered as soon as the unsubscribe link will be clicked, regardless of the email.

10. Click Next.

The screen below will appear.

     

11. Select the Automation tab.

                

12. Open the Activities file in the column to the right. Select Change attribute of the lead (x) to (y). Drag the item to the left to Start.

   The screens below will appear.

  

13. Select the field to be changed. Give it the desired value.

14. Click OK.

15. Your choices appear in the decision tree.

16. Click Details.


       

    17. Click Activate and Save your campaign. Your leads which opt-out will now be tagged ToSync.

   

Step 3: Create a filtered list on the value ToSync = True. You can name it LeadsToSync.

1. Click Leads.

2. Select Leads / Customers.

3. Select the List Management tab.

4. Click Add   

  

The Leads screen that appears presents the methods that enable the generation of your lists: you can create a segment from the information contained in the profile of your leads, import a list, or create a list from scratch.


        5. Select Create a filtered list.

The screen below will appear.

 

6. Complete the Name field*. You can name it LeadsToSync.

7. Complete the Description field if you want a specific description for your list. This field is optional. In our example: list for unsubscribed leads to synchronize with the internal system.

8. Select a Category from the drop-down menu or manually enter a category of your choice. A category list allows to group your lists by themes (for example, contest list, congress list,...). The categories that will appear in the drop-down menu are the ones you have previously created manually. The categories lists created remain in memory and are displayed in the drop- down menu. This field is optional. If the desired category list does not exist, you can create it manually by entering the name of the category you want in the field of the drop-down menu. No category list is pre-created by default in PUBLITRAC. Note that whenever a list is imported, the name of this list is displayed in this drop-down menu. In our example, no category is applied.

9. Select the custom field, Unsubscribed to synchronize, previously created.

10. Drag it to the left side under Manipulate the filters for your list in the section below.

The screen below will appear.

       11. Select  the value Is and True.

       12. Click Save.

 

Step 4: Make a request to the API on getlist and ask for the LeadsToSync list. This request provides the unsubscribed leads to synchronize and updates your database for the unsubscribed status.

 

Get List

Get the leads that are part of a list.

 

URL

https://app.publitrac.com/API

Supports

GET

Method

getList

Required parameters

method: getList

apiKey: your API key

username: your username

password: your password

listName: the name of the filtered list.

Optional parameters

page: login page (default = 1)

 

Examples

Query


 

Response

 <? xml version = "1.0" encoding = "UTF - 8"? >

< response >

< leads >

< lead >

470 < /id > < id >

< firstName > John < /firstName >

< lastName > < /lastName > Smith

< middleName > < /middleName >

< company > PUBLIPAGE < /company >

< phone > 514-555-2149 < /phone >

< email > johnsmith @publipage.com< /email >

< mailingAddress > < /mailingAddress >

< originalSource > < /originalSource > Google

Organic Search < /originalSourceType > < originalSourceType >

< keyword > marketing automation < /keyword >

< jobTitle > < /jobTitle >

< dateOfBirth > < /dateOfBirth >

< status > Active/< status >

< score > 0 < /score >

< postalCode > < /postalCode >

< country > < /country >

< city > < /city >

< state > < /state >

< doNotCall > 0 < /doNotCall >

< doNotCallReason > < /doNotCallReason >

< token > _nl - publipage.com - 1282527313351-84730 < can >

< unsubscribed > 0 < /unsubscribed >

< unsubscribeCause > < /unsubscribeCause >

< fax > < fax >

< mobile > < /mobile >

< isCustomer > < /isCustomer > 0

< isAnonymous > 0 < /isAnonymous >

< emailInvalid > < /emailInvalid > 0

< emailInvalidCause > < /emailInvalidCause >

< notes > < /notes >

< suspended > 0 < /suspended >

< suspendedReason > < /suspendedReason >

< blacklisted > 0 < /blacklisted >

< blacklistedCause > < /blacklistedCause >

< customerId > < /customerId >

< site > < /website >

< language > < specific >

< nbrEmployees > < /nbrEmployees >

< revenue > < /revenue >

< crmLeadId > < /crmLeadId > 5e0ff332-090c-b97d-6325-4c786a68e9a7

< createdDate > 2010-08-23 01:35:13 < /createdDate >

< lastUpdated > 2010-10-25 02:20:06 < /lastUpdated >

< someCustomField > my custom field < /someCustomField >

< /lead >

< /leads >

< paging >

< page > 1 </Page >

< items > 1 < /items >

< offset > 100 < /offset >

< total > 1 < competition >

< /paging >

< status > 2001/< status >

< message > Get list success. < message >

 

Step 5: Make a request to the API on synclead in the ToSync field and set it to False (by putting the ToSync field to False, this unsubscribed lead holders will no longer be synchronized to your database).

Sync Lead

Synchronize a lead, if a lead exists with an email (no duplicates), an update will be made.

 

URL

https://app.publitrac.com/API

Supports

POST

Method

syncLead

Required parameters

method: syncLead

apiKey: your API key

username: your username

password: your password

query: the XML representation of the lead to be insert or updated.

Remarks

This method will add a new lead if no lead is found in the database via the unicity key.

Following is the list of possible unicity keys:

·          

      • Email address / emails is the default unicity key. Following all requests to the SyncLead method, the process will validate if a corresponding lead is present in your database, for each lead in your account.
      • Token: The token is a "cookie" on the customer`s browser that is used to track his interactions on the website before and after his acquisition. The PUBLITRAC token is a string of characters similar to the following "_nl - publitrac.com-" 1111111111111-11111``. During the request to the method, the useToken option is entered as`` true``; PUBLITRAC will search for leads and anonymous leads that match these criteria and will update the values accordingly. This option will be prioritized in regards to other defined unicity keys with the exception of customUnicityKeys.
      • Custom unicity key: in situations where you need to manage the unicity keys other than by the email or token, it is possible to use the customUnicityKeys. For example, email and CRM Lead Id. It is also possible to define your own unicity key; the process will validate if a lead is present with the 2 identical information.

        ** If several leads with the defined unicity keys exist in your database, the API will return an error.

It is also possible to merge or to ignore anonymous leads. For example, if you are synchronizing your leads from a web page and you want to merge the interactions that the visitor did on your web site before his acquisition to the created profile. In this case you must enter mergeAnonymous to 1 (true), use Token to 0 (false)  in the request to the API.

If the information mergeAnonymous or useToken are not defined, the default value will be 0 (false).

Pay close attention to the most common errors:

·         The field <email></email> cannot be null or invalid

      • The duplicate leads based on the unicity key selected
      • The use of the mergeAnonymous method without providing the Token value in the parameter.
      • Include null values in the value of selected unicity key (for example the customUnicityKeys with crmLeadId and firstName with these 2 empty values)

 

 

 

 

Examples

Query

<?xml version="1.0" encoding="UTF-8"?>

<request>

    <useToken>true</useToken>

    <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>123</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>

 

Response

<?xml version="1.0" encoding="UTF-8"?>

<response>

    <status>2006</status>

    <message>Leads synchronization successful.</message>

</response>

Step 6: Create a filtered list on the value Unsubscribed To Delete = True. You can name this list Leads To Delete.

1. Create the filtered list (use the description provided in step 3 above).

2. Name the list (you can name this list LeadsTo Delete).

3. Select Unsubscribed to delete under Custom Fields. Slide it to the left.

 

       4. Select Is and then select True because we want those who have a check mark in the checkbox.

           

              5. Click Save.


                   

At your convenience, you can access this list and delete the leads it contains.