Solved

New Template: Linking To Product Page Not Saving

  • 29 November 2021
  • 7 replies
  • 174 views

Badge +4

Hi!

I’m having an issue getting my product title {{ item.title }} to link to the product page in my abandoned cart flow. This is in the dynamic product block that shows what the contact left in their cart. Every time I try to enter this - it won’t save and I get the ‘saving’ spinning wheel of death.

I’ve tried: {{ organization.url }}products/{{ event.extra.line_items.0.product.handle }}

I’ve tried: {{ organization.url }}products/{{ item.product.handle }}

I’ve also tried putting in the company website: https://www.companysite.com/products/{{ item.product.handle }} 

 

Still… nothing is working. Any insight here.

 

However, when I do try just the company url - https://www.companysite.com it saves and works fine.

icon

Best answer by asempert 1 December 2021, 21:29

View original

7 replies

Userlevel 7
Badge +58

Hi @asempert,

Welcome to the Community and thanks for posting your question here!

Odd behavior that it does not save indeed. Are there other errors that come up or does it just get stuck in the saving phase? Take note that only variables available in the Flow are what is passed on to Klaviyo via integration. That said if Product link URL is not passed through relevant metrics you are using to trigger the flow ex. placed order etc, it won't be possible to use it.

Here is more information on how to use event variables. In addition, we have another useful article on How to View Raw Metric or Event Data in Klaviyo.

That said the cause could be that either of Started Checkout or Add to Cart metrics does not have product link URL that cans be referenced at this time. You can use other metrics that may suffice your goal and needs.

However, in the event that this could be a loading bug, I have created a ticket to see in case. If you would kindly followup with what success you have found or other info that would be great :)

 

Thank you!
Alex

Badge +4

It seems like it was a bug on the Klaviyo side! I removed the spaces from the {{organization.url }}products/{{event.extra.line_items.0.product.handle}} and it worked! 

Userlevel 7
Badge +58

Great thanks for reporting @asempert! Always important to follow exact syntax when working with code :)

Have a good one,

Alex

Badge +2

I’ve found that when I create a new abandoned cart flow, it gives new data...it now appears to be
{{ organization.url|trim_slash }}/products/{{ item.product.handle }}
Any idea where documentation including this information may live?

Thoughts?

Userlevel 7
Badge +58

Hi there @gpstew,

I’m not quite sure what you are referring to when you say your abandoned cart flow gives new data. Are you seeing some property changing or not appearing as intended? For resources on abandoned cart flows and variables, I have linked some articles below:

How to create an abandoned cart flow

About Using Event Variables to Personalize Flows

Template Tags and Variable Syntax

Badge +2

@alex.hong - thanks for the reply.

Sorry, confusingly worded.  
I had an abandoned cart flow and discovered that all of the item title links were broken.  Klaviyo’s documentation I was given (and what I thought had been working) said to link using the following code {{ organization.url }}products/{{ event.extra.line_items.0.product.handle }}  (It was missing the forward slash before products)

To fix, I setup an entirely new abandoned cart flow and noticed that the code is now
{{ organization.url|trim_slash }}/products/{{ item.product.handle }}

I was wondering if there is documentation that shows this updated code to use.

Userlevel 7
Badge +58

Hi there @gpstew,

I would be sure to double check your syntax, paying attention to spaces and any / you may have added or skipped.

Additional documentation and references can be found here:

 

Reply