Skip to content

fix: use delivery_goal_group instead of deprecated objective on draft campaigns - #46

Open
amurph491 wants to merge 1 commit into
mainfrom
alex/draft-delivery-goal-group
Open

fix: use delivery_goal_group instead of deprecated objective on draft campaigns#46
amurph491 wants to merge 1 commit into
mainfrom
alex/draft-delivery-goal-group

Conversation

@amurph491

Copy link
Copy Markdown
Collaborator

Summary

  • Draft campaign POST/PATCH payloads now use delivery_goal_group instead of the deprecated objective field, which is marked deprecated: true in the OpenAPI spec
  • Added a mapping table in the drafts skill so the agent correctly translates user goals (reach, clicks, etc.) to delivery_goal_group enum values (AWARENESS, WEBSITE_TRAFFIC, APP_PROMOTION, ENGAGEMENT_ON_SPOTIFY, LEAD_GEN)
  • Fixed incorrect delivery_goal_group enum values in docs (was AWARENESS | CONSIDERATION, now matches the actual OpenAPI spec values)
  • Marked objective as deprecated across endpoint, schema, and enum reference docs
  • Direct campaign creation (POST /campaigns) and estimate endpoints unchanged — API still requires objective there

Test plan

  • Create a draft campaign via /spotify-ads-api:drafts build and verify the POST payload uses delivery_goal_group (not objective)
  • Verify the draft campaign response includes delivery_goal_group
  • Run Scenario 6 and Scenario 15 from test-scenarios.md to confirm draft creation works end-to-end
  • Verify direct campaign creation (/spotify-ads-api:campaigns create) still uses objective (unchanged)
  • Verify audience estimates still use objective (unchanged)

🤖 Generated with Claude Code

… campaigns

The `objective` field is deprecated in the OpenAPI spec (marked `deprecated: true`
on both OptimizationPrefs and OptimizationPrefsDraftValues). Draft campaign payloads
throughout the plugin were still setting `objective` instead of `delivery_goal_group`,
causing issues for users when creating draft campaigns.

Changes:
- Draft campaign POST/PATCH payloads now use `delivery_goal_group` instead of `objective`
- Added objective-to-delivery_goal_group mapping table in drafts skill
- Fixed incorrect `delivery_goal_group` enum values (was AWARENESS|CONSIDERATION,
  now AWARENESS|WEBSITE_TRAFFIC|APP_PROMOTION|ENGAGEMENT_ON_SPOTIFY|LEAD_GEN)
- Added DeliveryGoalGroup enum to enums reference
- Marked `objective` as deprecated in endpoint, schema, and enum docs
- Updated draft campaign examples and test scenarios
- Direct campaign creation and estimate endpoints unchanged (API still requires
  `objective` there)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@amurph491 amurph491 added this to the v1.9.0 milestone Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants