membersList in mutate_members_operation

72 views
Skip to first unread message

TR RX

unread,
Jan 29, 2020, 2:29:50 PM1/29/20
to AdWords API and Google Ads API Forum
Two questions:

1. I am uploading two customers(email & phone) and their address. does the following format look right(Please ignore the hashing part, i will do the hashing).

[
  {'hashedEmail': b'cust1_...@email.com'}
, {'hashedEmail': b'cust2_...@email.com'}
, {'hashedPhoneNumber': b'1111110001'}
, {'hashedPhoneNumber': b'2222220001'}
, {'addressInfo': {'countryCode': b'US', 'hashedFirstName': b'fname1', 'zipCode': b'84047', 'hashedLastName': b'lname1'}}
, {'addressInfo': {'countryCode': b'US', 'hashedFirstName': b'fname2', 'zipCode': b'84047', 'hashedLastName': b'lname2'}}
]

2. For customer #1 , I have another email "cust1_...@email.com" and another phone number "1111110002" . How to add these to the member list that is shown above?

Google Ads API Forum Advisor Prod

unread,
Jan 30, 2020, 2:08:59 PM1/30/20
to prakash...@gmail.com, adwor...@googlegroups.com

Hello,

Thank you for reaching out. With regards to your first concern, please refer to this code sample to create and populate the user list via API. The code sample will guide you with the correct format to upload these customers via API. I understand you are looking to modify the existing user list to add new members, said that, you could use mutateMembers method of AdwordsUserListService to add these new members to the list via AdWords API. Let us know if this clarifies your concerns.

Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001USx58n:ref

TR RX

unread,
Jan 31, 2020, 7:32:32 PM1/31/20
to AdWords API and Google Ads API Forum
Hi Nikitha,

Sorry i should have mentioned this before. I am using Python SDK. Thanks for your response. I wanted to explain my problem little more to get to a solution.

I am referring to this sample code. 

Here is my user list that i want to upload . Currently we do manual upload and now we want to automate it through python .


Row # |Email_1                              |  Email 2                                 | Phone 1       | Phone 2        | First name             | Last Name         | Country Code      | Zipcode
---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1         |cust...@email.com     |  cust...@email.com       | 1111110001  | 1111110002   |  xxxxxx                  | yyyyyy                | US                       | 88888
2         |cust...@email.com     |  cust...@email.com       | 222220001   | 222220002   |  nnnnn                   | ooooo                 | US                       | 88888
3         |cust...@email.com     |                                               | 333330001   |                      |  aaaaa                   |                            | US                       | 88888

I understand that the sample code is keyed off of email ID('hashedEmail') and followed by Address info. 

for Row # 1 : How do I upload "Email 2" ? Should I create a separate row for "Email 2" ?
                     There is no reference to "Phone" in the sample code , How do i upload the phone number? Should i create a separate row with Phone number as a Key('hashedPhone')?
     Row # 3 : Here we are missing Last name , What shall we upload instead of Blank or Whitespace to avoid the TOO_SHORT error?

Please note that the input to the python code is a CSV file with all those columns shown in the above example. It goes through each row in the file and create a Jason object for upload. So , I need to code it such a way that it can process all rows irrespective of whether it is missing some value.

Hope I explained my needs clearly, Please let m eknow for any questions. Appreciate your help on this. Thanks!

Google Ads API Forum Advisor Prod

unread,
Feb 3, 2020, 3:55:47 PM2/3/20
to prakash...@gmail.com, adwor...@googlegroups.com

Hello,

Thank you for clarifying this better. Please find my response to your queries below.

  • How do I upload "Email 2" ? Should I create a separate row for "Email 2" ? From the AdWords API perspective, only one email address (via the hashedEmail field) can be added to the member of the user list. Adding multiple email addresses to a user list member is currently not supported in the AdWords API. I have created a feature request on your behalf internally within our team. Please keep an eye on our blog for future updates.

  • There is no reference to "Phone" in the sample code. How do I upload the phone number? Should I create a separate row with Phone number as a Key('hashedPhone')? You need to add the hashed phone number in the similar way the email addresses are added after hashing based on SHA-256 hashing algorithm.

  • Here we are missing Last name, what shall we upload instead of blank or whitespace to avoid the TOO_SHORT error? The last name of the member is the required field and cannot be null. This must be populated while uploading a user list via API.

Let us know if you have any additional concerns.



Regards,
Nikisha Patel, Google Ads API Team



ref:_00D1U1174p._5001USx58n:ref
Reply all
Reply to author
Forward
0 new messages