I'm developing a tool that will allow marketing manager to upload customer emails to Google Adwords via API.
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:
- SET operation + N ADD operations.
- 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.
- Create and submit N ADD operations for the rest of users, not included in the first SET
- Compute difference and construct needed ADD and REMOVE operations
- Having previously uploaded state stored somewhere on my side, I compare it with incoming list that should replace the current one in Google
- Comparison will give me two sets of users: those to add and those to remove
- 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?