The Swym Gift Lists and Registries application can be seamlessly integrated with Omnisend using Shopify Flow. The following triggers are supported:
Swym Registry Created – Activated when a shopper creates a new registry, enabling automated email notifications to the shopper upon registry creation.
Swym Registry Order Created – Activated when a shopper (gifter) purchases a product from a registry, facilitating automated email notifications to the gifters.
Step-1: Creating Custom Events on Omnisend
Under Store Settings > Custom Events, click on “Create Custom Event”
Here is a sample curl that you can use to create the custom Events for Swym Gift lists and Registries Application
Swym Registry Created:
curl --location 'https://api.omnisend.com/v3/events' \
--header 'X-API-KEY: <<Your API key>>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data-raw '{
"name": "Swym Registry Created",
"systemName": "swymRegistryCreated",
"email": "abc@gmail.com",
"phone": "+12025550142",
"fields": {
"registryName": "Swym test",
"shareableRegistryUrl": "https://mystore.myshopify.com/pages/swym-registry-gifter?registryId=2011082&emid=0e760f1e-bxd1-43d2-b201-e4d1c486e8df",
"registrantEmail": "abc@gmail.com",
"registryId": "2011082",
"registrantName": "Swym Test",
"coRegistrantName": "Name",
"coRegistrantEmail": "abc@gmail.com",
"registrantUrl": "https://mystore.myshopify.com/pages/swym-registry-owner?registryId=2011082",
"registryDescription": "Congratulations! Good ",
"registryEventDate": "2025-03-08"
}
}'
Swym Registry Order Created:
curl --location 'https://api.omnisend.com/v3/events' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <<Your API key>>' \
--data-raw '{
"systemName": "swymRegistryOrderCreated",
"email": "abc@gmail.com",
"phone": "+12025550142",
"contact": {
"email": "{{order.email}}",
"phone": "{{order.phone}}"
},
"name": "Swym Registry Created Order",
"fields": {
"shopDomain": "{{shop.domain}}",
"orderId": "{{order.id}}",
"customerFirstName": "{{order.customer.first_name}}",
"customerLastName": "{{order.customer.last_name}}",
"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 %}"
}
}'
Success response of the curl to create custom events would be “1”
Here are the help documents to:
-> Generate API key: https://support.omnisend.com/en/articles/1061890-generating-api-key
-> Create Custom Events: https://support.omnisend.com/en/articles/1475482-custom-events
Thereafter, you will be able to view the custom events. Keep the Event ID’s handy.
Step-2: Workflows on Shopify Flow
Swym Registry Created
Click on “Create Workflow”
Click on the “Swym Registry Created” trigger
Under Trigger > Then > Action > Omnisend, click on “Track Event”
Use the following variables for the fields:
Customer Email Address: {{registrantEmail}}
Customer First Name: {{registrantNamel}}
Event custom fields:
{
"registrantEmail": "{{registrantEmail}}",
"registryName": "{{registryName}}",
"registrantName": "{{registrantName}}",
"registryId":"{{registryId}}"
}
Event ID: Enter the ID of the custom Event
Swym Registry Order Created
Click on “Create Workflow”
Select the “Order Created” trigger
Under trigger > Then > Condition, define a condition such that At least one of order / custom attributes equals SwymGiftRegistry
Under Then > Action > Omnisend, select “Track Event”
Use the following variables for the fields:
Customer Email Address: {{order.email}}
Customer phone number: {{order.phone}}
Customer First Name: {{order.customer.firstName}}
Customer Last Name: {{order.customer.lastName}}
Customer Properties: {{order.confirmationNumber}}
Event ID: Enter the ID of the custom Event
Event custom fields: (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-3: Triggering the workflows created on Shopify Flow
Turn the workflows on after following the step-2
To trigger the event Swym_registryCreated, create a new registry on the store
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 Omnisend
Step-4: Creating email automations on Omnisend
Swym Registry Created:
Click on “Create Automation”
Click on “Create From Scratch”
Select “Swym Registry Created” under triggers > API
Add an email message
Customise the email template as per your requirements. Below is a sample HTML:
<table style="width:100%; text-align:center;">
<tr>
<td style="font-size:18px; font-weight:bold; padding:10px;">Your Registry Details</td>
</tr>
</table>
<p style="font-size:16px; margin:5px 0;"><strong>Name:</strong> [[event.registrantName]]</p>
<p style="font-size:16px; margin:5px 0;"><strong>Registry Name:</strong> [[event.registryName]]</p>
<p style="font-size:16px; margin:5px 0;"><strong>Registry ID:</strong> [[event.registryId]]</p>
<p style="font-size:16px; margin:5px 0;"><strong>Email:</strong> [[event.registrantEmail]]</p>
Click on “Start workflow” to enable the email flow:
Swym Registry Order Created:
Click on “Create Automation”
Click on “Create From Scratch”
Select “Swym Registry Order Created” under triggers > API
Add an email message:
Customise the email template as per your requirements. Below is a sample HTML:
<table style="width:100%; text-align:center;">
<tr>
<td style="font-size:18px; font-weight:bold; padding:10px;">Your Registry Order Details</td>
</tr>
</table>
<p style="font-size:16px; margin:5px 0;"> <strong>Thank you for placing an order from our registry!</strong>
<p style="font-size:16px; margin:5px 0;"><strong>Name:</strong> [[event.gifter]]</p>
<p style="font-size:16px; margin:5px 0;"><strong>Email:</strong> [[event.gifterEmail]]</p>
<p style="font-size:16px; margin:5px 0;"><strong>Registry ID:</strong> [[event.SwymGiftRegistry]]</p>
<p style="font-size:16px; margin:5px 0;"><strong>Note:</strong> [[event.ThankYouNote]]</p>
Click on “Start workflow” to enable the email flow.
You have now successfully integrated Swym Gift Lists and Registries application with Omnisend! To verify the email flows, create a new registry and place an order by purchasing a product from the registry. 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
Feedback sent
We appreciate your effort and will try to fix the article