How to use FLOW to add order tags where discount code was a line item entry

How to use FLOW to add order tags where discount code was a line item entry

JAMES86
Tourist
4 0 3

Hi,

 

I am not quite experienced enough to find a way to get FLOW to add order tags (dynamically named the same as the dicoucnt code used) where the discounts on products in an order have been added by a thrid party app (Honeycomb Upsell).

 

The discount codes appears on the order under the SKU on each line entry but the overall Discount Code field on the order is empty! These are highlighted in yellow on the screenshot

 

The issue is that these discount codes are read by the app (to check they exist) and are then applied to to the order, but Shopify itself does not register those discount codes having been used, as they took place within the app at the point of checkout.

 

A workaround to check if these have been used is to add them as an order tag and then I can search for them in the order search bar. The discount tag entries under each line item do not pull up on the search on the order list. 

 

However I have been unable to get a Flow working to achieve this.

 

Can anyone assist?

 

Untitled-2.jpg

Replies 7 (7)
JAMES86
Tourist
4 0 3

Hi,

 

I can't find Klaviyo Flows? Is it an app? I only know Klaviyo as an email marketing service. 

 

I tried SC Order Tags & Flows and they can't do it as they think they would integration with Honeycomb Upsell app.

 

But the info exists on the order screen, so i really would have thought Shopify Flow would be able to read it and process them as a tag

PaulMartin
Shopify Partner
591 57 136

He's a bot @JAMES86 . There have been multiple bots showing up with that message format saying that they have been in similar situations.

PaulMartin_0-1726493661808.png

Adding order tags is easy with Flow, but since you're using dynamic data from the discount app, it's a lot more complex. I recommend you contact Kalen at flow-helper.com. His work circles around the Shopify Flow app, so he's very good at it and I bet he'll be able to help you. If you happen to contact him, tell him I said "Hi 👋"




[email protected]
Feel free to email me! 😄
I'm open to conversations or work ʕ •ᴥ•ʔ
JAMES86
Tourist
4 0 3

Hi,

 

Unfortunately i can't actually afford Kalen's rates. 

 

As far as I can see, the info is added by the Honeycomb app and it exists within a field under the SKU on the order page.

 

But the info is there and part of the final order, and I would have thought this info is accessible as some kind of line item information that can be read by SHopify?

PaulMartin
Shopify Partner
591 57 136

I believe you can still ask him for information regarding how to get that information from the line item then how to apply it to the order - without having to pay. He's really friendly and open to talk if he's not busy with his clients.

Try sending him an email, if he pitches you with his service, you can kindly decline, there's no pressure. If he replies with directions but still pitches his service, give him a thanks and kindly decline. Sending a short email will still be a win for you since you'll get directions you can work with.

He's really the only guy I know who's open to talks about Flow in the community.

As for your question, I'm so sorry man. I'm really not good with Flow and my experience really just revolves around the store theme. I honestly wish I could help.

[email protected]
Feel free to email me! 😄
I'm open to conversations or work ʕ •ᴥ•ʔ

PaulNewton
Shopify Partner
7158 633 1488

Hi @JAMES86 👋 Contact the third party and confirm if A) the app can just already tag orders by itself  B) they use cart attributes, or any metafields to add or reference on the order.

It's important that important business process have some definition of what they are doing documented for your business, otherwise you lack any way to create critical redundancy.

If the app uses any of the above then use those in the flow, or make a feature request to that developer with your use case of what you need access too.

Otherwise use one of the other deeper automation apps to tie things together.

 

The send-admin-api-request action can now also get data BACK 

https://changelog.shopify.com/posts/flow-use-returned-data-from-send-admin-api-request-action

So query the order and do the parsing on the response.

 

If you need automation like that explored you can contact me.

Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.

 

Good Luck.

 

Contact [email protected] for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Kalen_Jordan
Shopify Partner
737 34 128

Might be line item custom attributes. Maybe try logging those out.

 

CleanShot 2024-09-16 at 12.59.17.png

tobebuilds
Shopify Partner
447 32 120

You can use the `discountAllocations` or `discountApplications` environment value to check which discounts were applied in Shopify Flow.

 

Which one to use depends on whether the discount was an automatic discount/discount code and whether it was a product/order/shipping discount:

 

  • Automatic order discount: Use Order > discountApplications > AutomaticDiscountApplication > title as the "Check if" condition
  • Order discount code: Use Order > discountApplications > DiscountCodeApplication > code
  • Automatic product discount: Use Order > lineItems > discountAllocations > discountApplication > AutomaticDiscountApplication > title
  • Product discount code: Use Order > lineItems > discountAllocations > discountApplication > DiscountCodeApplication > code
  • Automatic shipping discount: Use Order > shippingLines > discountAllocations > discountApplication > AutomaticDiscountApplication > title
  • Shipping discount code: Use Order > shippingLines > discountAllocations > discountApplication > DiscountCodeApplication > code

Example flow of auto-tagging a customer when a specific discount code is used; you can easily adapt this to tag orders:

 

tobebuilds_0-1726512416272.png


Hope this helps,

Tobe

 

EDIT: Use the "Order paid" event as the trigger

Founder, Regios Discounts app (4.9 stars, 58 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer