What's your biggest current challenge? Have your say in Community Polls along the right column.

Additional Details from order

Solved

Additional Details from order

flownyc18
Excursionist
13 0 4

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:

flownyc18_0-1732575207322.png

 

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!

 

Accepted Solution (1)
paul_n
Shopify Staff
1445 157 334

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 %}

  

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.

View solution in original post

Replies 6 (6)

paul_n
Shopify Staff
1445 157 334

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.

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
flownyc18
Excursionist
13 0 4

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!

paul_n
Shopify Staff
1445 157 334

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

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
flownyc18
Excursionist
13 0 4

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:

flownyc18_0-1733179895707.png

thank you!!

paul_n
Shopify Staff
1445 157 334

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 %}

  

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
flownyc18
Excursionist
13 0 4

Thank you @paul_n ! that worked!