How to add member to a user_list?

149 views
Skip to first unread message

Gerardo Cima

unread,
Apr 21, 2022, 10:03:36 AM4/21/22
to Google Ads API and AdWords API Forum
Hi 
I am trying to migrate this functionality.:

"""
        mutate_members_operation = {
            'operand': {
                'userListId': self.id,
                'membersList': members
            },
            'operator': 'ADD' or 'remove'
        }

        try:
            adwords_client.GetService('AdwordsUserListService', 'v201809').mutateMembers([mutate_members_operation])
"""

but I don't find anything similar in client.get_service('UserListService', 'v10')

i try this code example: https://github.com/googleads/google-ads-python/blob/HEAD/examples/remarketing/add_customer_match_user_list.py

but it doesn't have what i'm looking for

Thanks 

Google Ads API Forum Advisor

unread,
Apr 22, 2022, 6:55:24 AM4/22/22
to gc...@abaenglish.com, adwor...@googlegroups.com

Hi Gerardo,
 

Thanks for reaching out to the Google Ads API Support team.
 

With regards to your concern, I can refer you to this documentation Customer Match and Add Customer Match User List to add in the user list which utilize the OfflineUserDataJobService.
 

Let us know if you have any questions.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2a5UGF:ref

Gerardo Cima

unread,
Apr 24, 2022, 3:56:57 AM4/24/22
to Google Ads API and AdWords API Forum
Hi! 

To be clear about some considerations:

1) Can The process of updating user_list members take between 6 - 48 hours?

2) some of our lists have more than 10 million.  should this be done in batch processes of 10,000 objects?

3) If it is in "In process". can I add new members to the list? How do I know that this really works?

Thanks

Google Ads API Forum Advisor

unread,
Apr 25, 2022, 1:34:17 AM4/25/22
to gc...@abaenglish.com, adwor...@googlegroups.com
Hi Gerardo,

Thank you for the reply. I am also a member of the Google Ads API team and let me provide support to your concern.

Please see my answer below for each question:

1) Can The process of updating user_list members take between 6 - 48 hours?
-I would like to inform you first that there is no direct way to update a user list. It will involve the remove operation and then add a create operation setting their UserData in an OfflineUserDataJobOperation. With that, to answer your question, the completion time of the updating user_list will vary depending on what operation you will use. I would suggest to consider the 2 statements below that discussed on this document:
  • It takes 6 to 48 hours for a list to be populated with members, so you'll most likely see an "In Progress" status (on the Google Ads UI) if you upload to an audience list more frequently than once every 12 hours.
  • If your job includes a remove_all operation, it may run for up to 72 hours

2) some of our lists have more than 10 million.  should this be done in batch processes of 10,000 objects?
-Batch processing do not support the OfflineUserDataJobOperation, with this, you need to follow the below statement at a time to avoid CONCURRENT_MODIFICATION error and to accommodate 10 million members of the user list: 
  • The operations collection for each AddOfflineUserDataJobOperationsRequest can contain at most 100,000 identifiers across all of the UserData objects in the operations. If you need to submit more than 100,000 identifiers for a job, send multiple requests with the same job resource_name.

3) If it is in "In process". can I add new members to the list? How do I know that this really works?
-I can confirm that this is possible, however, I would suggest considering the below statement:
  • Avoid simultaneously running multiple OfflineUserDataJob processes that modify the same user list (that is, multiple jobs whose CustomerMatchUserListMetadata.user_list point to the same resource name). Doing so can result in a CONCURRENT_MODIFICATION error since multiple jobs are not permitted to operate on the same list at the same time. This error can also occur if attempting to simultaneously modify a list through the Google Ads UI and the Google Ads API. Note that this does not apply to adding operations to an existing job, which can be done at any time before the job is started.

As for your question if it will work, if the API will at least upload 1,000 members, the size of the user list will be rounded to the two most significant digits and you can see it in the UI.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


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