Voyado Vouchers
Last updatedOverview#
This guide explains how you can combine Voyado's promotions with Centra's voucher logic, to offer your members in Voyado discounts or perks such as free shipping. You have access to the full voucher logic in Centra when designing promotions in Voyado and Centra ensures promotions are redeemed from Voyado once used.
Prerequisites#
In this scenario we assume that you already have an account in Voyado and configured the plugin Voyado v2
in Centra.
In Centra#
The first thing you need to do is add a new voucher to your store. The only thing that is required for this scenario is Method: code
, Max usage: 0
and Start/stop date
set accordingly to your needs. The code
can be anything you want.
In Voyado#
It's time to add new promotion in Voyado.
- Login to your account in Voyado
- Go to Promotions > Active
- Select New promotion > Multi-channel promotion
- Create promotion
- Set
Start date
andEnd date
the same as in Centra - Check
Can be used online
- Select
External promotion code
and provide Centra's voucher code in the next field - It's up to you how you fill out the other fields - the presentation part can be useful for your frontend application
- Save it, then Activate it
- Assign contacts
Front End#
You present available promotions from Voyado to your customer by fetching them from Voyado.
Remember to query Voyado with additional header apikey
.
If you don't have your customer's Voyado ID:
- Query
https://{{yourVoyadoDomain}}/api/v2/contactoverview?contactType={{type}}&email={{email}}
- In the response you'll get
promotions
list.
If you have your customer's Voyado ID use https://{{yourVoyadoDomain}}/api/v2/contacts/{{customerVoyadoId}}/promotions?redemptionChannelType=ECOM
which will return list of promotions for this user.
A single promotion looks like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"id": "12704681-e1d9-4861-9e75-abad00de9a6a",
"externalId": null,
"type": "Multichannel",
"name": "Demo promotion",
"expiresOn": null,
"heading": "Demo promotion title",
"description": "Demo description",
"redeemed": true,
"redeemedOn": "2020-05-07T13:14:48+02:00",
"imageUrl": null,
"link": null,
"redemptionChannels": [
{
"type": "ECOM",
"valueType": "EXTERNALOFFER",
"value": "code",
"instruction": null
}
]
}
Only show the customer promotions that have redemption channel with value type EXTERNALOFFER
and were not redeemed yet. As you can see in example above - your voucher code is in redemption channel under value
key. When customer selects the promotion, you should apply this code to the active selection.
When paying for an order instruct Centra to redeem Voyado's promotion so it won't be shown again. Centra will redeem the promotion from Voyado if and only if the payment is successful.
Example payment query body:
1
2
3
4
5
6
7
8
9
10
{
"paymentMethod": ...,
"termsAndConditions": ...,
"paymentReturnPage": ...,
"additionalFields": {
"voyado_promotion_id": "12704681-e1d9-4861-9e75-abad00de9a6a"
},
"address": {...
}
}
Security#
Remember that you shouldn't reveal your Voyado's apikey
to public. These queries should be done on backend.
Anyone with access to the vocuher code
will be able to use it, so make sure to keep it secret if you don't want that.