{
"nodes": [
{
"id": "n-trigger",
"type": "trigger",
"position": { "x": 0, "y": 0 },
"data": { "nodeType": "TRIGGER", "entityType": "PRODUCT", "includeTags": ["fast-mover"], "excludeTags": [] }
},
{
"id": "n-create",
"type": "createPlan",
"position": { "x": 250, "y": 0 },
"data": {
"nodeType": "ACTION",
"actionType": "CREATE_OR_GET_PLAN",
"planType": "RESTOCK",
"brandSource": { "kind": "fromTrigger" },
"collectionSource": { "kind": "fromTrigger" },
"deadline": { "kind": "relative", "offsetDays": 30 }
}
},
{
"id": "n-add",
"type": "addItems",
"position": { "x": 500, "y": 0 },
"data": {
"nodeType": "ACTION",
"actionType": "ADD_ITEMS_TO_PLAN",
"planType": "RESTOCK",
"sourcePlanNodeId": "n-create",
"quantityStrategy": { "kind": "fixed", "quantity": 10 },
"shopScope": { "kind": "all" },
"sizeScope": { "kind": "all" }
}
},
{
"id": "n-email",
"type": "sendEmail",
"position": { "x": 750, "y": 0 },
"data": {
"nodeType": "ACTION",
"actionType": "SEND_EMAIL",
"to": ["buyer@example.com"],
"cc": [], "bcc": [],
"fromAddress": "no-reply@solya.app",
"fromName": "Solya",
"subject": "Restock plan {{steps.n-create.output.planName}} ready",
"bodyFormat": "markdown",
"bodyTemplate": "Added **{{steps.n-add.output.addedCount}}** items to plan {{steps.n-create.output.planId}}."
}
}
],
"edges": [
{ "id": "e1", "source": "n-trigger", "target": "n-create" },
{ "id": "e2", "source": "n-create", "target": "n-add" },
{ "id": "e3", "source": "n-add", "target": "n-email" }
]
}