Skip to main content
BatchCard
Integrations

Klaviyo Integration

The Klaviyo integration is available on the Pro plan and above. See pricing

Send your gift card recipient emails through your own Klaviyo account instead of Shopify's built-in email. You choose the channel per batch, so you can use Klaviyo for some sends and Shopify for others.

Read this first. Klaviyo flow emails are treated as marketing by default. Suppressed or unsubscribed recipients silently will not receive their gift cards until your flow is approved as transactional. This is the single most common reason a card shows "Sent to Klaviyo" but the recipient gets nothing. Fix it once: see Get your flow approved as transactional.

What you'll need

  • A Pro (or Business) BatchCard plan.
  • A Klaviyo account with permission to create API keys.
  • A Klaviyo private API key with the events:write and accounts:read scopes (both, see Step 1).

Step 1: Create a private API key

  1. In Klaviyo, go to Settings > API keys.
  2. Create a private API key.
  3. Grant it both scopes:
    • events:write, so BatchCard can send gift card events.
    • accounts:read, so BatchCard can verify the key and show you which Klaviyo account is connected.
  4. Copy the full key. Private keys start with pk_.

If you grant only events:write, sending works but BatchCard cannot confirm the account and the connection is rejected. Grant both scopes.

Step 2: Connect in BatchCard

  1. In BatchCard, go to Settings > Integrations.
  2. Paste your key into Private API key.
  3. Click Connect Klaviyo.

On success, BatchCard shows the connected Klaviyo account name. Check it matches the account you intend to use, especially if you manage more than one Klaviyo account.

Step 3: Send a test event

  1. Enter an email address under Send test to.
  2. Click Send test event.

This does two things:

  • Registers the BatchCard Gift Card Issued metric in Klaviyo, so it is immediately selectable as a flow trigger.
  • Sends one sample event carrying values for every schema property, so your flow previews render with real-looking data.

Step 4: Build a metric-triggered flow

  1. In Klaviyo, create a flow.
  2. Set its trigger to the metric BatchCard Gift Card Issued.

The flow must be metric-triggered. Klaviyo's {{ event.* }} variables only resolve in metric-triggered flows. A list-triggered or segment-triggered flow renders your gift card variables blank.

Reference the schema properties in your email template, for example:

Your gift card code is {{ event.gift_card_code }}, worth {{ event.gift_card_balance }} {{ event.currency }}.
Hi {{ event.recipient_name }}, {{ event.sender_name }} sent you a gift.
{% if event.expires_at %}Use it before {{ event.expires_at }}.{% endif %}

Variable names are case-sensitive and exactly lowercase snake_case. {{ event.Gift_Card_Code }} or {{ event.giftCardCode }} render blank. Copy the names verbatim from the Event schema table below.

Choose Shopify or Klaviyo per batch

The delivery channel is a per-batch choice, not an account-wide switch.

  1. When you create a batch with email delivery, choose Klaviyo as the delivery channel.
  2. Leave the channel on Shopify for any batch you want Shopify's native email to handle.

Each batch is locked to the channel it was created with, so you can run Klaviyo for a branded holiday send and Shopify for a routine one without them interfering.

Get your flow approved as transactional

This is the step that stops suppressed recipients from silently missing their gift cards.

Why it matters. Klaviyo treats flow emails as marketing by default, and it never delivers a marketing message to a profile that has unsubscribed or been suppressed. Those profiles can still receive flow messages marked transactional, but nothing else. A gift card is a transaction, not a promotion, so this is exactly what transactional status is for.

What skipping this looks like. If you do not get the flow approved, BatchCard honestly shows "Sent to Klaviyo" for the card (Klaviyo accepted the event) while the suppressed recipient receives nothing. The event succeeded; the email was silently dropped.

Rules to know:

  • Only metric-triggered flow emails can be marked transactional (another reason Step 4 must be metric-triggered).
  • The content must be primarily about the transaction, the gift card itself. Remove promotional material (sale banners, cross-sells, "shop the collection") from the transactional message.

How to apply. In Klaviyo, open the flow's email message, mark it as transactional, and submit it for review. Klaviyo documents the process here:

Branch flows on reminders

BatchCard's Pro+ expiration and balance reminders can send through Klaviyo too. When a shop has a live Klaviyo key, each reminder fires the same BatchCard Gift Card Issued metric, so you build reminder emails as Klaviyo flow branches instead of separate integrations.

Reminder events are distinguished by two properties:

  • source is set to reminder (the issuance events use bulk, import, reward, or refund).
  • reminder_variant is set to expiration or balance.

To branch a flow on reminders:

  1. Trigger the flow on the BatchCard Gift Card Issued metric as usual.
  2. Add a conditional split on event.source equal to reminder to separate reminder emails from issuance emails.
  3. Add a second split on event.reminder_variant to send a different message for expiration reminders (the card is about to expire) and balance reminders (the card still has value left).

reminder_variant is only present on reminder events. Guard any flow logic that reads it with a check that event.source equals reminder first, so issuance emails are never affected.

Event schema

BatchCard fires one event per gift card.

  • Metric name: BatchCard Gift Card Issued
  • Profile identifier: the recipient email

The schema is a stable public contract: flat, lowercase, snake_case. BatchCard will not rename these properties, so a flow template you build today keeps working. Bind your flow to these exact names.

PropertyTypeExampleNotes
gift_card_codestringGIFT-TEST-XXXXThe full plaintext gift card code.
gift_card_balancenumber50Card balance as a plain number (no currency symbol).
currencystringUSDISO 4217 code, your store's currency.
expires_atstring2026-12-31T00:00:00ZISO 8601. Omitted when the card has no expiration, never sent as null. Guard flow logic with {% if event.expires_at %}.
recipient_namestringJordan LeeMay be empty ("") when no name was captured.
sender_namestringExample StoreYour store name.
personal_messagestringHappy birthday!Empty ("") when no message was entered. The key is always present.
batch_namestringHoliday 2026The batch the card was issued in.
sourcestringbulkOne of bulk, import, reward, refund, or reminder.
reminder_variantstringexpirationPresent only when source is reminder. Either expiration or balance.
redeem_urlstringhttps://example-store.example.comYour store's primary URL. Omitted when unknown, never sent as null.

Every event also carries a unique_id, so re-sending a batch never creates duplicate events in Klaviyo.

What "Sent to Klaviyo" means

"Sent to Klaviyo" does not mean the email was delivered. It means Klaviyo accepted the event. The actual email is sent by your own Klaviyo flow, so whether a recipient receives it depends on your flow, your suppression list, and whether the flow is approved as transactional (see Get your flow approved as transactional). BatchCard shows this status in blue, not green, on purpose.

Scheduled batches. Klaviyo cannot natively schedule an event-triggered send, so for scheduled delivery BatchCard holds the event server-side and fires it to Klaviyo at the scheduled time. Your flow then runs immediately on receipt.

Retries. BatchCard retries transient failures (rate limits, temporary Klaviyo outages) with exponential backoff. An authentication failure, a rejected or under-scoped key, is different: it stops the batch immediately and requires reconnecting your key before you retry.

Downgrading below Pro

Klaviyo is a Pro feature, but downgrading to Starter or Free does not throw your setup away.

Your connection is preserved. When you drop below Pro, your saved Klaviyo connection stays put. Your API key remains encrypted at rest, and the connection is restored automatically the moment you upgrade to Pro again. On Settings > Integrations you will see a neutral locked Klaviyo card that confirms the connection is saved.

In-flight sends still fire through Klaviyo. Gift card sends already queued or scheduled through Klaviyo before you downgraded still go out through Klaviyo, so those recipients are not stranded. The per-batch Retry, Send now, and Reschedule actions on Klaviyo batches you created before downgrading also continue to work through Klaviyo. Each batch is locked to the channel it was created with, and Klaviyo batches have no Shopify fallback.

You cannot pick Klaviyo for new batches until you upgrade. New batches can only use Shopify delivery while you are below Pro. Upgrade to Pro again to route new batches through Klaviyo.

Troubleshooting

"That key didn't work" when connecting. Check two things: you pasted the full private key (it starts with pk_), and you granted both events:write and accounts:read scopes. A key missing accounts:read is rejected even though it could technically send events.

"Sent to Klaviyo" but the recipient got no email. This is the number one cause: the recipient's profile is suppressed or unsubscribed, and your flow email is not approved as transactional. Get the flow approved: see Get your flow approved as transactional.

Variables render blank in the email. Two usual causes: a case mismatch (variable names are case-sensitive lowercase snake_case, copy them verbatim from the Event schema table), or the flow is list-triggered or segment-triggered instead of metric-triggered.

You disconnected Klaviyo with sends in flight. Any scheduled or pending Klaviyo sends fail with "Klaviyo disconnected" and those recipients will not receive their gift cards. Reconnect your key, then use Retry failed on the affected batch to resend them.

Ready to try this?

Install BatchCard free.

Ready to try this? Install BatchCard free.

Create bulk gift cards from a CSV or form. Set up your first batch in minutes.

Install Free on Shopify

On this page