Coupon services
In scenarios where your discount coupons are handled outside of EVA, an integration is required for proper validations.
For that the whitelabel coupon handler settings come into play.
In instances where more than one coupon handler is used, we require a middleware where they are all grouped under. In turn our integration (coupon handler setting values) would point to that middleware.
Coupon handler settings
Using the Settings module of Admin Suite the following settings need to be configured:
Setting | Description |
---|---|
WhitelabelCouponHandler:BaseUrl | Base URL of the coupon handler. |
WhitelabelCouponHandler:Username | The username to log in with. |
WhitelabelCouponHandler:Password | The password to log in with. |
WhitelabelCouponHandler:Timeout | Inactive time in minutes before a call is timed out. If this setting is not configured, a default value of 10 minutes would apply. |
In order for EVA to instantiate the response body received by the handler API for consumption, EVA expects a .json format.
Event export
Once settings are in place, event exports can be used. In this scenario, the event contents would read as follows:
Target
:Coupon
(ID: 19)EventType
:Created
Identifier
: A GUID token. This token can then be used to resolve the coupon via theGetCouponByToken
service.
Here is a sample GetCouponByToken
response:
{
Code = "TheCouponCode",
UserID = 1,
DiscountID = 1,
DiscountDescription = "as configured",
DiscountMarketingDescription = "as configured",
ValidFrom = "as configured - day/month/year",
ValidTill = "as configured - day/month/year"
}