Learn how to pass subscription data from Admiral to your print provider. We'll use Zapier to send New Subscription, Cancellation, and Expiration events from Admiral into a third-party system.
This is an advanced implementation. Before moving forward - please check with your print provider on whether or not they support this type of integration.
We will be configuring three subscription events originating from Admiral to be sent to the print provider. The events are:
- New Subscription. Event fires when a new subscription is purchased.
- Cancelled Subscription. Event fires when a subscription is cancelled.
- Expired Subscription. Event fires when a subscription expires.
The distinction between 2 & 3 is important to understand. A Cancellation event fires when a user explicitly cancels a subscription. The Expired event fires at the actual time in which the subscription ends.
For example, if a user purchased an annual subscription on 10/29/21 and then cancelled it on 5/20/22, then the events would fire as follows:
- New Subscription. 10/29/21
- Cancelled Subscription. 5/20/22
- Expired Subscription. 10/29/22
Prior to setting up the events, we recommend configuring your Offers in Admiral.
Offers and Metadata
When integrating Admiral with a print provider, we need a mechanism in place to connect a subscription purchased through Admiral with the correct print subscription in the third-party platform. We can handle this by setting up default metadata on the offers.
The example above includes two key-value pairs (csOfferID=ADMCP and csProductID=BDL) that are attached to every subscription originating from the offer on which the metadata is configured.
These values will come from your print provider. This is what will be used to determine which print subscription a user who purchases through Admiral will receive.
For subscriptions with print included, you should consider making the address information required. You can do this by setting the field values as such on the offer. This ensures you have a delivery address for the print product.
Once you have added the metadata to your offers and set any required fields, we can move forward with setting up the integration events.
Configuration for each of the subscription events will be very similar. We will start by building out the New Subscription event and then will edit duplicates of it for the Cancellation and Expiration events.
- Log into your Zapier account and create a new Zap.
- Select Admiral as your app and set New Subscription as the Trigger Event
- Add an action and select Filter by Zapier
- In the Filter setup & testing section, add rules to only continue the event if the subscription includes the metadata keys. This will make sure our event only fires for subscriptions with print included.
- Once your data is formatted, add an action and select Webhooks by Zapier and in the Action Event select POST.
- In the Set up action section, you will need to add an endpoint to where a single POST request will be fired as a form or JSON.
- Once you have finished configuring the POST request, you can test the integration and then enable it!
You can follow the same instructions above to configure both the Cancellation and Expiration events. The only item that is required to change is the starting event configured in Step 2.
If you run into any trouble configuring this integration please email firstname.lastname@example.org and our team will be happy to help.