Skip to main content
Solved

SFRA Commerce Cloud Cartridge events not showing


Forum|alt.badge.img+2

I have installed the integration Cartridge for SFRA Commerce Cloud.
I can only see the OCAPI “Placed Order" and “Ordered Product”.

I have installed this in Project > Client > Cartridges so I can use for multiple sites, but when I try and add

this below the path cannot be found so my events are not firing from the Cartridge. 

I placed the pageFooter.isml 
 

 

<isinclude template="klaviyo/klaviyoFooter"/>

Best answer by Taylor Tarpley

Hi @scullchr

 

We’ve looped in a Success Engineer to further troubleshoot this with you so we can get to the bottom of this issue together! 

 

Thanks for sharing your question with the Community!

-Taylor 

 


Later Edit: The issue this user experienced was related to the fact the customer email address was not being added to the Added to Cart events, and so when the API request to Klaviyo is made, the API is rejecting the request. Once the added to cart snippets was correctly placed in the app_storefront_base code the AddProduct function referred to in the documentation fired successfully. 
 

View original
Did this topic or the replies in the thread help you find an answer to your question?

6 replies

Forum|alt.badge.img+1
  • Klaviyo Employee
  • 4 replies
  • May 12, 2022

Hi there,

Thank you for posting!
Could you please confirm that you’ve also completed step 2 for the SFRA section for adding the snippets?  In addition, could you please confirm that the Klaviyo Cartridge is active and contains the necessary API keys?
The Cartridge will only send the metrics if it’s active and the API keys have been added to the settings appropriately.
If all of these requirements are met, then could you please confirm if you’re seeing any error messages on the Salesforce side?  If so, would you please share them here?  Thank you!


Forum|alt.badge.img+2
  • Author
  • Contributor IV
  • 7 replies
  • May 13, 2022

Thanks Chuck.

Yes, I have set up Step 2.

And the Klaviyo Cartridge is Active with correct API keys.

However, how would I use this function in Cart.js if I wanted to prepend this to AddProduct?

ie.

server.prepend('AddProduct', function (req, res, next) {

if (dw.system.Site.getCurrent().getCustomPreferenceValue('klaviyo_enabled')) {

var KlaviyoUtils = require('*/cartridge/scripts/utils/klaviyo/klaviyoUtils');

KlaviyoUtils.trackAddToCart();

}

return next();

});

 

The error I currently get is:

 trackEvent() failed for email: undefined. Service Connection for send email via Klaviyo returned null.

I currently have 3 different Salesforce CC websites where I would need these base Cartridges added to. So I was not sure if some of these need to be defined within the app_site_skin itself.

Do you have an example site structure for SFRA + Klaviyo integration?


Cheers


Forum|alt.badge.img+2
  • Author
  • Contributor IV
  • 7 replies
  • May 16, 2022

Hi. Can anyone help with the above?


Forum|alt.badge.img+2
  • Author
  • Contributor IV
  • 7 replies
  • May 19, 2022

Any Klaviyo team SFRA developers have any advice?


Taylor Tarpley
Community Manager
Forum|alt.badge.img+60
  • Community Manager
  • 2148 replies
  • Answer
  • May 19, 2022

Hi @scullchr

 

We’ve looped in a Success Engineer to further troubleshoot this with you so we can get to the bottom of this issue together! 

 

Thanks for sharing your question with the Community!

-Taylor 

 


Later Edit: The issue this user experienced was related to the fact the customer email address was not being added to the Added to Cart events, and so when the API request to Klaviyo is made, the API is rejecting the request. Once the added to cart snippets was correctly placed in the app_storefront_base code the AddProduct function referred to in the documentation fired successfully. 
 


Forum|alt.badge.img+2
  • Author
  • Contributor IV
  • 7 replies
  • May 23, 2022

Hi Chuck. Please check my ticket support number 905407


Reply