Developer Showcase #2: Matias Lugli, Developer Manager at Tavano

David Henriquez
Klaviyo Developer Blog
4 min readJun 13, 2022
Matias Lugli
This guest post was written by Matias Lugli of Tavano.

Background

I’m Matias Lugli, Development Manager at Tavano Team, a leading eCommerce agency specializing in driving growth for eCommerce businesses running on NetSuite. Our goal is to help businesses build an eCommerce ecosystem that is fully integrated with NetSuite, fulfilling their all-in-one platform dream.

Why did I build on top of Klaviyo?

At Tavano, we’ve seen how important personalized marketing and transactional messaging can be for an eCommerce business. Luckily, we found Klaviyo to provide a flexible, high-performing, and robust solution for our clients.

Klaviyo Insights: NetSuite Integration

The integration of Klaviyo with other platforms is made possible by its high flexibility. In the case of the integration between Klaviyo and NetSuite, we broke out our integration into two core areas:
Frontend: Using NetSuite’s Extensibility API and Klaviyo’s onsite JavaScript APIs, we built a module capable of tracking user activity throughout the website.
— Backend: To make the solution robust and secure, the tracking of transactions was made with SuiteScript (NetSuite’s server side language).

Tips, Tricks, and Learnings: NetSuite Integration

Passing data from NetSuite to Klaviyo
The main tracked events included are:
— Add To Cart
— New Profile Creation
— Profile activity
— Product View
— Page View
— Started Checkout
— Placed Order

Klaviyo allows the tracking of anything and everything you want, including custom events. Klaviyo’s flexibility makes it easy for the event information sent to Klaviyo to be entirely configurable by a NetSuite Admin.

Fields can be added as columns making the most of NetSuite’s native components and functionalities, such as “Saved Searches”.

NetSuite Saved Searches UI
NetSuite Saved Search UI

When to send the data to Klaviyo?
Because Klaviyo has no restrictions on data structure, one of our main goals is to help our clients define what events need to be sent to Klaviyo, in addition to the events listed above that are part of our standard integration. We’ve built integrations that send data spanning fulfillments, invoices, shipping, client status, and much more! In short, we can send any information to Klaviyo at any time, without restrictions.

Challenge: Faced & Overcome
Over our time as a partner of Klaviyo, the main challenge we encountered was to develop a configurable and dynamic solution (plug-and-play) that adapts to all clients without the need for direct interaction with repositories or for a custom development. Due to the high customization that is possible in NetSuite, different accounts can have large variations.

To help here, we used components of NetSuite’s Extensibility API which helped immensely, allowing us to obtain data from sessions, carts, customers, transactions, and more.

Code-level examples to access data in NetSuite

GetCart:

Example code of accessing a shopping cart in NetSuite
Accessing shopping cart data

Get Billing Address:

Example code accessing a billing address in NetSuite
Accessing billing address information

Get Profile:

Example code accessing a user profile in NetSuite
Accessing user profile information

Learnings: Using Google Tag Manager (GTM) to track on-site activity

Using Google Tag Manager (GTM) for onsite script management eased the process of managing disparate accounts. Specifically, we used a trigger + tag for each one of the events we wanted to track on the website:

Google Tag Manager UI
Google Tag Manager (GTM) tag interface

I strongly recommend using GTM in the development of integrations with Klaviyo. It provides a great interface to manage your onsite event tracking that even non-technical clients can easily understand and reason through.

That’s a Wrap!

If you’re interested in learning more about Klaviyo’s APIs and developer experience, please visit Klaviyo’s developer portal, developers.klaviyo.com and if you want to write about your experience as a Klaviyo Developer, reach out to developers@klaviyo.com!

--

--