Skip to main content

Klaviyo for Odoo

User guide

This guide covers Klaviyo for Odoo. It is one app that you install once. The parts for other Odoo apps switch themselves on when those apps are installed: Sales, Inventory, Point of Sale, eCommerce, Email Marketing, Loyalty and Repairs, and in Odoo Enterprise, Subscriptions, Appointments and Helpdesk. Section 5 says what each part sends.

1. Before you start

2. Install

  1. Open Apps, remove the "Apps" filter and search for "Klaviyo".
  2. Install Klaviyo for Odoo. Nothing else needs installing: the parts for Sales, Inventory and the other Odoo apps you use switch on by themselves.
  3. A new Klaviyo app appears. Opening it for the first time takes you to the setup assistant.

Every company has its own Klaviyo account record. In a multi-company database, open the app once per company.

3. Connect to Klaviyo

  1. In the setup assistant press Connect with Klaviyo.
  2. Sign in to Klaviyo and approve the access the app asks for. The permissions, and why the app needs each one, are listed at the end of this guide.
  3. Klaviyo sends you back to Odoo and the assistant moves on.

Odoo stores the access and refresh tokens encrypted (see "How the tokens are protected" below). A small relay run by FlexigoTech at connect.flexigotech.com only passes the tokens during sign-in and while refreshing them. It never receives contacts, orders or any other data. Your data goes straight from Odoo to Klaviyo.

If the connection breaks (for example Klaviyo revokes the app), the account shows "disconnected" and the Klaviyo Managers get an activity. Press Connect with Klaviyo again. The buttons Disconnect and Forget credentials are on the account form: Disconnect revokes the token in Klaviyo and removes the webhook, and Forget credentials is for a token Klaviyo could not revoke.

How the tokens are protected

The access token, the refresh token and the webhook secret are encrypted with Fernet before they are written to the database. The encryption key comes from one of two places.

We recommend setting klaviyo_token_key. Keep it the same on every server that runs this database, and keep a copy. If the key changes or is lost, Odoo cannot read the stored tokens. The account then goes to the state Error with the message "Reconnect Klaviyo", sends nothing, and does not keep retrying. Press Connect with Klaviyo again and the new tokens are encrypted with the current key. If you add the option to a database that already works, existing tokens keep working and are re-encrypted with the server key the next time they change.

Updating from a version that stored tokens without encryption encrypts them during the update.

4. The setup assistant

The assistant has five steps, and you can go back at any time.

  1. Connect.
  2. Who sends marketing. Choose Klaviyo, Odoo or both. This matters if you also send mass mailings from Odoo, because two systems must not email the same person. For email and for SMS you also choose who is authoritative for consent: Odoo, Klaviyo, or both (an unsubscribe in either one wins, and this is the default). Pick the Klaviyo list that new subscribers join. If the list uses double opt-in, Klaviyo sends the confirmation email itself.
  3. What to sync. Switches for contacts, email activity coming back to Odoo, catalog, lists from tags and erasure on delete, plus test mode (section 6). Each installed part adds its own switch, such as orders, invoices without a sales order, loyalty, repairs, mailing lists or store visitors.
  4. History. Optionally send the contacts you already have, and the past orders, deliveries, till orders, repairs, redeemed rewards, tickets, appointments and subscriptions of the parts that are installed. Choose a start date and the sources. This can be done later with the Send history button.
  5. Summary. It says in plain words what will happen. Press Start.

Everything works with the defaults. You can run the assistant again at any time from Set up Klaviyo on the account. It shows your current choices and only saves what you change.

5. What each part syncs

Klaviyo for Odoo (core)

WhatDirectionWhen
Contacts with an email or phoneOdoo to Klaviyo, as profilesQueued when a contact is created or changed, sent by a job that runs every minute
Field mappingOdoo to KlaviyoSame as contacts. Defaults work without configuration. You add fields on the Contacts tab
Contact tagsOdoo to Klaviyo, as listsChoose the tags on the Lists tab
Products for sale, variants, categoriesOdoo to Klaviyo catalogWhen they change, and a daily refresh for stock and prices
Marketing opt-outs and explicit consentBoth waysImmediately with the webhook, otherwise every 15 minutes
Email opens, clicks and emails received in 30 daysKlaviyo to OdooWith the webhook, written on the contact
Existing contactsOdoo to Klaviyo, in bulkOn demand, from the assistant

Details worth knowing:

Parts that switch on with other Odoo apps

Odoo appWhat is sentWhen
SalesPlaced Order and Ordered ProductWhen an order is confirmed
SalesCancelled OrderWhen an order that Klaviyo already saw as placed is cancelled
SalesRefunded Order, one per order with the accumulated totalAfter a settling period (48 hours by default, configurable) since the last refund
SalesPlaced Order and Ordered Product for invoices without a sales order (B2B), and Refunded Order when they are creditedOptional, off by default
SalesCustomer scores on the profile: Lifecycle Stage, RFM Segment, RFM Recency, Frequency and Monetary Score, Number of Orders, Total Spent and Last Order DateEvery night, for the contacts whose scores changed
SalesOrders of the pastOn demand, from the history step
InventoryFulfilled Order, with tracking number and carrierWhen a delivery is done. A partial delivery and its backorder are two events
Point of SalePlaced Order and Ordered Product, with the same names as Sales and the channel POSWhen a till order is paid
Point of SaleRefunded Order, one per order with the accumulated total, and Refunded Order Adjustment for a refund made after it was sentAfter the same settling period as Sales
Point of SaleThe customer's most recent store (Most Recent Store ID, Name and Location) on the profileAfter each paid till order
Point of SaleTill orders of the pastOn demand, from the history step
eCommerceViewed Product, Added to Cart and Started Checkout, sent from the visitor's browser by Klaviyo's scriptOnly after the visitor accepts the optional cookies of Odoo's cookies bar, or when you manage visitor consent yourself
eCommerceThe public product page, image and website categories in the Klaviyo catalogWhen a product is published or changed
eCommerceA consent box at checkout for guestsOnly when you write a consent text on the account. Off by default
Email MarketingThe mailing lists you choose, as Klaviyo lists, and the people on them as profiles, with no second profile when an Odoo contact has the same emailWhen a list or a subscription changes, and a nightly check
Email MarketingConsent for that list, sent once for each person on it. Leaving a list takes the profile out of that list onlyWhen the person joins or leaves the list
LoyaltyLoyalty Points, Loyalty Level, Loyalty Next Reward, Loyalty Points To Next Reward, Gift Card Balance, Active Gift Cards, eWallet Balance, Active Coupons and Coupon Expires On, on the profileWhen a card, program or reward changes
LoyaltyRedeemed Reward, one per order and card5 minutes after the last change to the redemption
RepairsRepair Created and Repair CompletedWhen a repair is confirmed and when it is done. The repair request and the internal notes are never sent
Helpdesk (Enterprise)Opened Ticket and Closed TicketWhen a ticket is opened and when it reaches a closed stage. Free text written by the customer is never sent
Appointments (Enterprise)Booked Appointment and Cancelled AppointmentWhen a booking is accepted and when it is cancelled
Subscriptions (Enterprise)Started, Renewed and Cancelled Subscription, with the plan, recurring amount, monthly revenue and datesWhen the subscription is confirmed, renewed and closed
Subscriptions (Enterprise)Subscription properties on the profile: status, active subscriptions, monthly revenue, next invoice date and subscriber sinceWhen a subscription changes, and every night

Notes, section lines, down payments and empty lines of an order are not products. Confirming an order twice, or resetting it to draft and confirming it again, sends nothing new. The Orders tab on the account has the event names and the identifier prefix, and a filter to leave out orders that your online store already sends to Klaviyo.

Point of sale orders without a customer are not sent, and the email typed at the till for a receipt is never used. Lines paid at the till for a sales order are not sent twice.

In the online store, Klaviyo's script identifies a visitor only with data already saved: a signed-in customer, or a guest after they submit their address. It sends the email and the name, never the phone or the address. Employees browsing the store are not tracked, and in test mode anonymous visitors send nothing.

When Klaviyo sends your marketing, an Odoo mailing warns you before it goes to people who are already Klaviyo profiles. An unsubscribe made in Klaviyo also closes the subscriptions of the mailing lists you send to Klaviyo.

6. Test mode: trying it in production

Test mode lets you connect a real database and check the result before any customer reaches Klaviyo.

  1. In the assistant switch on Test mode. The module ships a contact tag called "Klaviyo test" and uses it by default.
  2. Give that tag to a few test contacts.
  3. Only tagged contacts are sent as profiles, get lists and consent. Untagged contacts are held back.
  4. Check the profiles in Klaviyo. Turn test mode off when you are satisfied.

Some rules apply while test mode is on:

7. Data protection: erase and release

To erase people from Klaviyo:

  1. Select the contacts, open Actions and choose Erase from Klaviyo (GDPR). Only Klaviyo Managers see this action.
  2. A dialog warns that this cannot be undone and that other contacts with the same email or number are blocked too. Confirm.
  3. Odoo asks Klaviyo to delete the profiles and marks the contacts as excluded, so they are never sent again. Klaviyo does the deletion in the background, usually within a few minutes.

If Klaviyo has no profile for the contact, nothing is left to delete and that counts as done. Klaviyo deletes every profile that has the identifier you give, so a shared phone number can affect another person. For that reason the connector uses the email when there is one, and the phone number only when there is no email.

If you want the Klaviyo profile erased whenever a contact is deleted in Odoo, switch on "Erase the Klaviyo profile when a contact is deleted" in the assistant. It is off by default, because deleting a duplicate contact should not erase a real customer. Merging duplicates never erases the profile of the contact that stays.

After an erasure the connector remembers the address, as a keyed hash and not in clear, and does not send anything with it to that Klaviyo account again, not even an opt-out. To allow an address again, select the contact and choose Release erased address (Klaviyo) in Actions. This is a deliberate step for a Klaviyo Manager.

Two things we saw in tests with a real account:

Data in special categories should not be mapped to Klaviyo properties. None are mapped by default.

8. The Status tab

Open the Klaviyo account and go to Status.

Odoo creates an activity for the Klaviyo Managers when:

Klaviyo limits how many requests it accepts. When it answers "too many requests" the queue waits as long as Klaviyo says and continues. Failed requests are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours before they are marked failed.

9. Timing you should expect

10. Known limits

11. Getting help

Send the status page numbers, the text of a failed job and your Odoo version to FlexigoTech support. How to reach us, and when we answer, is on the support page.

Permissions the app asks for

When you connect, Klaviyo asks you to approve these 14 permissions (scopes). Each one is used by a call the module makes.

ScopeWhy
accounts:readRead the account id, name, time zone and currency after connecting, and prove that the token works.
profiles:readFind the profile behind a duplicate error, read subscription state when polling, and check the result of bulk imports.
profiles:writeCreate and update profiles from Odoo contacts.
lists:readLoad your lists for the consent choice and find a list that already has a tag's name.
lists:writeCreate a list for a chosen tag and add or remove profiles.
events:writeSend order events and the history of events in bulk.
events:readRead consent events when Odoo has no public address for a webhook, and check what was stored.
metrics:readFind Klaviyo's own consent metrics, needed to read consent events.
subscriptions:writeSubscribe people who consented in Odoo and unsubscribe people who opted out in Odoo.
catalogs:readCheck the state of catalog items before updating or deleting them.
catalogs:writeCreate, update and delete catalog items, variants and categories.
data-privacy:writeSend data deletion requests when a manager asks to erase a contact.
webhooks:readCheck that the webhook Odoo created still exists and is enabled.
webhooks:writeCreate the webhook that brings unsubscribes and email activity back to Odoo, and remove it on disconnect.