Skip to main content

Connect Klaviyo and send welcome emails with CWILL popup discounts

Connect CWILL Popup Email to Klaviyo to sync popup subscription events and discount information. Then use that data to send welcome emails with each subscriber’s unique discount code.

1. Connect your Klaviyo account

  1. In CWILL Popup Email, go to Settings → Integrations.

  2. Find Klaviyo and click Connect.

  3. Sign in to the Klaviyo account you want to connect.

  4. If an App has not been reviewed notice appears, confirm that the app is CWILL Popup Email before clicking Continue.

  5. Review the requested permissions and click Allow.

  6. Return to Settings → Integrations. Confirm that the status is Connected and that the correct Klaviyo account is connected.

Complete authorization in your own Klaviyo account. You do not need to share your password or API keys with support.

2. Test the connection

Before creating your welcome flow, send a test subscription so you can verify the synced data and preview your email.

  1. Open your Shopify storefront.

  2. Subscribe through a CWILL popup using a new test email address. To test discounts, use a popup with a discount enabled.

  3. If double opt-in is enabled, open the confirmation email and confirm the subscription.

  4. In Klaviyo, go to Profiles and search for the test email address.

  5. Open the profile and look for CWILL Email - Popup New Subscribed in its activity.

  6. Expand the event details and check the popup and discount information. If a discount was generated, also check the profile’s custom properties for cweml_discount_code and cweml_discount_url.

When is the subscription event sent?

  • Single opt-in: After the subscription succeeds.

  • Double opt-in: After the customer confirms their email and their subscription status becomes subscribed.

Submitting an email address without completing the subscription does not trigger the event.

3. Choose how to trigger your welcome emails

You can use the integration with either of these flow setups:

Your setup

Flow trigger

Discount variables to use

Create a welcome flow specifically for CWILL popup subscribers

CWILL Email - Popup New Subscribed

Event variables, such as {{ event.discountCode }}

Keep an existing flow triggered by Shopify’s subscription sync

Your existing Shopify subscription trigger

Profile properties, such as `{{ person

lookup:'cweml_discount_code' }}`

Choose the setup that fits your store. If you enable both for the same subscribers, review your triggers and filters to avoid sending duplicate welcome emails.

4. Create a flow triggered by CWILL

Connecting Klaviyo does not automatically create or activate a welcome flow.

  1. In Klaviyo, go to Flows → Create flow → Build your own.

  2. Enter a name for your flow.

  3. Under Select a trigger → Your metrics, find the CWILL integration and select CWILL Email - Popup New Subscribed.

  4. Save and confirm the trigger.

  5. Add an Email action below the trigger.

  6. Set the subject and sender details, choose a template, and edit the email.

  7. Add your discount variables using the table below.

  8. Click Preview and select the test subscription event you created earlier.

  9. Check the content and discount link. When everything is ready, set the email action to Live and confirm that the flow is enabled.

Add the popup discount to your email

What you want to show

Variable

Discount code

{{ event.discountCode }}

Discount offer

{{ event.discountValue }}

Discount link

{{ event.discountUrl }}

Popup name

{{ event.popupName }}

For a Use my discount or Shop now button, use {{ event.discountUrl }} as its destination URL.

The discount value already contains display-ready text, such as 10% off, $5.00 off, or Free shipping. Do not add another percentage sign or currency symbol.

You do not need to create these variables manually in Klaviyo. After a subscription event has synced successfully, select that event in the preview and expand All properties to see its available values.

Variable names are case-sensitive. For example, use discountCode exactly as shown.

Event variables are available only in flows triggered by the corresponding event. For an existing Shopify-triggered flow, use the profile properties in the next section.

5. Use discounts in an existing Shopify-triggered flow

You can keep your existing Shopify subscription trigger and add CWILL discount information to the email through Klaviyo profile properties.

This integration writes discount information to the customer’s profile without separately subscribing the customer to a Klaviyo list, helping avoid duplicate subscription actions alongside Shopify’s sync.

  1. Open your existing welcome flow in Klaviyo.

  2. Keep its current Shopify subscription trigger.

  3. Edit the welcome email and add the appropriate profile variables.

  4. Preview the email using a test profile that has received a CWILL popup discount.

  5. Check the discount code, offer, and button destination before making the email live.

What you want to show

Variable

Discount code

`{{ person

lookup:'cweml_discount_code' }}`

Discount offer

`{{ person

lookup:'cweml_discount_value' }}`

Discount link

`{{ person

lookup:'cweml_discount_url' }}`

Popup name

`{{ person

lookup:'cweml_popup_name' }}`

For a discount button, use {{ person|lookup:'cweml_discount_url' }} as its destination URL.

Allow time for syncing: If the Shopify subscription trigger starts the flow before the discount properties are available, add a 1–2 minute delay before the first email and test again.

6. Reconnect or disconnect Klaviyo

Go to Settings → Integrations in CWILL Popup Email.

  • Needs reconnect: Click Reconnect, sign in, and complete authorization again.

  • Connection cancelled or failed: Click Connect and try again.

  • Stop syncing: Click Disconnect and confirm.

7. Troubleshooting

I can’t find the CWILL subscription event

Confirm that the correct Klaviyo account is connected. Subscribe through your popup using a new test email address and complete double opt-in confirmation if enabled.

Then check that profile’s activity for CWILL Email - Popup New Subscribed.

The discount code is blank in the preview

Confirm that your test popup offers a discount and that a code was generated.

  • For a CWILL event-triggered flow, select an event containing discount information and check discountCode and discountUrl under All properties.

  • For a Shopify-triggered flow, select a profile containing cweml_discount_code and cweml_discount_url.

Check that your email uses the correct variables for its trigger. A subscription without a discount may have empty discount fields.

The event variables are missing

Send a successful test subscription first, then select that event in the email preview.

Also confirm that the flow is triggered by CWILL Email - Popup New Subscribed. Those event variables are not available in a flow triggered by Shopify’s subscription sync.

The profile appears in Klaviyo, but no welcome email is sent

A synced profile does not automatically start a welcome email.

Check that:

  • The customer completed the required subscription steps.

  • Your flow uses the intended trigger.

  • The email action is set to Live.

  • Flow filters and the customer’s subscription status allow the email to be sent.

A customer receives two welcome emails

Check whether both a Shopify-triggered welcome flow and a CWILL event-triggered welcome flow are active for the same subscriber. Adjust your triggers or filters so the customer receives the intended welcome sequence.

Still need help? Contact us through the in-app chat with your store URL, test subscription time, and screenshots of the connection status and the issue.

Did this answer your question?