How to organize CrmBasedUserList refresh via API

270 views
Skip to first unread message

Alexander B

unread,
Jul 19, 2016, 8:33:57 PM7/19/16
to AdWords API Forum
Hi,
background:

I'm developing a tool that will allow marketing manager to upload customer emails to Google Adwords via API.
I'm using .NET client library - https://github.com/googleads/googleads-dotnet-lib
I call API endpoint using  AdwordsUserListService v201605,   CrmBasedUserList type

Docs say that I can make three types of operations for a User List: ADD, SET and REMOVE.
When list is uploaded first time, I can fire a bunch of batch ADD requests to the API, and list will be eventually filled up.
But what about list refresh? I will need the list in google to contain only members I have to upload.

I see 2 options:
  1. SET operation + N ADD operations. 
    1. Create a SET operation with first 10.000 users, and submit it. This will overwrite the list, and members that do not exist in new list will be removed.
    2. Create and submit N ADD operations for the rest of users, not included in the first SET
  2. Compute difference and construct needed ADD and REMOVE operations
    1. Having previously uploaded state stored somewhere on my side, I compare it with incoming list that should replace the current one in Google
    2. Comparison will give me two sets of users: those to add and those to remove
    3. Make required number of ADD and REMOVE requests to the API

To me looks like the first option is easier, because I don't need to store last upload data for each list and have comparison logic in place.

What I don't know is 

- is there a guarantee that SET operations following by a number of ADD execute in and order of submission? Will ADD start only after SET is finished?
- is this correct: after first SET is finished, list will be updated transactionally to contain on members for SET operation, and then ADD operations will start to happen?
If so, it means that for some time, until ADD operations are finished, my list will contain just a part of the data, and it that can affect campaigns the list is used in?

Considering the above, what option is preferrable, or is there a better way to make a list refresh?


Shwetha Vastrad (AdWords API Team)

unread,
Jul 20, 2016, 1:16:12 PM7/20/16
to AdWords API Forum
Hi Alexander,

The first option would work in this case. The operation will be executed in the order they were submitted. So, the ADD operation will be performed after the SET is finished. It may take up to several hours for the list to be populated with members. 
After all the ADD operations are completed, the email entries will be processed and then the list is populated. This will not affect the campaigns using the list adversely while the list is being processed. Please see this guide for more information about CrmBasedUserList.

Regards,
Shwetha, AdWords API Team.

Alexander B

unread,
Jul 24, 2016, 5:33:37 PM7/24/16
to AdWords API Forum
Hi Shwetha,
thank you for the response. I tried implementing SET + ADD pattern, and when calling AdwordsUserListService MutateMembersOperation with SET operator for existing list, I'm getting OperatorError.OPERATOR_NOT_SUPPORTED API error, telling me that SET operator is not supported for MutateMembersOperation while docs say it is supported.

Shwetha Vastrad (AdWords API Team)

unread,
Jul 25, 2016, 11:03:06 AM7/25/16
to AdWords API Forum
Hi Alexander,

Upon further investigation, I found that the SET operator is not supported for the MutateMembersOperation. As described in the reference documentation, the mutateMembers method can be used to add or remove a list of members from a UserList. 

To keep the UserLists updated, you would have to use the second option you described. You could also consider creating new UserLists with the updated list of members and deleting the old ones. 

Alexander B

unread,
Jul 25, 2016, 4:47:49 PM7/25/16
to AdWords API Forum
Hi Shwetha,
thank you. I suggest somebody updates documentation to reflect the fact that the operation is not supported.

Shwetha Vastrad (AdWords API Team)

unread,
Jul 25, 2016, 6:12:33 PM7/25/16
to AdWords API Forum
Hi Alexander,

Thanks for bringing this to our notice. I'll file a request to have the documents updated to reflect this. 
Reply all
Reply to author
Forward
0 new messages