Christmas shipping cutoff videos: put the last order date in input

A last-order-date promo is wrong the day the date moves. Keep the cutoff in each bulk item's input, derive it from one config, and re-run only what changed.

3 min readSume
All posts

A shipping-cutoff video is stale the moment a carrier moves the date. The safe pattern with Sume's Format API is to keep the date out of the instruction text and carry it in each item's input, generated from a single config row.

One config, many items

Each bulk item is a normal run body, so it can carry its own input object. Build the items from your shipping table, one per region or service level, and keep the Format the same.

const cutoffs = [
  { region: "US ground", lastOrder: "2026-12-15" },
  { region: "US express", lastOrder: "2026-12-20" },
  { region: "EU", lastOrder: "2026-12-12" },
];

const items = cutoffs.map((c) => ({
  instruction: "Last order date reminder, 9:16, festive but calm.",
  input: c,
}));

const res = await fetch(
  "https://api.sume.com/v1/formats/sume/product-commercial/bulk-runs",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.SUME_API_KEY}`,
      "Content-Type": "application/json",
      "Idempotency-Key": crypto.randomUUID(),
    },
    body: JSON.stringify({ concurrency: 3, items }),
  },
);
console.log((await res.json()).data.id);

When a date moves

Do not edit a finished run. Send a new item for the changed region only. If the creative was right and only the date was wrong, set previous_run_id to the earlier run to continue it; the API refuses with previous_run_format_mismatch if that run belongs to a different Format and previous_run_not_terminal if it has not finished.

Check before you ship

  • Read each run's output or media from result_url and confirm the date on screen. The agent writes it from your input; verify it, since nobody reviews an unattended API run.
  • A queue marked completed can still hold failed items, so check counts.failed.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume