create and update user list with Google Ads API

891 views
Skip to first unread message

derek

unread,
Dec 12, 2022, 4:29:12 AM12/12/22
to Google Ads API and AdWords API Forum
Hi

I am migrating from Google AdWords API to Google Ads API.
I need to be able to create user list and also to update existing user lists (containing email addresses).

Is this the example to refer to?
If I want to create a new user list with the List ID provided by me, how should I do it?
If I want to update an existing user list content, how can I do it?

Derek

Google Ads API Forum Advisor

unread,
Dec 12, 2022, 11:29:40 AM12/12/22
to d3r...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

You are using correct example that only you can create a new list through Google Ads API and not update an existing list. You may need to remove existing user list then add new updated user list. Listed in this section of our customer match guide are the ways you can initially remove the audiences. 

Later on once you have removed the previous audiences, you may then use the example you specified earlier, to add new audiences into your customer match user lists. You can also refer to the considerations listed here, where one of the items states :

To completely replace the members of a user list with new members, order the operations in AddOfflineUserDataJobOperationsRequest in this sequence:
1. Set remove_all to true in an OfflineUserDataJobOperation.
2. For each new member, add a create operation setting their UserData in an OfflineUserDataJobOperation.


Let me know if this helps clarify your concern.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2h1wGQ:ref

derek

unread,
Dec 12, 2022, 10:28:00 PM12/12/22
to Google Ads API and AdWords API Forum
Hi

Thank you for the info.

If I want to create a new list with my preferred List ID, eg. 1234567890, which set methods should I use to set the List ID?

// Creates the new user list.
   
UserList userList =
       
UserList.newBuilder()
           
.setName("Customer Match list #" + getPrintableDateTime())
           
.setDescription("A list of customers that originated from email addresses")
           
// Customer Match user lists can use a membership life span of 10,000 to indicate
           
// unlimited; otherwise normal values apply.
           
// Sets the membership life span to 30 days.
           
.setMembershipLifeSpan(30)
           
// Sets the upload key type to indicate the type of identifier that will be used to
           
// add users to the list. This field is immutable and required for an ADD operation.
           
.setCrmBasedUserList(
               
CrmBasedUserListInfo.newBuilder()
                   
.setUploadKeyType(CustomerMatchUploadKeyType.CONTACT_INFO))
           
.build();

If  I want to remove all data from an existing list which has List ID 1234567890, how do I indicate to remove from this List ID?

Google Ads API Forum Advisor

unread,
Dec 13, 2022, 5:44:54 AM12/13/22
to d3r...@gmail.com, adwor...@googlegroups.com
Hi Derek,

Thank you for getting back to us. I hope that you are doing well today.

Moving forward to your concern, please note that we cannot create a user list with our preferred user list id. In Google Ads API perspective, the user_list id is Output only. The user list id is automatically generated once you create a user list.

To remove all the data from the list at once, you may follow this guide. When you issue a RunOfflineUserDataJob request with the resource name associated, the user_list id is already indicated in the resource name customers/{customer_id}/userLists/{user_list_id}.

You may check this sample code for adding a customer match user list to add and remove user list data.

I hope this helps.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2h1wGQ:ref
Message has been deleted

cv

unread,
Oct 17, 2024, 8:38:28 AM10/17/24
to Google Ads API and AdWords API Forum
H,

Can you please help me how I can remove the members from list first?
There is no code example for this.

Does remove member also needed to do with Offline Job processing?


Thanks,

Google Ads API Forum Advisor

unread,
Oct 18, 2024, 12:15:02 AM10/18/24
to chirag....@gmail.com, adwor...@googlegroups.com
Hi,


> Does remove member also needed to do with Offline Job processing?
There is no specific code example provided in our client libraries for this operation. To remove individual users using the UserIdentifier:

Also, if you would like to remove all data from the list at once, I would recommend you refer to this guide for more information. 

I hope this helps.

 

This message is in relation to case "ref:!00D1U01174p.!5004Q02h1wGQ:ref" (ADR-00160359)

Thanks,
 
Google Logo Google Ads API Team
​​​​​


cv

unread,
Oct 18, 2024, 3:55:02 AM10/18/24
to Google Ads API and AdWords API Forum
Hi,

Also Can I remove any JobID which was pending or which are completed?

Thanks,
Reply all
Reply to author
Forward
0 new messages