I was reading the code but still cannot figure out how to attach a customer list to a campaign using the CampaignCriterionOperation. There are many criteria available but none of them look like I can pass a customer list resource name.
Is it really possible to do this through the API as it can be done through the UI?
This is for reference the phpdoc of the CampaignCriterion class:
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $resource_name
* Immutable. The resource name of the campaign criterion.
* Campaign criterion resource names have the form:
* `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}`
* @type string $campaign
* Immutable. The campaign to which the criterion belongs.
* @type int|string $criterion_id
* Output only. The ID of the criterion.
* This field is ignored during mutate.
* @type string $display_name
* Output only. The display name of the criterion.
* This field is ignored for mutates.
* @type float $bid_modifier
* The modifier for the bids when the criterion matches. The modifier must be
* in the range: 0.1 - 10.0. Most targetable criteria types support modifiers.
* Use 0 to opt out of a Device type.
* @type bool $negative
* Immutable. Whether to target (`false`) or exclude (`true`) the criterion.
* @type int $type
* Output only. The type of the criterion.
* @type int $status
* The status of the criterion.
* @type \Google\Ads\GoogleAds\V13\Common\KeywordInfo $keyword
* Immutable. Keyword.
* @type \Google\Ads\GoogleAds\V13\Common\PlacementInfo $placement
* Immutable. Placement.
* @type \Google\Ads\GoogleAds\V13\Common\MobileAppCategoryInfo $mobile_app_category
* Immutable. Mobile app category.
* @type \Google\Ads\GoogleAds\V13\Common\MobileApplicationInfo $mobile_application
* Immutable. Mobile application.
* @type \Google\Ads\GoogleAds\V13\Common\LocationInfo $location
* Immutable. Location.
* @type \Google\Ads\GoogleAds\V13\Common\DeviceInfo $device
* Immutable. Device.
* @type \Google\Ads\GoogleAds\V13\Common\AdScheduleInfo $ad_schedule
* Immutable. Ad Schedule.
* @type \Google\Ads\GoogleAds\V13\Common\AgeRangeInfo $age_range
* Immutable. Age range.
* @type \Google\Ads\GoogleAds\V13\Common\GenderInfo $gender
* Immutable. Gender.
* @type \Google\Ads\GoogleAds\V13\Common\IncomeRangeInfo $income_range
* Immutable. Income range.
* @type \Google\Ads\GoogleAds\V13\Common\ParentalStatusInfo $parental_status
* Immutable. Parental status.
* @type \Google\Ads\GoogleAds\V13\Common\UserListInfo $user_list
* Immutable. User List.
* The Similar Audiences sunset starts May 2023. Refer to
* https://ads-developers.googleblog.com/2022/11/announcing-deprecation-and-sunset-of.html
* for other options.
* @type \Google\Ads\GoogleAds\V13\Common\YouTubeVideoInfo $youtube_video
* Immutable. YouTube Video.
* @type \Google\Ads\GoogleAds\V13\Common\YouTubeChannelInfo $youtube_channel
* Immutable. YouTube Channel.
* @type \Google\Ads\GoogleAds\V13\Common\ProximityInfo $proximity
* Immutable. Proximity.
* @type \Google\Ads\GoogleAds\V13\Common\TopicInfo $topic
* Immutable. Topic.
* @type \Google\Ads\GoogleAds\V13\Common\ListingScopeInfo $listing_scope
* Immutable. Listing scope.
* @type \Google\Ads\GoogleAds\V13\Common\LanguageInfo $language
* Immutable. Language.
* @type \Google\Ads\GoogleAds\V13\Common\IpBlockInfo $ip_block
* Immutable. IpBlock.
* @type \Google\Ads\GoogleAds\V13\Common\ContentLabelInfo $content_label
* Immutable. ContentLabel.
* @type \Google\Ads\GoogleAds\V13\Common\CarrierInfo $carrier
* Immutable. Carrier.
* @type \Google\Ads\GoogleAds\V13\Common\UserInterestInfo $user_interest
* Immutable. User Interest.
* @type \Google\Ads\GoogleAds\V13\Common\WebpageInfo $webpage
* Immutable. Webpage.
* @type \Google\Ads\GoogleAds\V13\Common\OperatingSystemVersionInfo $operating_system_version
* Immutable. Operating system version.
* @type \Google\Ads\GoogleAds\V13\Common\MobileDeviceInfo $mobile_device
* Immutable. Mobile Device.
* @type \Google\Ads\GoogleAds\V13\Common\LocationGroupInfo $location_group
* Immutable. Location Group
* @type \Google\Ads\GoogleAds\V13\Common\CustomAffinityInfo $custom_affinity
* Immutable. Custom Affinity.
* @type \Google\Ads\GoogleAds\V13\Common\CustomAudienceInfo $custom_audience
* Immutable. Custom Audience
* @type \Google\Ads\GoogleAds\V13\Common\CombinedAudienceInfo $combined_audience
* Immutable. Combined Audience.
* @type \Google\Ads\GoogleAds\V13\Common\KeywordThemeInfo $keyword_theme
* Immutable. Smart Campaign Keyword Theme.
* @type \Google\Ads\GoogleAds\V13\Common\LocalServiceIdInfo $local_service_id
* Immutable. GLS service campaign criterion.
* }
*/
Regards,