Populating CrmBasedUserList with members identified by email only increases sizeForSearch, not size.

78 views
Skip to first unread message

Glib Tykhonov

unread,
Nov 6, 2019, 12:12:05 PM11/6/19
to AdWords API and Google Ads API Forum
Hello. I'm currently developing trying to set up a mechanism for populating a CrmBasedUserList with our registered users using their emails. But after i've added 1000 users using api and executed a get request i've noticed that newly added users only increased the sizeForSearch, not size.
E.g.
CrmBasedUserList{accessReason=OWNED, accountUserListStatus=ACTIVE, dataSourceType=FIRST_PARTY, dataUploadResult=DataUploadResult{uploadStatus=SUCCESS}, description=, id=***********, isEligibleForDisplay=true, isEligibleForSearch=true, isReadOnly=false, listType=CRM_BASED, membershipLifeSpan=10000, name=********, size=1300, sizeForSearch=1900, sizeRange=ONE_THOUSAND_TO_TEN_THOUSAND, sizeRangeForSearch=ONE_THOUSAND_TO_TEN_THOUSAND, status=OPEN, uploadKeyType=CONTACT_INFO, userListType=CrmBasedUserList}

(the 1300 users were previously added without using api)

I'm using a code such as this: 
public void addUserToList(String email) {
AdwordsUserListServiceInterface userListService = userListServiceProvider.getNewUserListService();

Member member = new Member();
member.setHashedEmail(normalizeAndHash(email));

MutateMembersOperation mutateMembersOperation = new MutateMembersOperation();
MutateMembersOperand mutateMembersOperand = new MutateMembersOperand();
mutateMembersOperand.setUserListId(remarketingUserListId);
mutateMembersOperand.setMembersList(new Member[] {member});
mutateMembersOperation.setOperand(mutateMembersOperand);
mutateMembersOperation.setOperator(Operator.ADD);
try {
userListService.mutateMembers(new MutateMembersOperation[] {mutateMembersOperation});
} catch (RemoteException ex) {
throw new AdWordsClientException("Caught exception while trying to add user to adwords users list", ex);
}
}


Couldn't find a reason for this so far. Any suggestions?

Thanks.

Glib Tykhonov

unread,
Nov 7, 2019, 4:41:06 AM11/7/19
to AdWords API and Google Ads API Forum
Upd: in case anyone encounters a similar issue:
I've executed the same get request a day later and the size updated as expected. So its all good.
Reply all
Reply to author
Forward
0 new messages