Skip to content

Commit d9d7da2

Browse files
committed
docs(create_adset): clarify OUTCOME_ENGAGEMENT conversion locations
On Post engagement uses destination_type=ON_POST (not ON_AD) and needs promoted_object={page_id} set at creation (immutable; otherwise create_ad fails with subcode 1885154). ON_AD is the OUTCOME_LEADS instant-form destination and Meta rejects it for OUTCOME_ENGAGEMENT (subcode 1815715). Also list the ON_POST/ON_PAGE/ON_EVENT/ON_VIDEO destination_type values and document that the Ads Manager Profile and Page visits goal (PROFILE_AND_PAGE_ENGAGEMENT) is not available via the Marketing API for OUTCOME_ENGAGEMENT. Docstring only; no behavior change (destination_type still passes through to Meta).
1 parent 90bebea commit d9d7da2

1 file changed

Lines changed: 20 additions & 11 deletions

File tree

‎meta_ads_mcp/core/adsets.py‎

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@ async def create_adset(
122122
name: Ad set name
123123
optimization_goal: Conversion optimization goal. Valid values depend on the campaign objective and destination_type.
124124
OUTCOME_ENGAGEMENT + destination_type=WEBSITE: OFFSITE_CONVERSIONS, LANDING_PAGE_VIEWS, LINK_CLICKS, IMPRESSIONS, REACH.
125-
OUTCOME_ENGAGEMENT + On Post: POST_ENGAGEMENT, IMPRESSIONS, REACH.
126-
OUTCOME_ENGAGEMENT + On Video: THRUPLAY, TWO_SECOND_CONTINUOUS_VIDEO_VIEWS.
127-
OUTCOME_ENGAGEMENT + On Event: EVENT_RESPONSES, IMPRESSIONS, POST_ENGAGEMENT, REACH.
128-
OUTCOME_ENGAGEMENT + On Page: PAGE_LIKES.
125+
OUTCOME_ENGAGEMENT + On Post (destination_type=ON_POST): POST_ENGAGEMENT, IMPRESSIONS, REACH. Also set promoted_object={page_id} at creation (immutable; without it create_ad fails with subcode 1885154). Do NOT use ON_AD here — ON_AD is the OUTCOME_LEADS instant-form destination and Meta rejects it for OUTCOME_ENGAGEMENT (subcode 1815715).
126+
OUTCOME_ENGAGEMENT + On Video (destination_type=ON_VIDEO): THRUPLAY, TWO_SECOND_CONTINUOUS_VIDEO_VIEWS.
127+
OUTCOME_ENGAGEMENT + On Event (destination_type=ON_EVENT): EVENT_RESPONSES, IMPRESSIONS, POST_ENGAGEMENT, REACH.
128+
OUTCOME_ENGAGEMENT + On Page (destination_type=ON_PAGE): PAGE_LIKES.
129129
OUTCOME_ENGAGEMENT + Messaging (MESSENGER/WHATSAPP/INSTAGRAM_DIRECT): CONVERSATIONS, LINK_CLICKS.
130+
OUTCOME_ENGAGEMENT "Profile and Page visits" (PROFILE_AND_PAGE_ENGAGEMENT with destination_type INSTAGRAM_PROFILE / FACEBOOK_PAGE / INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE) is shown in Ads Manager but NOT supported via the Marketing API — Meta rejects every variant (code 100). Closest API-supported option is POST_ENGAGEMENT + ON_POST.
130131
OUTCOME_TRAFFIC + WEBSITE: LANDING_PAGE_VIEWS, LINK_CLICKS, IMPRESSIONS, REACH.
131132
OUTCOME_AWARENESS: REACH, IMPRESSIONS, AD_RECALL_LIFT, THRUPLAY.
132133
OUTCOME_LEADS: LEAD_GENERATION, QUALITY_LEAD (forms), QUALITY_CALL (calls), OFFSITE_CONVERSIONS, LINK_CLICKS (website).
@@ -179,10 +180,16 @@ async def create_adset(
179180
Required for EU-targeted ad sets along with dsa_payor.
180181
dsa_payor: DSA payor for European compliance (person/org paying for the ads).
181182
Required for EU-targeted ad sets along with dsa_beneficiary.
182-
promoted_object: App config for APP_INSTALLS. Required: application_id, object_store_url.
183-
destination_type: Where users go after click. Common values: 'WEBSITE', 'WHATSAPP', 'MESSENGER',
184-
'INSTAGRAM_DIRECT', 'ON_AD', 'APP', 'FACEBOOK', 'SHOP_AUTOMATIC'.
185-
Also supports multi-channel combos like 'MESSAGING_MESSENGER_WHATSAPP'.
183+
promoted_object: For APP_INSTALLS: app config, required application_id + object_store_url.
184+
For OUTCOME_ENGAGEMENT On-Post (destination_type=ON_POST): set {"page_id": "<id>"} at
185+
creation — required for ads (else create_ad fails with subcode 1885154) and immutable
186+
afterward (cannot be added via update_adset).
187+
destination_type: Conversion location / where users go. Pass-through to Meta (no client-side validation).
188+
Common values: 'WEBSITE', 'WHATSAPP', 'MESSENGER', 'INSTAGRAM_DIRECT', 'APP', 'FACEBOOK',
189+
'SHOP_AUTOMATIC'. OUTCOME_ENGAGEMENT on-asset locations: 'ON_POST' (post engagement; needs
190+
promoted_object={page_id}), 'ON_PAGE' (PAGE_LIKES), 'ON_EVENT', 'ON_VIDEO'. 'ON_AD' is the
191+
OUTCOME_LEADS instant-form destination — do NOT use it for OUTCOME_ENGAGEMENT (Meta rejects
192+
it with subcode 1815715). Also supports multi-channel combos like 'MESSAGING_MESSENGER_WHATSAPP'.
186193
is_dynamic_creative: Enable Dynamic Creative for this ad set.
187194
frequency_control_specs: Frequency cap specs. MUST be set at creation time — Meta makes this field
188195
immutable after the ad set is created (error 1815198).
@@ -275,9 +282,11 @@ async def create_adset(
275282
}, indent=2)
276283

277284
# destination_type is passed through to Meta's API without client-side validation.
278-
# Meta supports 23+ values (WHATSAPP, MESSENGER, INSTAGRAM_DIRECT, ON_AD, WEBSITE,
279-
# APP, FACEBOOK, SHOP_AUTOMATIC, multi-channel MESSAGING_* combos, etc.)
280-
# and may add more. Let Meta's API reject invalid values.
285+
# Meta supports 23+ values (WHATSAPP, MESSENGER, INSTAGRAM_DIRECT, ON_AD, ON_POST,
286+
# ON_PAGE, ON_EVENT, ON_VIDEO, WEBSITE, APP, FACEBOOK, SHOP_AUTOMATIC, multi-channel
287+
# MESSAGING_* combos, etc.) and may add more. Validity depends on the campaign
288+
# objective (e.g. ON_AD is for OUTCOME_LEADS, ON_POST for OUTCOME_ENGAGEMENT) — let
289+
# Meta's API reject incompatible combinations.
281290
# See: facebook-python-business-sdk AdSet.DestinationType
282291

283292
# Basic targeting is required if not provided

0 commit comments

Comments
 (0)