Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
In the Shopify-Admin, each order displays two sections on the right-hand side: "Notes" and "Additional details". The "Additional details" section contains custom fields such as:
Delivery Method
Delivery Date
Delivery Time
These fields are submitted during checkout and stored as order note attributes.
Objective:
When a new order is created, I want to trigger a ShopifyFlow workflow that:
Retrieves the values from the Additional details (i.e., note attributes).
Extracts the Delivery Method, Delivery Date, and Delivery Time.
Automatically applies these values as order tags.
Can someone help?
Thanks for your message.
We can set it up so that orders are automatically tagged with the delivery details taken from the "Additional Information" section when the order is created. Just let us know if you have any specific format or tagging rules in mind.
After adding tag it should look something like this :
in Orders :
Thanks for the clarification!
Yes, once the tag is added, it should reflect in the format you've shown
So how to do it??
Sure, here is how you do it using a Run Code condition to create objects for each of your "Delivery-" order attributes. Once those are created, you just reference those with an Action to add order tags
Here is the Run Code javascript that I think will work:
export default function main(input) {
const attributes = input.order.customAttributes || [];
const deliveryData = {};
attributes.forEach(attr => {
if (attr.key && attr.key.startsWith("Delivery-")) {
const camelKey = attr.key
.replace("Delivery-", "")
.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase()); // kebab to camelCase
const finalKey = "delivery" + camelKey.charAt(0).toUpperCase() + camelKey.slice(1);
deliveryData[finalKey] = attr.value;
}
});
return deliveryData;
}
Run Code output should be:
{
"deliveryMethod": "localDelivery",
"deliveryDate": "2025-05-09",
"deliveryTime": "08:00–20:00",
"deliveryLocation": "Abu Dhabi"
}
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025