How to populate an audience with multiple CONTACT_INFO keys (python SDK)

264 views
Skip to first unread message

Tristan LETROU

unread,
Sep 4, 2018, 5:20:34 AM9/4/18
to AdWords API and Google Ads API Forum
Hello,

So I've been using the Python SDK to create and populate CRM based user lists. It works great with emails and phones separately, but it doesn't seem to work when I try with both.

This page about AdwordsUserListService members seems to indicate that I can use multiple keys as long as they are all of type "CONTACT_INFO" : https://developers.google.com/adwords/api/docs/reference/v201806/AdwordsUserListService.Member

I am testing with 3 lists, containing the same users :
  • 1 with only their hashed mails
  • 1 with only their hashed phone numbers
  • 1 with both their hashed mails and hashed phone numbers

When I populate using the users and only 1 key (either mail or phone), everything goes smoothly and the audience gets populated after a few hours, as usual.
But when I populate the audience with both "hashedEmail" and "hashedPhoneNumber" keys, even though the requests work without errors (exactly the same as when I populate the audience with a single key), the audience never populates.

Is it possible to populate an audience with multiple CONTACT_INFO keys (preferably using the python SDK) ? If it is, how ? 


More details

API version : v201806

I use this to create the CRM based audience, it does create the audience correctly

user_list = {
   
'xsi_type': 'CrmBasedUserList',
   
'name': 'A name',
   
'description': 'A description',
   
'uploadKeyType': 'CONTACT_INFO'
}


operations
= [{
   
'operator': 'ADD',
   
'operand': user_list
}]


client
.GetService('AdwordsUserListService', 'v201806').mutate(operations)


Then I add the users like this:

mutate_members_operation = {
   
'operand': {
        userListId
: 123456789,
        membersList
: [
           
{ 'hashedEmail': 'hashedEmailValue1', 'hashedPhoneNumber': 'hashedPhoneNumberValue1' },
           
{ 'hashedEmail': 'hashedEmailValue2', 'hashedPhoneNumber': 'hashedPhoneNumberValue2' },
            etc
.
       
]
   
},
   
'operator': 'ADD'
}


client
.GetService('AdwordsUserListService', 'v201806').mutateMembers([mutate_members_operation])
Again, everything goes smoothly, no errors. But the audience never populates.

I also tried formatting my memberList like this:

{
   
[...]
    membersList
: [
       
{ 'hashedEmail': 'hashedEmailValue1' },
       
{ 'hashedPhoneNumber': 'hashedPhoneNumberValue1' },
       
{ 'hashedEmail': 'hashedEmailValue2' },
       
{ 'hashedPhoneNumber': 'hashedPhoneNumberValue2' }
        etc
.
   
]
   
[...]
}

So basically using only one-key dicts, again, no errors, but still the audience never populates.

Thank you in advance,
Tristan

Tristan Letrou
Consultant
24, rue du Sentier, 75002 Paris
+33 1 43 36 23 17
www.ysance.com | blog.ysance.com
 
 
La chaîne de valeur de la data

Bharani Cherukuri (AdWords API Team)

unread,
Sep 4, 2018, 3:57:55 PM9/4/18
to AdWords API and Google Ads API Forum
Hello Tristan, 

Thank you for the detailed explanation. The AdWords user lists can be uploaded with only one type of data and once uploaded will not accept any other ID types. If you're uploading more than one type of audience, the upload may be successful but the members may not be populated. Please check this guide as a reference. The user list must contain atleast 5000 members to start serving ads. You may refer to the Customer match considerations as a reference. This said, could you please elaborate on how you're verifying if the specific members were uploaded or not? Could you please share specific details regarding this and the CID of the client account so I can take a look? If you could share the SOAP logs for the API call, that will be helpful too. You can reply back via Reply privately to author option. 

Regards,
Bharani, AdWords API Team

Reply all
Reply to author
Forward
Message has been deleted
0 new messages