constselector=AdsApp.recommendations().withCondition('recommendation.type IN (CAMPAIGN_BUDGET)');constrecommendations=selector.get();
最適化案を適用する
最適化案を取得したら、次のように適用します。
for(constrecommendationofrecommendations){// Perform whatever check here that works for your use case.// You can also potentially skip this step if you've sufficiently narrowed// down what recommendations you're selecting initially with customized// withCondition clauses in the previous step.if(shouldApply(recommendation)){recommendation.apply();}}