Klaviyo x Submarine

Summary

Submarine integrates with Shopify Flow, allowing merchants to connect Submarine with their existing systems and use Flow to create customised workflows without any extra hassle. As a Klaviyo partner and many of our existing merchants using Klaviyo for customer email templates, we have made it as easy as we can for getting new notifications setup and sending from Klaviyo.

Setting up Klaviyo with Shopify

The follow steps are a guide on installing Klaviyo to your Shopify store and connecting Klaviyo and Shopify so you can leverage Klaviyo flow actions.
  1. Install the Klaviyo app here and follow the prompts to set up your account
  1. Once your account has been set up, select the account name in the lower left. Then, click integrations
  1. Search for Shopify, then click Add Integration
  1. Paste the store URL in the box, ensuring its in the format mystore.myshopify.com.
  1. After configuring your settings, click Connect to Shopify. This will take you to your Shopify account. You may be prompted to log in to Shopify.
  1. Review the permissions and click Install app. This begins syncing your Shopify data with Klaviyo and takes you back into your Klaviyo account.
Image without caption

Setting up Flow on Shopify

  1. Install the Shopify Flow app, found here
  1. You’ll be redirected to this page, and click ‘install’, top right.
Image without caption

Available flows for Submarine Platform

Submarine has a selection of available flows that merchants can leverage to either communicate with customers or create operation workflows. The available flows are listed below, however there is more detail on each flow available here.
  • Charge failed
  • Charge succeeded
  • Refund succeeded
  • Campaign order created
  • Campaign upcoming charge
  • Campaign order fulfilled
  • Campaign order cancelled
  • Presale & Crowdfunding campaign launched, ended and completed

How to set up a flow

There are two options for setting up your flows - manually on a per workflow basis or importing from our files below.
🎵
Please note: in order to import flows you must have the latest version of the Shopify Flow app as well as Klaviyo app installed!

Option 1: Setup a flow manually

Step 1. Once you’ve installed the Shopify Flow and the Klaviyo app on your store. Open Flow and locate the ‘Create Workflow’ button in the top right.
Image without caption
Step 2. Click on Submarine and you will see the range of Flow triggers we have available for you to use. As an example. lets setup ‘Campaign Upcoming Charge’ together
Select Submarine > Campaign upcoming charge as the trigger.
Image without caption
Step 3. After you select the trigger you will be asked to select between Condition or Action, if you have no Conditions for sending the trigger then click Action.
Then select the Klaviyo app on the right hand side tab, select ‘Track an event’
Image without caption
Step 4. The following form will show and you will need to add inputs for each entry so that when the trigger fire it sends that data over to Klaviyo.
🎵
Please note: Flows must always be written in camelCase.
Image without caption
You can populate your form with the follow;
Klaviyo Public API Key: Found in Account > Settings > API keys
Event name: Whichever event you are wanting to track. Different events can be found here For this example will be doing Upcoming preorder charge
Customer Email Address: {{customer.email}}
Customer First Name: {{customer.firstName}}
Customer Last Name: {{customer.lastName}}
Customer Properties: {{customer.createdAt}}
Event Properties:
json
{ "campaignType": {{campaignType}} "campaignName": {{campaignNames}} "campaignDescriptions": {{campaignDescriptions}} "amount": {{amount}} "campaignType": {{amountCurrency}} "amountDescription": {{amountDescription}} "dueAt" : {{dueAt}} "orderName" : {{order.name}} }
Step 5. Name your workflow something easy to recognise and click Save.
Step 6. Some workflows are simple to test and others are a bit more difficult, we have a section on firing the flow triggers below.

Option 2: Import Submarine workflows

A quicker way to get started would be to import the files below we have created,
To import these you will need to;
Step 1. Open Shopify
Step 2: Ensure you have both the Flow and Klaviyo app installed on the store
Step 3: Open Shopify Flow app
Step 4: Select an downloadable file from our list below.
Step 5: Click Import from the top right
Image without caption
Step 6: Select the files you downloaded in step 4.
Step 7: Once imported you will need to edit each workflow Track even Action to have your Klaviyo accounts Public key.
  • To find this, in Klaviyo navigate to "Account > Settings > API Keys"
Image without caption
  • Replace the Public API key with yours and click Apply changes.
Step 8: Test your new workflows using the guide linked below.
Individual flows
Download all (Zip file)

Testing your flow triggers

  • Charge failed
    • Testing this flow trigger will require you place a test campaign with a card that will initially succeed verification but then fail at a later capture. Start your testing by placing an order with a card that will fail after attachment(checkout), see the card details below for use on a staging store. For testing on a production store you may need to test with a live card that you can freeze or deplete funds from easily. Manually end or wait till the campaign or payment is due to charge and once it’s failed to charge the flow will run and the event will be tracked in Klaviyo.
      • Staging store failing test card:
        Card number: 4000000000000341
        Expiry: 12/26
        CSV: 123
  • Charge succeeded
    • Testing this flow trigger will require you place a test campaign with a card that will succeed, wait till the campaign or payment is due to charge and once it’s successfully charge the flow will run and the event will be tracked in Klaviyo.
  • Refund succeeded
    • Testing this flow will require a Campaign order with a successful deposit charge made on it, your settings in Submarine will need to have the Refund deposits checkbox set to true (checked) and you will need to cancel the campaign order from Submarine before the full payment is taken. Once this is done the flow will run and the event will be tracked in Klaviyo.
  • Campaign order created
    • Testing this flow trigger requires you create a campaign and place an order against it. Once you place an order against the campaign this flow trigger will fire.
  • Campaign upcoming charge
    • Testing the flow trigger requires a few days, or an adjustment to your stores configuration which can be done by the Submarine team. The default configuration for all stores is 2 days prior to a Submarine related charge but it can be reduced for testing purposes if requested.
  • Campaign order fulfilled
    • Testing this flow trigger requires you create a campaign and place an order against it. Once you place an order against the campaign you will need to end the campaign, allocate the inventory and this will trigger the workflow. More details on how to do the above steps are available here.
  • Campaign order cancelled
    • Testing this flow trigger requires you create a campaign and place an order against it. Once you place an order against the campaign, go to Submarine and cancel the campaign order, this will flow trigger will fire.
  • Presale & Crowdfunding campaign launched, ended and completed
    • To test this workflow you’ll need to move a campaign through each status. For each status change you’ll trigger a workflow.