Integrating Swym Gift Lists and Registries with Klaviyo

Created by Naga Priyanka, Modified on Fri, 28 Feb at 8:10 PM by Naga Priyanka

The Swym Gift Lists and Registries application can be seamlessly integrated with Klaviyo using Shopify Flow. The following triggers are supported:

  1. Swym Registry Created – Activated when a shopper creates a new registry, enabling automated email notifications to the shopper upon registry creation.

  2. Swym Registry Order Created – Activated when a shopper (gifter) purchases a product from a registry, facilitating automated email notifications to the gifters.


Step-1: Workflows on Shopify Flow


Swym Registry Created


  1. Click on “Create Workflow”


  1. Click on the “Swym Registry Created” trigger



  2. Under Trigger > Then > Action > Klaviyo, click on “Track Event”



  3. Enter the public API key of your store’s Klaviyo account. Use the following variables for the fields:

Klaviyo Public API Key: Public API key of your store’s Klaviyo account
Event Name : Swym_registryCreated
Customer Email Address: {{registrantEmail}}
Customer First Name: {{registrantNamel}}
Customer Properties:
{

"Email": "{{registrantEmail}}",

"Name": " {{registrantName}}",

"Registry Name": "{{registryName}}"

}

Event Properties:
{

"Email": "{{registrantEmail}}",

"Name": " {{registrantName}}",

 "Registry Name": "{{ registryName }}",

 "Share URL": "{{ shareableRegistryUrl }}",

 "RegistryID": "{{ registryId }}",

 "Event Date": "{{ registryEventDate }}"

}


Swym Registry Order Created


  1. Click on “Create Workflow”



  2. Select the “Order Created” trigger



  3. Under trigger > Then > Condition, define a condition such that At least one of order / custom attributes equals SwymGiftRegistry



  4. Under Then > Action > Klaviyo, select “Track Event”



  5. Enter the public API key of your store’s Klaviyo account. Use the following variables for the fields:
    Klaviyo Public API Key: Public API key of your store’s Klaviyo account

Event Name: Swym_registryOrderCreated
Customer Email Address: {{order.email}}
Customer First Name: {{order.customer.firstName}}
Customer Last Name: {{order.customer.lastName}}
Customer Properties: {{order.confirmationNumber}}
Event Properties: (Include as many event properties as you would like)

{

  "orderId": "{{order.id}}",

  "customerFirstName": "{{order.customer.firstName}}",

  "customerLastName": "{{order.customer.lastName}}",

  "ThankYouNote": "{{order.note}}",

  "gifter": "{% for attr in order.customAttributes %}{% if attr.key == 'gifter' %}{{ attr.value }}{% endif %}{% endfor %}",

  "gifterEmail": "{% for attr in order.customAttributes %}{% if attr.key == 'gifterEmail' %}{{ attr.value }}{% endif %}{% endfor %}",

  "SwymGiftRegistry": "{% for attr in order.customAttributes %}{% if attr.key == 'SwymGiftRegistry' %}{{ attr.value }}{% endif %}{% endfor %}",

  "swymDraftOrderId": "{% for attr in order.customAttributes %}{% if attr.key == 'swymDraftOrderId' %}{{ attr.value }}{% endif %}{% endfor %}",

  "Products": [

    {% for line_item in order.lineItems %}

      "{{ line_item.title }}"{% if forloop.last == false %}, {% endif %}

    {% endfor %}

  ]

}




Step-2: Triggering the workflows created on Shopify Flow

  1. Turn the workflows on after following step-1

  2. To trigger the event Swym_registryCreated, create a new registry on the store

  3. To trigger the event Swym_registryOrderCreated, create an order by purchasing a product present on a registry

Triggering these workflows is essential to send the event payload to Klaviyo and add the triggers under “Shopify”



Step-3: Creating email flows on Klaviyo


Swym Registry Created:


  1. Click on “Create flow”



  2. Click on “Build your own”



  3. Name the flow “Swym new registry created”

  4. Select the trigger “Swym_registryCreated” under Your metrics > Shopify

  5. Add an “Email” action:



  6. Customise the email template as per your requirements. A sample HTML for email content is provided below:
    <div style="display:flex;justify-content:center;">Your Registry Details</div> 

<p>Name: {{ event | lookup:'Registry Name' | default:'' }}</p>
<p>Here is the URL: {{ event | lookup:'Share URL' | default:'' }}</p>
<p>Event Date: {{ event | lookup:'Event Date' | default:'' }}</p>


  1. After creating the email flow, click on “Review and Turn on”. To verify the email flow, create another registry on the store.



Swym Registry Order Created:


  1. Click on “Create flow”



  2. Click on “Build your own”


  1. Name the flow “Swym new registry order created”

  2. Select the trigger “Swym_registryOrderCreated” under Your metrics > Shopify



  3. Add an “Email” action:




  1. Customise the email template as per your requirements and turn the email flow on.

  2. To verify the email flow, place another order by purchasing a product present in the registry.


You have now successfully integrated Swym Gift Lists and Registries application with Klaviyo! In case you have further queries or require additional assistance, please reach out to us here - support@swymcorp.com.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article