Before you get started, you need to make sure you’ve enabled the wishlist low stock event within Swym Admin. To confirm, once you’ve logged in to Swym Admin, navigate to Integrations via the left navigation menu. Make sure that the checkbox next to “A product in a user’s wishlist is running low on stock” is checked. Once enabled, Swym will send an event to Omnisend each time the sale of a product drops inventory below 5 units.
In Omnisend, navigate to the Automation page and select “New workflow”. In the upper righthand corner click the “Create custom workflow” button. In this example we’re going to call this flow “Wishlist Low Stock”.
Next you’ll need to set the trigger for this workflow. Choose “Swym-lowstock” from the dropdown on the right.
Note! If you don't see "Swym-lowstock" in your dropdown you probably haven't had the inventory for a product drop below the threshold since enabling this event and the Omnisend integration in Swym. Flow triggers won't be displayed until at least one event is sent.
Next, we’re going to add an Audience filter, which we’ll use during development for this workflow. We’ll remove it later once we’re ready to make this workflow live. Make sure to add new unique tag to your contact that you're going to test the workflow with. So, any other contacts won't enter this workflow while it's not ready.
The timing of this event isn’t driven by an action taken by the shopper, so there’s no reason to add a delay block.
Next add an email block to your workflow, it will be your low stock message.
The next thing we’ll do is build an email template that consumes the low stock data passed from Swym to create our triggered email campaign.
Here are the event-level data elements passed along with this event:
Add these elements to your email using personalization. Here's simple example how you can add image, product name, URL and quantity to your email using HTML block.
Here is the html we used for our simple email template:
<p style="text-align: center; font-family:verdana,geneva,sans-serif;">We only have [[custom_event.ProductQuantity ]] of the [[custom_event.ProductName]] you have on your wishlist left.</p> <p style="text-align: center; font-family:verdana,geneva,sans-serif;"><a href="[[custom_event.ProductURL]]">Buy Now</a></p> <p style="text-align: center;"><img src="[[custom_event.ImageURL]]" /></p>
Once you're satisfied with your email, click Save & Go back. Then Start the workflow to proceed with testing the workflow to check how the email will look like in customer's inbox.
Choose a product with an inventory one more than the minimum stock threshold you have set up on Swym Admin. In this example, the threshold we have is 5, so we choose a product with the inventory as 6.
You will need to use 2 email IDs in the next steps, one of which will need to be validated by the Wishlist Plus app. Let’s call them shopper1 and shopper2.
[email protected] needs to add this product to their wishlist and validate their email. So that their email IDs is in record for us to send them the low stock email alert.
[email protected] will then buy the same product. Thereby reducing the stock to 5 and triggering the low stock email alert that will be sent to shopper1.
You must receive the alert email to [email protected].
If everything works fine, you can remove the Audience filter that we've added at the beginning. Then real users will be able to trigger this workflow.