Cyber Monday price changed after render: rerun one SKU or continue it?

One SKU's price changed after its video rendered. Send a new run with new input, or continue the old run with previous_run_id. Here is when each fits.

3 min readSume
All posts

Continue the old run when the picture is right and only a fact changed; start a fresh run when the creative should change too. Both are one call to the same Format endpoint, and the choice is previous_run_id or not.

Continue with previous_run_id

previous_run_id continues an earlier run of the same Format. It must be terminal, so wait for completed first. The docs list four refusals: previous_run_not_found, previous_run_format_mismatch, previous_run_not_terminal and previous_run_not_resumable. A continued run's media list spans the whole conversation, but usage stays per run, so the revision is billed on its own.

curl -sS -X POST "https://api.sume.com/v1/formats/sume/product-commercial/runs" \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: reprice-SKU-1042-v2" \
  -d '{
    "previous_run_id": "'"$OLD_RUN_ID"'",
    "instruction": "Same video, change the price on screen to $28."
  }'

Start fresh

Send a new run with the new input when the first result missed on look, or when the old run failed or never produced anything to continue (previous_run_not_resumable). Use a different key; the old key would replay the old run with 200 and idempotency_hit: true.

Check the result

Either way, read the finished run from result_url. Nobody approves an API run, so treat the on-screen price as something to verify before you publish.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume