Skip to content

Commit 2a1d606

Browse files
Demonstrate how to use apply_parameters (#562)
1 parent c143e81 commit 2a1d606

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

examples/recommendations/apply_recommendation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ def main(client, customer_id, recommendation_id):
3636
apply_recommendation_operation.resource_name = recommendation_service.recommendation_path(
3737
customer_id, recommendation_id
3838
)
39+
40+
# This is where we override the recommended ad when a TextAdRecommendation is applied.
41+
# override_ad = client.get_type("Ad")
42+
# override_ad.resource_name = "INSERT_AD_ID_HERE"
43+
# apply_recommendation_operation.text_ad.ad = override_ad
3944

4045
recommendation_response = recommendation_service.apply_recommendation(
4146
customer_id=customer_id, operations=[apply_recommendation_operation]

0 commit comments

Comments
 (0)