Note on Testing: Custom campaign codes for Voucherify and Talon One codes can only be tested in QA & Production. Dev & Staging testing are limited to the defined set of offers and codes listed in the the technical documentation.
Sanity Setup - Loyalty
For the loyalty platform integration we are essentially setting up the documents needed to create a personalized offer - template and config documents.
As of now the template id is a constant within Sanity LoyaltyOffersUI document, while the config id is what will be linked to each code in the 3rd party vendors.
In Sanity, navigate to Loyalty Configs → Loyalty Offers UI → Offer Promotion Template
Use a created template document and reference it in the Offer Promotion Template field.
For the time being, this template document must be without rules.
Voucherify Setup
For Promo Code Offers or Cart Promo Codes
Log onto Voucherify DUS3 environment https://dus3.app.voucherify.io/#/login
In the left sidebar click ‘Campaigns’ and click the + in the top right to create a new campaign
Select Discount Coupons. Note the offer’s discount is still determined by sanity so most settings applied in Voucherify will not affect the offer in our app.
Determine if you want bulk codes or a standalone code. Add a name and description for the campaign. This will only be visible for voucherify users. Confirm redemption limits and the number of codes to generate. Click Next Step when done.
See Voucherify documentation for more detail https://support.voucherify.io/article/17-how-do-i-create-my-first-campaign
Set the time duration if required.
Note that the time limit you set in Voucherify will control when promo codes are valid and redeemable.
You can set a time duration for the campaign, as well as a time duration for individual promo codes
CBA Platform:
For promo code offers, the sanity offer expiry time will determine when the offer is visible and redeemable
For cart promo codes, the sanity offer expiry time will determine when the offer is redeemable after a successful promo code has been applied. Offers that are not immediately redeemed will be held in the ‘View Saved Promotions’ link underneath the cart promo code field as long as it remains available subject to sanity rulesets.
In most cases, you should set the sanity expiry and voucherify code expiry to the same times.
If the codes expire earlier than the offer, the offer will only be available for the remainder of it’s available time to users who already applied a successful code - this case may apply for a ‘limited redemption’ offer .
If the offer expires earlier than the codes, guests will see a successful code confirmation but get no offer applied - this should be avoided as this will cause guest confusion and complaints.
Leave blank if the codes do not expire.
Loyalty Platform
For loyalty platform coupons, the offer expiry time will determine when the offer associated with the promo code is redeemable after a code has been applied.
When a personalized offer is created, it will use the start and end date of the campaign, unless specific coupon start and end dates are specified.
ex:
if you set campaign start to [Jan 1 2022] and campaign end to [Dec 1, 2022], but coupon start date to [Feb 1, 2022] and coupon end date to [March 1, 2022], the personalized offer created will only be valid between [Feb 1, 2022 ]and [March 1, 2022].
When creating promo codes to be integrated with the loyalty platform, a start date and end date for the campaign/coupon must be specified
Otherwise, an error will appear during coupon validation
Click Next Step when done.
See Voucherify documentation for more detail https://support.voucherify.io/article/17-how-do-i-create-my-first-campaign
Set the discount to ‘Amount Type’ for 1 USD. Do not add any validation rules. Click Next Step when done.
The true discount and rulesets will be determined by the sanity offer.
Metadata Setup:
CBA - Click the pencil to edit the offerId. Paste in the offer ID from sanity. This is required for the promo code to work. Click Next Step when done.
Loyalty - Click the pencil to edit the configId. Paste in the configId from sanity. This is required for the promo code to work. Click Next Step when done.
Confirm all of your settings are correct. Click Save when done.
You will be taken to the campaign page. Click on the voucher tab to view all codes. If live, the codes should be active.
Any campaign can be activated or de-activated from the voucherify dashboard once code generation is complete. Manual de-activation will cause all codes to respond with an error to guests and and is not preferable to expiry.
To add more codes to an existing campaign, click the + in the top right corner and select ‘Add vouchers to this campaign’. Any additional codes added will correspond to the same sanity offer Id on the whole campaign.
To create codes via import, click on the 3 dot drop down in the top right and select ‘Import CSV file’. Your can also export all your existing codes using ‘Export to CSV’ here.
Upload a file CSV file with your codes and settings
Sample file below