Shopify Events fields_changed: only added should start a Sume job
Shopify Events' fields_changed is now an object with added, updated and removed. Start a paid Sume job from added only, and key it so replays are safe.

Shopify's changelog turns fields_changed from a flat array into an object with added, updated and removed arrays. For a handler that spends money, read only fields_changed.added when you want a new image or clip, and ignore updated and removed; a price edit or a deleted variant should not start a Sume job.
Payload details are from Shopify's Events payloads changelog, read 2026-10-01; retry rules from Sume's Jobs and results docs.
What changed in the payload?
Shopify says developers can now tell a resource or relationship being added, a value updated, or something removed, without a follow-up query. Its example: adding a variant to a product keeps the product's action as update and puts the variant path in fields_changed.added.
| Array | Meaning | Start a Sume job? |
|---|---|---|
added | Resource or relationship added | Yes, if it needs media |
updated | A value changed | No |
removed | Resource or relationship removed | No |
How do I filter in the handler?
Read the array, keep the paths you care about, and derive one key per path so the same added variant never maps to two jobs. Shopify's example path has the form product[id: '...'].variants[id: '...'].
function pathsToRender(payload) {
const added = payload.fields_changed?.added ?? [];
return added.filter((path) => path.includes(".variants["));
}
async function submit(path) {
return fetch("https://api.sume.com/v1/images", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.SUME_API_KEY,
"Content-Type": "application/json",
"Idempotency-Key": "variant:" + path,
},
body: JSON.stringify({
model: "openai/gpt-image-2.5",
prompt: "Studio photo of the new variant on a plain background",
}),
});
}Why use an idempotency key on the Sume call?
Deliveries can repeat and your handler can time out. Sume's docs say a retry of a submit should reuse the same Idempotency-Key so it returns the original job instead of billing a second one, and not to submit a new paid job for the same intent. On the video route, a replay returns the original job. Never build the key from a timestamp.
What about the headers Shopify removed?
The same changelog removes shopify-event-id and shopify-resource-id from Events deliveries and says to drop any code that depends on them. That is why the key above comes from the payload path. More in dedupe on the Sume job id, and the wildcard trigger syntax in one image per new variant.
Sources
Related posts
More in Integrations
- Shopify's Meta AI channel: product image variants from Sume
Shopify now lists Meta as an AI channel and shares products through Shopify Catalog. Here is what Sume can make for those listings: image variants and a video.
- Slack incoming webhook 1/sec: when 100 Sume jobs finish together
Slack incoming webhooks allow about 1 message per second. When 100 Sume jobs finish at once, store each webhook, then post to Slack from a paced queue.
- Snapchat Ads MCP and hosted Sume tools in one agent
Snap's Ads MCP server answers campaign questions and is read-only at launch. Add Sume's hosted MCP in the same agent to turn the findings into creative.
- Tavus PAL MCP connectors vs Sume hosted MCP tools and gates
Tavus MCP connectors let a PAL call third-party MCP servers. Here is what Sume's hosted MCP at mcp.sume.com exposes and the gates a paid call needs.
Written by Sume