Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi,
We are currently capturing gift messages for some orders under the "additional details" section. I would like to set up a flow such that when the Additional Details section has the field "Gift message", that the value in this field is automatically copied into the "Notes" field for the order. See below for what I mean:
Please note this should only happen when the attribute being captured is "Gift message". Any other attributes that are included under Additional Details should not be copied into the Notes field.
Thanks for your help!
Solved! Go to the solution
This is an accepted solution.
You are using a key that doesn't exist. I think based on the UI above it's "Gift message", including space and capitalization. You can also test what it is by using the "log output" action and putting something like this in it:
{% for ca in order.customAttributes %}
key:{{ ca.key }}
value: {{ ca.value }}
{% endfor %}
Those are `order / customAttributes` with key of "Gift message" and message of "Thank you!"
There is an action to "update order note". Make sure you include the existing "{{ order.note }}" unless you want to overwrite it.
Hi @paul_n thanks for your reply. I'm still confused on how to actually implement this. Do I update the order note with code or something else? Additionally, the message of "Thank you!" was just an example. I want to update the order note (and overwrite it) with whatever value is included in the key of "gift message", when that key exists (sometimes there is no key of "gift message"). Thanks!
You add an "update order note" action.
You put code in it to output whatever custom attributes you want in it. This page has a bunch of examples, including one that outputs custom attributes https://help.shopify.com/en/manual/shopify-flow/reference/variables#complex-data-objects
Hi @paul_n thank you! i was able to get the flow to run but it's not updating the gift note field. are you able to let me know what i'm doing wrong? here's my code:
thank you!!
This is an accepted solution.
You are using a key that doesn't exist. I think based on the UI above it's "Gift message", including space and capitalization. You can also test what it is by using the "log output" action and putting something like this in it:
{% for ca in order.customAttributes %}
key:{{ ca.key }}
value: {{ ca.value }}
{% endfor %}
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024