In this guide, we’re excited to show you how to connect your Loop Subscriptions account with Siena. This integration empowers you to automate and manage customer subscriptions, streamlining your service experience for greater efficiency.
Overview
Loop Subscriptions is a Shopify app that helps e-commerce brands manage and grow their subscriber base. You can read more at https://www.loopwork.co/.
The Siena <> Loop Subscriptions integrations allow your customers to easily get information about their subscriptions and take actions on those subscriptions, like pausing a subscription or skipping their next delivery.
This allows you to serve your customers and automate some of your highest volume contact reasons.
Supported Actions
Today, the Loop Subscriptions integration supports the following use cases:
- Get subscription details
- Pause subscription
- Resume subscription
- Cancel subscription
- Skip next delivery
In the What’s Coming Next section, we discuss what new functionality you can expect soon.
See It In Action
How To Set It Up
Get Your Loop API Key
To use this integration, you’ll need to create an API key in Loop Subscriptions. Loop provides simple instructions on how to do so in the API Documentation. Once you have your API Key, copy it and hang on to it somewhere secure so you can reference it later.
Create An Integration
Now, you’ll go to your Siena account and create a new custom integration. You’ll find this in the Siena navigation under Modules > Custom Integrations.
On this page, click the New Integration button. This will open a window where you can give your integration a name and upload an icon of your choosing. Click Save when you are done.
Now, you’re ready to set up your actions.
Add Your Data Readers
The Loop Subscriptions integration requires two Data Readers. These are the GET requests that retrieve the data Siena needs to understand your customers’ subscriptions and take actions on them.
Click the new action button, which will open a modal where you will enter an Action Name and a Request Method. Fill these out as shown below, then turn ON the toggle for Initialization Request. This setting will ensure that Siena makes this request first, retrieving information about the customer that she will use to make additional requests for their subscription information.
Click Next Step, which will take you to the Authentication setup. Complete this screen as shown below, entering your API Key from the Get Your Loop API Key step.
For both Key and Value, you will type “email”. Email is the name of the parameter you are passing, and under value it is a simple instruction to Siena that she is going to use the customer’s email address here.
Now click Save and you have just set up the first action. This will be used to fetch the customer’s data from Loop using their email address, and it will seed additional requests needed in our integration.
Back on the integrations page, you will click New Action again under your Loop Subscriptions integration. Now we will add the second Data Reader.
For this one, give it the name “Get Customer’s Loop Subscriptions” and choose GET for your request type. This time, leave the Initialization Request toggle OFF.
Next, you will complete the Authentication step exactly as you did before. Click Next Step.
On the Configuration page, choose your other GET request, “Get Loop Subscriptions Customer By Email”, from the Initialization Request dropdown. This will allow the request we are setting up to follow the first request, and use its response as part of its input.
For Request Parameter Type, choose “Request Path” and then enter “https://api.loopsubscriptions.com/admin/2023-10/customer/{customerShopifyId}/subscription” for the Endpoint URL. This will automatically populate a key for you, with an editable Value box alongside it. Enter “{response.data[0].shopifyId}” as the value.
This will take the Shopify ID of the customer returned by the first request and pass it to the variable in this request. Now, you are retrieving all of the subscriptions that this customer has.
Click save. You now have both of the Data Readers required for the Loop Subscriptions integration. Let’s move on to setting up your actions.
Add Your Actions
Many of the next steps are repetitive and similar to the two GET requests you just built. You will click New Action within your integration to open the new action modal to get started. You will also use the exact same authentication method, so we will skip over that step for the remainder of this documentation. Just repeat it as you did before.
Pause subscription
For this action, enter “Pause Loop Subscription” as the Name and choose POST as your Request Method.
On the configuration page, enter “https://api.loopsubscriptions.com/admin/2023-10/subscription/{subscriptionId}/pause” as the Endpoint URL. This will create a Key/Value pair, where you will enter “The ID of the subscription the customer wants to pause.” in the Value field.
Next, you need to fill out the Siena Automation Instructions. This is a prompt for Siena that instructs her on how and when to use these actions. Copy and enter the following:
First you will identify if the customer's intent is to pause their subscription. If it is, you will get their subscription ID from the action to get Loop subscriptions. Then use that subscription ID in place of the subscriptionId variable in the request URL to pause the subscription. If the customer has more than one subscription, ask them to confirm which one they want to pause.
Finally, you will enter a Success Message and a Failure Message. These are not displayed to the customer, but used internally by Siena. Use the following:
Name: Resume Loop Subscription
Request Method: Post
Endpoint URL: https://api.loopsubscriptions.com/admin/2023-10/subscription/{subscriptionId}/resume
Value: The ID of the subscription the customer wants to resume.
Siena Automation Instructions: First you will identify if the customer's intent is to resume their subscription. If it is, you will get their subscription ID from the action to get Loop subscriptions. Then use that subscription ID in place of the subscriptionId variable in the request URL to resume the subscription. If the customer has more than one subscription, ask them to confirm which one they want to resume.
Success Message: Your subscription has been resumed.
Failure Message: There was a problem resuming your subscription. I will route you to a team member.
Cancel subscription
Name: Cancel Loop Subscription
Request Method: POST
Endpoint URL: https://api.loopsubscriptions.com/admin/2023-10/subscription/{subscriptionId}/resume
Value: The ID of the subscription the customer wants to cancel.
Siena Automation Instructions: First you will identify if the customer's intent is to cancel their subscription. If it is, you will get their subscription ID from the action to get Loop subscriptions. Then use that subscription ID in place of the subscriptionId variable in the request URL to cancel the subscription. If the customer has more than one subscription, ask them to confirm which one they want to cancel.
Success Message: Your subscription has been canceled.
Failure Message: There was a problem canceling your subscription. I will route you to a team member.
Skip Next Delivery
Name: Skip Next Loop Subscription Delivery
Request Method: POST
Endpoint URL: https://api.loopsubscriptions.com/admin/2023-10/subscription/{subscriptionId}/skipNext
Value: This is the ID of the subscription that the customer wants to skip the next delivery of.
Siena Automation Instructions: First you will identify if the customer's intent is to skip their next subscription delivery. If it is, you will get their subscription ID from the action to get Loop subscriptions. Then use that subscription ID in place of the subscriptionId variable in the request URL to skip the next delivery of the subscription. If the customer has more than one subscription, ask them to confirm which one they want to skip delivery for.
Success Message: I have successfully skipped your next delivery.
Failure Message: There was an issue skipping the next delivery. I will hand off to a human.
Add Your Automations (With Sample Prompts)
Now that you’ve set up the integration, you’ll need to build new automations to use it or update your existing ones. For more information about building Automations in Siena, visit Creating your first automation in Siena University.
To help you utilize the Loop Subscriptions actions, though, we’ve created some sample prompts that you can copy and iterate to suit your business needs. You can use these to create new automations or modify your existing ones.
You’ll want at least 4 automations, one for each of the currently supported Loop Subscriptions actions.
Test Your Integration
Once you have set up your automations and added the actions to them, you’ll want to test. You can activate your automations and then test either in the playground alongside the automation or in the Siena playground. In the email text box, enter an email address that you know has test subscription data you don’t modify. Now, you can converse with Siena and see how she replies and what actions she takes.
Siena - Playground - 25 October 2024 - Watch Video
What’s Coming Next
Our work here is not done! We are working now to add the following actions:
- Change delivery frequency
- Shipping address updates
- Add product to subscription/one-time
- Remove product from subscription/one-time
- Swap subscription products
If you have ideas of your own that you want to support, you can use the above instructions as your guide and add new actions to extend the Loop Subscriptions integration functionality. If you do, don’t forget to tell us! We love to hear what cool things our customers have built.
Comments
0 comments
Please sign in to leave a comment.