2. Migrating your Giftnote email flows from Klaviyo to Attentive

Step-by-step guide to moving your Giftnote gift message and gift card emails from Klaviyo to Attentive, including merge fields, images, testing and common errors.

Written By Giftnote Team

Last updated 15 minutes ago

Moving your email platform from Klaviyo to Attentive? You can keep your Giftnote email designs. You'll export each template's HTML, swap the merge fields (the placeholders that fill in names and messages), move your images, test with real data, and copy the finished journeys to any other stores you run.

Settings → Integrations → Attentive.

Before you start

  • Set up the Attentive integration first. See How to set up Attentive Integration.
  • Giftnote must be installed and connected to Attentive on every Shopify store that has its own Attentive account.
  • Attentive can't copy journeys between accounts. If you run several regional stores, you'll build each journey once, then copy it into each account manually (your Attentive rep can help).
  • Attentive sends Giftnote emails as transactional emails, so keep marketing content light.

Which flows move over

Klaviyo flowSent toAttentive
Gift order confirmation (send now / send later / on delivery)GifterSupported
Gift message delivered confirmationGifterSupported
Gift message emailRecipientSupported
Gift card purchased / gift card sentGifterSupported
Gift card received (with or without a message)RecipientSupported
Backend-issued gift cardCustomerSupported
Gift card balance updateCustomerSupported. The Attentive settings page in Giftnote lists a Redeemed Gift Card event ("A gift card has been used. Update the customer/recipient of the remaining balance.").

Shortcut: use AI to convert your templates

An AI assistant like ChatGPT or Claude can do most of the conversion. Copy the prompt below into the assistant, then paste your Klaviyo template HTML underneath it. Do one email at a time.

I'm migrating Giftnote email templates from Klaviyo to Attentive. Convert the Klaviyo HTML I paste below into Attentive-ready HTML. Return the full HTML, then a short list of anything I need to check.

Rules:
1. Merge fields. Attentive uses Liquid with Giftnote data under triggerEvent.custom. Replace:
   - {{ event.To|default:'' }} -> {{ triggerEvent.custom['To'] | strip | default: 'there' }}
   - {{ event.From|default:'' }} -> {{ triggerEvent.custom['From'] | strip | default: 'Someone special' }}
   - {{ event.Message|default:'' }} -> {{ triggerEvent.custom['Message'] | strip | escape | newline_to_br }}
   - event|lookup:'Delivery Method' -> triggerEvent.custom['Delivery Method'] (values: On Delivery, Send Now, Send Later, On Fulfillment)
   - event|lookup:'Gift Card Value' -> triggerEvent.custom['Gift Card Value'] (number only, no currency symbol)
   - event|lookup:'Gift Card Code' -> triggerEvent.custom['Gift Card Code']
   - Order items loop: {% for item in triggerEvent.custom['Order Items'] %} with item['Title'], item['Quantity'], item['Image'], item['URL'] (URL in capitals), item['Variant']
   - Use Attentive's filter syntax: default: 'text' (with a space), not Klaviyo's default:'text'. Never use Klaviyo's |lookup: filter.
2. Replace {{ organization.url }} and {{ organization.url|trim_slash }} with my store URL: [YOUR STORE URL]
3. Currency: put [YOUR CURRENCY SYMBOL] before the gift card value. Remove any $ typed in by Klaviyo if my currency is different. To trim .0 or .00 from whole amounts, use this exact snippet and never index a split array like [1]:
   {% assign gcv = triggerEvent.custom['Gift Card Value'] | strip %}{% if gcv contains '.' %}{% assign gcvparts = gcv | split: '.' %}{% if gcvparts.last == '0' or gcvparts.last == '00' %}{{ gcvparts.first }}{% else %}{{ gcv }}{% endif %}{% else %}{{ gcv }}{% endif %}
4. Add {{companyAddress}} as a small line at the bottom of the footer. Attentive requires it.
5. Remove the Klaviyo font @import line and the TRACKING_PIXEL_TOP / TRACKING_PIXEL_BOTTOM comments.
6. Fix any {% if %} that opens inside one HTML element and closes inside another, so each {% if %} and {% endif %} sit in the same element.
7. Wrap the gift message section in {% if triggerEvent.custom['Message'] != blank %} ... {% endif %} so it hides when there's no message.
8. If a "button" is plain text styled to look like a button with no link, turn it into a real link to my store URL.
9. List every image URL that starts with d3k81ch9hvuctc.cloudfront.net (hosted by Klaviyo) so I can move them to Shopify Files.
10. Keep the design, colours, layout and Outlook conditional comments the same.
11. Also give me an Attentive version of the subject line and preview text if I paste them.

Klaviyo HTML:
[PASTE YOUR KLAVIYO TEMPLATE HTML HERE]

Replace the three items in square brackets before you send it. Check the result and run the test in Step 6 before publishing. AI makes mistakes, and Attentive sends transactional emails even when they contain errors.

Step 1: Export your Klaviyo templates

In Klaviyo, open each Giftnote flow email and export or copy its HTML. Keep one file per email so you can work through them one at a time.

Remove this Klaviyo-only code, which won't work in Attentive:

  • The Klaviyo custom font import (@import url(https://static-forms.klaviyo.com/...))
  • The <!-- TRACKING_PIXEL_TOP --> and <!-- TRACKING_PIXEL_BOTTOM --> comments

Step 2: Move your images off Klaviyo

Images added in Klaviyo's editor live in your Klaviyo account (their links start with d3k81ch9hvuctc.cloudfront.net). If you close or clean up that account, those images break. Host them in Shopify Files instead:

  1. Download each image from the Klaviyo template.
  2. In Shopify admin, go to Content > Files > Upload files.
  3. Copy each file's link and replace the matching src in your HTML.

Shopify file links are public, so one set of links works across all your Attentive accounts. Don't delete these files later, or the emails will show broken images. Replace Klaviyo's default social icons the same way.

Step 3: Swap the merge fields

Attentive uses Liquid, and Giftnote data sits under triggerEvent.custom. Field names are case-sensitive and must match exactly.

DataKlaviyoAttentive
Recipient name{{ event.To|default:'' }}{{ triggerEvent.custom['To'] | strip | default: 'there' }}
Gifter name{{ event.From|default:'' }}{{ triggerEvent.custom['From'] | strip | default: 'Someone special' }}
Gift message{{ event.Message|default:'' }}{{ triggerEvent.custom['Message'] | strip | escape | newline_to_br }}
Delivery method{{ event|lookup:'Delivery Method' }}{{ triggerEvent.custom['Delivery Method'] }} (values: On Delivery, Send Now, Send Later, On Fulfillment)
Gift card value{{ event|lookup:'Gift Card Value' }}{{ triggerEvent.custom['Gift Card Value'] }}
Gift card code{{ event|lookup:'Gift Card Code' }}{{ triggerEvent.custom['Gift Card Code'] }}
Store link{{ organization.url }}No equivalent. Type your store URL in directly.

Why the extra filters

  • strip removes trailing spaces customers often leave in names ("Sam " becomes "Sam").
  • default gives a fallback so a missing name doesn't read "Hey !". Note Attentive's syntax is default: 'text', not Klaviyo's default:'text'.
  • newline_to_br keeps the line breaks in multi-line gift messages. Without it, a letter-style message collapses into one paragraph.
  • escape stops characters like < or & in a message from breaking the email.

Order items loop

Gift order events include an Order Items list. Each item has Title, Quantity, Image, URL, Variant, Price and Sku. Note URL is all capitals.

{% if triggerEvent.custom['Order Items'] %}
  {% for item in triggerEvent.custom['Order Items'] %}
    <img src="{{ item['Image'] }}" alt="{{ item['Title'] }}" width="100">
    <a href="{{ item['URL'] }}">{{ item['Title'] }} x {{ item['Quantity'] }}</a>
    {% if item['Variant'] %}Variant: {{ item['Variant'] }}{% endif %}
  {% endfor %}
{% endif %}

Check your Klaviyo HTML for {% if %} tags that open inside one element and close inside another. Klaviyo's editor often produces these. Keep each {% if %} and its {% endif %} inside the same element.

Gift card value and currency

Gift Card Value is a number only, with no currency symbol, so add the symbol yourself (for example &pound; for £). Klaviyo templates often have $ typed in, so check this on non-USD stores.

To show whole amounts cleanly (£50 rather than £50.0) while keeping pence where they exist:

{% assign gcv = triggerEvent.custom['Gift Card Value'] | strip %}{% if gcv contains '.' %}{% assign gcvparts = gcv | split: '.' %}{% if gcvparts.last == '0' or gcvparts.last == '00' %}{{ gcvparts.first }}{% else %}{{ gcv }}{% endif %}{% else %}{{ gcv }}{% endif %}

Don't use split with an index like gcv[1]. Attentive throws an "Index out of bounds" error when the value has no decimal point.

Branching by delivery method

You can change the wording inside one email instead of building separate journey paths:

{% assign method = triggerEvent.custom['Delivery Method'] | strip %}
{% if method == 'Send Later' %}
  Your gift message is scheduled.
{% elsif method == 'On Delivery' %}
  Your gift message will be sent once the order is delivered.
{% else %}
  Your gift message is on its way.
{% endif %}

Step 4: Add the required footer

Attentive requires your company address in every email. Add this to your footer, and make sure your address is set in each Attentive account:

{{companyAddress}}

Step 5: Build the journey in Attentive

  1. Create a new journey and choose the matching Giftnote event as the trigger.
  2. Add a Send email step and paste your HTML into the HTML editor. Don't use the HTML block inside the drag-and-drop editor, as it doesn't support {% for %} loops.
  3. Mark the email as transactional.
  4. Set entry frequency to 0 hours, so someone who receives two gifts close together gets both emails.
  5. Update the subject line and preview text with Attentive merge fields too.

Check the right event and recipient

Each Giftnote event is sent to a specific person. For example, Placed Gift Order goes to the gifter. Make sure recipient-facing emails ("Hey Sam, Alex sent you a gift!") use an event that's sent to the recipient, not the gifter. The Attentive settings page in Giftnote (Settings → Integrations → Attentive) tags every event as customer, recipient or both.

Fields also differ between events. A gift card sent without a message may not include From. Open the personalisation (macro) picker in the email editor to see exactly which fields your trigger event has, or select Preview on the event in Giftnote.

If you renamed an event with Edit in Giftnote, choose the renamed event as your journey trigger.

Step 6: Test with real event data

Attentive doesn't have a "send test event" button of its own. Giftnote's Attentive settings page does: select Test on an event, or Test All, to send a sample event. That confirms the trigger reaches your journey. Sample events carry sample data, so test the email itself with a real order to your own email address. Place a test order (or a test gift card purchase for gift card flows) with a gift message.

To see everything Giftnote sent, temporarily add this to the top of your email, trigger a test, then remove it:

<pre style="font-size:11px;white-space:pre-wrap;">{{ triggerEvent.custom }}</pre>

A gift order event looks like this:

{
  "Message": "Happy birthday!\nHope you love it.\nAlex",
  "Delivery Method": "On Delivery",
  "Order Items": [
    {
      "Price": "39.0",
      "Quantity": 1,
      "Image": "https://cdn.shopify.com/.../product.jpg",
      "Title": "Example Product",
      "URL": "https://your-store.myshopify.com/products/example-product",
      "Sku": "EXAMPLE-SKU-01",
      "Variant": "Blue / Large"
    }
  ],
  "Order Skus": ["EXAMPLE-SKU-01"],
  "To": "Sam ",
  "From": "Alex "
}

Check that:

  • Names, message and line breaks display correctly
  • Product images, titles and links show in the order items section
  • Gift card emails show the code and the correct currency and amount
  • Every image loads and links go to your store
  • The email looks right on mobile

Liquid errors don't stop transactional emails from sending. A typo in a merge field goes straight to your customer, so test every journey before publishing.

Step 7: Go live

  1. Publish your Attentive journeys.
  2. On the same day, turn off the matching Klaviyo flows so customers don't get two emails, or none.
  3. Turn off Giftnote's own emails for the same events: in the Giftnote app, go to Settings → Notifications, open each notification and switch off its Email channel.
  4. Check Integration Enabled is on in Settings → Integrations → Attentive, with a switch on for every event you built a journey for.

Rolling out to other stores

Treat your first completed store as the master copy. For each additional Attentive account:

  1. Install Giftnote on that Shopify store and connect the Attentive integration.
  2. Copy each journey and email HTML across.
  3. Update the currency symbol in gift card emails.
  4. Update store links if the store uses a different domain.
  5. Confirm the company address is set in that account.
  6. Run one test order before publishing.

Troubleshooting

Error or issueFix
Please include {{companyAddress}} in the emailAdd {{companyAddress}} to the footer (Step 4).
Please remove or replace the following invalid macro(s)That field isn't on the journey's trigger event. Check the macro picker and remove or replace it, including in the subject line.
Invalid liquid syntax: Index 1 out of boundsAvoid indexing split values like [1]. Use the gift card value snippet above.
Product links all go to the homepageUse item['URL'] in capitals, not item['url'].
Gift message shows as one long paragraphAdd | newline_to_br to the message field.
Wrong currency symbolThe value has no symbol. Update the symbol typed before it for that store.
Product image missing in Outlook desktopOutlook desktop doesn't display .webp images. Use JPG or PNG product images where possible.
Customers receive two emailsTurn off the matching Klaviyo flow and Giftnote's native notifications.
Journey doesn't trigger at allIn Giftnote, check Integration Enabled and the event's switch are on, then select Test on the event. If you renamed the event with Edit, pick the renamed event as the trigger.

Need a hand? Chat with us using the chat button in the help centre (https://help.giftnote.com/en) or in the app, or email support@giftnote.com.