batch_to_plan_group
Turn a finished creative batch into an ad plan group: one plan per done cell, built from source_plan_id (an ad plan whose shape every cell’s ad takes) as create_ad_plan_variants builds copies.
Each plan takes its cell’s image in the first media field it fits (as creative:<id>), its copy variant in the step its format writes (held to that copy’s approval at review), and its ad and creative names from the build spec’s name_templates (update_ad_build_spec). Each cell is a row of the batch’s table, recorded as the plan’s source_row. Cells the source cannot take (a size no field fits, a copy format no step writes, a market with no account, unfinished) are listed in skipped with the reason; spec_issues lists images that break their field’s platform spec. Stores plans only: review with freeze_ad_plan_group, then publish_ad_plan_group.
Returns: group (as get_ad_plan_group), table_id, plans [{cell, key, label, account_id, names}], skipped [{cell, reason}], spec_issues [{cell, step_id, field, message}], name_templates; a preview has no group or table
Parameters#
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
batch_id | string | yes | Creative batch id (crjob_…) from start_creative_batch; it must have finished. | |
source_plan_id | string | yes | The ad plan every cell’s ad is built from. | |
expected_version | integer | yes | The source plan’s current version. | |
request_key | string | no | A key you choose; reuse it after an uncertain response. Not needed for a preview. | |
account_by_market | object | no | {market: ad account id}, e.g. {“de-DE”: “act_1”}; cells with no market use the source’s account. | |
title | string | no | The group’s title (default: the source’s). | |
name_templates | object | no | {ad?, creative?} naming templates for this build (default: the build spec’s; tokens as in update_ad_build_spec). | |
preview | boolean | no | false | True: list the plans it would build, with their names, and write nothing. |
Generated by generate_mcp_docs from the server tool. Add to this page below this block; the block is rewritten on every run.