line_item_record_execution
Record one provider object a line item created, so the plan knows what came from where.
Records that this Line Item created a particular provider object. Call it after each create.
Input
| Field | Type | Required | Description |
|---|---|---|---|
campaign_plan_name |
string |
yes | The plan that owns the line. |
line_item_id |
lni_… |
yes | Which line this object came from. |
provider |
enum |
yes | meta, tiktok, gads, snapchat, dv360. |
entity_type |
string |
yes | The provider’s own word for the level: campaign, adset, ad. |
entity_id |
string |
yes | The native provider id, unprefixed, exactly as the create returned it. |
advertiser_id |
acc_… |
yes | The account it was created in. |
mutation_workflow_id |
string |
no | The workflow id the create returned, when you have it. |
Example
const created = await meta_create_campaign({/* … */});
line_item_record_execution({
campaign_plan_name: 'q4-acquisition',
line_item_id: 'lni_abc',
provider: 'meta',
entity_type: 'campaign',
entity_id: created.campaignId,
advertiser_id: 'acc_123',
mutation_workflow_id: created.workflowId,
});
Requires the campaign_plan:write scope.