Tutorial: How to add Additional Details ( Cart / Order Attributes ) to Draft Orders
Learn How to Add Additional Details ( Cart / Order Attributes ) to Draft Orders
Learn how to enhance you Shopify store's checkout experience by adding attributes to your draft orders. This tutorial will guide you through setting up these additional details for your draft orders so that your checkout customizations and extensions can use these values to preform custom functions. In this example the the attribute being created today will be used to hide the 'Money Order' payment method on draft orders. Let's get started!
Steps
Step 1
Open Shopify Flow and Create a new workflow
Creating a new workflow will allow you to create a new trigger that automatically adds the additional details when a new draft order is made.
Step 2
Select the 'Draft Order Created' Trigger
This will be what is used to 'tigger' the start out the workflow
Step 3
Add an Action
We will add an action that will happen when the draft order is created
Step 4
Select 'Send Admin API Request'
This will the action to talk to Shopify and update the Draft Order
Step 5
Add 'draftOrder Update' as the Admin API Action
This will allow you to update the draft order that was just created
Step 6
Add the code to update the draft order attributes
Here is the code section prewritten. Feel free to update the Key and Value to values that work for you particular store
{
"id": "{{draftOrder.id}}",
"input": {
"customAttributes": [
{
"key": "is_draft",
"value": "true"
}
]
}
}
Step 7
Turn on the workflow and (Optional) Update the workflow name
Turning on the workflow will now enable this code to update all draft orders that are created with this additional value attribue
Step 8
Test it out by creating a draft order!
Create a draft order and take a look at the new value in the bottom right of the order in the Shopify Admin dashboard
Step 9
Use the attribute in the Checkout Plus App
You can now use this new value in the draft order for checkout customizations. Here is an example of the Payment Customization in the Checkout Plus app hiding the 'Money Order' payment method on draft orders!
Thank you and please contact us if you have any questions or feedback!
Updated on: 13/06/2025
Thank you!