Campaign & User List Upload

10 views
Skip to first unread message

Paul Joy Parayannilam

unread,
Dec 11, 2017, 1:28:46 PM12/11/17
to AdWords API Forum
Team,
I have few user lists which are same across multiple campaigns. Is there a way by which I can upload same user list across multiple campaigns? I'm trying to avoid multiple upload or .ADD operations.
So, once I create user list using the user list service and upload those, is there a way by which i can map the user lists against campaigns?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Dec 11, 2017, 5:48:36 PM12/11/17
to AdWords API Forum
Hi Paul, 

Once you have the user lists uploaded, you will need to use the CampaignCriterionService and add multiple operations to the CampaignCriterionOperation[] while you perform the mutate request. You can add up to 5000 operations in a request. However, for performance reasons we typically recommend passing no more than 2,000 operations per request. Please check here for more details. Please check this sample in Java to see how multiple operations can be done via single mutate operation. 

Thanks,
Sreelakshmi, AdWords API Team

Paul Joy Parayannilam

unread,
Dec 12, 2017, 12:48:57 AM12/12/17
to AdWords API Forum
I'm a bit confused what is meant by operations here.
Say for Eg: I have 50 different Advertisement campaigns. I have created 25 User lists which needs to be applied to all these 50 different campaigns.
Once all 25 UserLists are uploaded to Adwords using the API (UserListService), then using the UserList ID/File ID, can we map it across 50 campaigns in one shot?

Today, I'm performing the CampaignCriterion service.ADD method to upload each user list against a specific campaign. This means performing the upload operation 50*25 times. 
I would like to perform it in one single call (25 calls to create user lists and 1 call to map it against campaigns)

Thanks
Paul

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Dec 12, 2017, 12:57:01 PM12/12/17
to AdWords API Forum
Hi Paul, 

A mutate API call will have operations with operator (ADD) and operand (CampaignCriterion). You can check the structure of the API mutate call here for better clarity. Since you need to attach the user list to 50 campaigns in one shot, you will need to have 50 operations inside the mutate with each operation having the operand and operator defined. The mutate API call can be 1 but it will need to have 50 instances of the operations tag. 

For instance, the SOAP logs given below has two operations which will add the user list as a criterion on two different Campaigns in one mutate API call: 
 
   <soapenv:Body>
       
<mutate xmlns="https://adwords.google.com/api/adwords/cm/v201708">
           
<operations>
               
<operator>ADD</operator>
               
<operand>
                   
<campaignId>756382463</campaignId>
                   
<criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201708" xsi:type="ns2:CriterionUserList">
                       
<ns2:userListId>457499247</ns2:userListId>
                   
</criterion>
               
</operand>
           
</operations>
           
<operations>
               
<operator>ADD</operator>
               
<operand>
                   
<campaignId>734962463</campaignId>
                   
<criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201708" xsi:type="ns2:CriterionUserList">
                       
<ns2:userListId>457499247</ns2:userListId>
                   
</criterion>
               
</operand>
           
</operations>
       
</mutate>
   
</soapenv:Body>


Hope this clarifies your question. 

Thanks
Sreelakshmi, AdWords API Team
Reply all
Reply to author
Forward
0 new messages