EagleEye Integration

Aurora's EagleEye integration allows you to use EagleEye's digital promotions on your store.

This support article describes how Aurora's EagleEye integrations can be set-up and how to manage your EagleEye promotions.

Introduction

EagleEye is a service that validates and redeems digital promotions in real-time for the grocery, retail and hospitality industries. Aurora supports the application of discounts using the Basket Promotions and also the use of Gift Cards at the checkout (with specified payment providers).

This support article covers how EagleEye is integrated into Aurora, and what is necessary to create EagleEye promotions.

Basket Promotions

Integration Settings

EagleEye integration settings can be accessed in the Aurora Backend under the Store > Settings > Promotions > Eagle Eye Integration heading. It contains all the EagleEye Integration settings:

SettingDescription
EagleEye EnabledEnables or disables the EagleEye integration.
EagleEye LiveSwitches between Live and Test integration modes
Log Requests?If this setting is active, then all requests to the EagleEye Gift Card and EagleEye Discount Card API will be logged to the Aurora API Integration log found in the Back-end under Store > Logs > API Integration Log.
API VersionThis controls whether Aurora will make use of EagleEye's newer or older (legacy) API endpoints when working with the EagleEye Gift Cards.

From the perspective of Aurora and your Order Workflow, this setting has no impact on the way the integration works. It simply controls which endpoints are used by Aurora's Integration and will depend entirely on the account(s) issued to you by EagleEye.

As such, if you are unsure which version you should be using, please contact EagleEye regarding the version of the API that should be used.
Relative API URLClient specific section of the API URL

For example, if the full URL was: https://test.eagleeyesolutions.co.uk/mvouchers/handlers/client/staffCardOnline.php

This setting would be “/client/staffCardOnline.php”
Live Merchant IDAPI merchant ID for live integration mode
Live UsernameAPI username for live integration mode
Live Secure API HashAPI hash (password) for live integration mode
Live E-gift Card Campaign IDWhen creating E-gift Cards for sale or refund, Aurora will be using this campaign ID for the live integration mode
Test Merchant IDAPI merchant ID for test integration mode
Test UsernameAPI username for test integration mode
Test Secure API HashAPI hash (password) for test integration mode
Test E-gift Card Campaign IDWhen creating E-gift Cards for sale or refund, Aurora will be using this camping ID for the test integration mode
Refund MethodThis setting controls whether refunds performed for payments made using Gift Cards from EagleEye are issued to the original Gift Card the purchase was made with or by way of a new (replacement) e-Gift Card, issued to the email address the order way placed with.
Require Gift Card PinWith this setting enabled, Aurora will return a validation error when the gift card pin is not provided. This is irrespective of any configuration you may have with EagleEye.

How to enable EagleEye Gift Cards for payment via Aurora

🚧

You should complete the set-up process described above before considering enabling the payment system in Aurora.

Once you have configure the EagleEye integration, you can tell Aurora to allow payment using the EagleEye Gift Card service via the Checkout (and New Order section in the Back-end). To do this, following the Payment Types Accepted at Checkout Support Article.

New E-gift Card Email/SMS notifications via EagleEye

With enabling of the EagleEye Integration in the Store > Settings > Promotions tab, there is a possibility to make use of the "New E-gift Card Email/SMS" notifications via EagleEye. In order to do that there are few things you need to set up.

There are two new EagleEye Integration Settings, see the table below for details:

Setting NameDescriptionExample
Live Email Template IDEagleEye Email Template ID for the live integration mode1234
Test Email Template IDEagleEye Email Template ID for the test integration mode537

🚧

The Email Template ID is only used when an Email notification is sent to the desired email, this template ID is not used when sending a SMS notification.

When the integration is enabled, the following Ordered Item Additional Fields will be added by Aurora automatically:

Field nameDescriptionExample
eagleeye_recipient_email_addressThe email address to which the notification will be sent[email protected]
eagleeye_recipient_phone_numberThe phone number on which the notification will be sent0038978123456
eagleeye_recipient_messageThe message that will be sent to the recipientEnjoy this gift!
eagleeye_recipient_delivery_timestampThe time when the notification should be sent.

Note: If this value is not provided the current timestamp will be used
2018-24-12

🚧

Either email address or phone number can be provided, both are not needed. If both are provided the email takes precedence.

These fields need to be added to the Front-end templates on the product detail page, in order to be able to add the data to the ordered item when adding it to the basket. Here is an example HTML to do that:

<fieldset>
    <input class="textfield" type="text" placeholder="EMAIL" name="additional_description[eagleeye_recipient_email_address]" value="">
    <input class="textfield" type="text" placeholder="PHONE" name="additional_description[eagleeye_recipient_phone_number]" value="">
    <input class="textfield" type="text" placeholder="MSG" name="additional_description[eagleeye_recipient_message]" value="">
    <input class="textfield" type="text" placeholder="TIMESTAMP" name="additional_description[eagleeye_recipient_delivery_timestamp]" value="">
</fieldset>

🚧

These fields should be added inside a <form> tag for the product addition, and the above html example of the additional fields are provided without formatting, prompts or validation, and are for demonstration purposes only.

After the product additional fields have been filled and added to the basket, these fields can't be edited. In order to change any of the values, the customer needs to remove the item from the basket and re-add it with the correct data.

EagleEye Discount Card Integration Settings

SettingDescription
Live Validate Discount Card Holders with EagleEyeAurora will contact EagleEye through their API to check the provided identity value. This can be either a discount code or email address. If this is off, the provided identity value will pass validation provided it is 3 characters or more in length.
Live Wallet Client IDClient/API ID for the live integration mode
Live Wallet Client Secret/PasswordClient Secret / API Password for the live integration mode
Live Discount Card Campaign IDCampaign ID used for identifying the accounts in the Wallet(s) for the live integration mode
Test Validate Discount Card Holders with EagleEyeAurora will contact EagleEye through their API to check the provided identity value. This can be either a discount code or email address. If this is off, the provided identity value will pass validation provided it is 3 characters or more in length.
Test Wallet Client IDClient/API ID for the test integration mode
Test Wallet Client Secret/PasswordClient Secret / API Password for the test integration mode
Test Discount Card Campaign IDCampaign ID used for identifying the accounts in the Wallet(s) for the test integration mode

🚧

The "Enabled?", "Live?" and "Log Requests?" settings described above are shared for all of the EagleEye Integrations.

EagleEye Validation

The discount card provided by the user in the order process will be validated against EagleEye at checkout, but will NOT block the checkout process on failure, i.e. the order will proceed no matter if the provided discount card is valid or not.

The result of the call to the EagleEye redemption against a customer active EagleEye account will be stored in an order additional field as "Valid" or "Invalid" respectively. 

A successful redemption call against customers active EagleEye account, will then result with creating a transaction in the customers wallet. You can find below, a list of the information passed to EagleEye for the wallet transaction:

Variable NameDescriptionExample
walletTransactionAccountsThis is a container for the account informationN/a
walletTransactionAccounts.accountTransactionIdThis is the account transaction returned from EagleEye when redemption has been done against the customer active EagleEye account112233
walletTransactionBasketThis is a container for all the basket informationN/A
walletTransactionBasket.basketContentsThis is a container for all the basket items that the order containsN/A
walletTransactionBasket.basketContents.skuThe Aurora Product reference or the Aurora Product Variation reference, where the product variation has precedenceVA212511
walletTransactionBasket.basketContents.descriptionThis is the Product Name and the SizeShoes - 40
walletTransactionBasket.basketContents.itemUnitCountThe number of items ordered in the basket line2
walletTransactionBasket.basketContents.itemUnitCostThe cost of the product before discount with included TAX in the lowest denomination of the default currency£4.99 = 499
walletTransactionBasket.basketContents.totalUnitCostThe total cost of the products in the line before any discounts with included TAX in the lowest denomination of the default currency£9.98 = 998
walletTransactionBasket.basketContents.totalUnitCostAfterDiscountThis is the total price paid for the basket line including TAX in the lowest denomination of the default currency.2 items * £4.99 = 998

2 items * £4.99 - £1 discount = 898
walletTransactionBasket.basketSummaryThis is container for the basket summaryN/A
walletTransactionBasket.basketSummary.totalItemsThe total number of items ordered in the whole order2
walletTransactionBasket.basketSummary.totalBasketValueThis is the total price paid for the entire order with included TAX in the lowest denomination of the default currency2 items * £4.99 = 998

2 items * £4.99 - £1 discount = 898
walletTransactionBasket.basketSummary.totalDiscountAmmountThe total discount applied to the whole order in the lowest denomination of the default currency£1 = 100
walletTransactionBasket.paymentDetailsThis is a container for the payment detailsN/A
walletTransactionBasket.paymentDetailsThe is the actual payment type that has been used in the order. So if a CARD has been used to pay £5 and a GIFTCARD is used with the value of £1 there will be two items in the paymentDetails: "CARD":"500","GIFTCARD":100{"CARD" => 500,

"GIFTCARD" => 100}

EagleEye Remember Discount Card Number

Whenever a logged in user provides a discount card on checkout or purchases a discount card, Aurora will remember that card number for future uses and will expose it through a smarty variable. The smarty variable will be set and ready for use the next time the user logs in. The name of the smarty variable is "loyalty_card_number" and it can be accessed through the smarty templates, as in the following example:

<p>User Discount Card: {$smarty.session.user.fields.loyalty_card_number} </p>

EagleEye Discount Card Touchpoints

📘

This section describes where and when Aurora makes contact with the EagleEye service for the purposes of managing Discount Cards, from checkout to card delivery.

Wallet ID AutoLink (at Login)

When EagleEye is enabled and a customer logs into your store Aurora will automatically link the account with any existing active EagleEye account for that email. Where customers are already linked this process will be skipped.

Discount Card retrieval (at Login)

During the customer login process the following calls may occur in an attempt to locate a Discount Card Number for the customer where Aurora does not already have one on record:

  • /wallet/{walletId}/identities

Validating a Discount Card during purchase (at checkout)

During the checkout process the following calls may occur to check the validity of any discount card being provided at checkout:

  • /wallet/accounts - For checking if the card number provided is attached to an active account
  • /wallet/{walletId}/account/{accountId}/redeem - For registering the purchase value against the customer's active account.
  • /wallet/{walletId}/transaction - For recording the successful redemption transaction on the customer's account.

Issuing a purchased Discount Card (at order fraud approval)

Once a discount card purchase is considered 'fraud approved' the following calls may occur to check the current status of a customer's accounts in EagleEye and create all the the necessary records for the purchase made:

  • /wallet - For checking for existing customer wallets.
  • /services/wallet - For creating wallets for customers that do not already have one.
  • /wallet/{walletId}/consumer - For creating a consumer record for customers that do not already have one.
  • /wallet/{walletId}/campaign/{campaignId}/account - For creating accounts for customers that do not already have one.
  • /wallet/{walletId}/account/{accountId} - For updating existing accounts for customers in the event of a renewal.

EagleEye Promotions

Creating an EagleEye promotion

When the EagleEye integration is enabled, you are able to create an EagleEye Promotion in Aurora under Merchandising > Basket & Coupon Promotions > Add Promotion.

EagleEye promotions use the standard Aurora promotion framework - as such, the Creating Basket and Coupon Promotions support article can be used when creating an EagleEye promotion. The only difference is that you will need to select EagleEye Staff Rewards option as the Promotion Type when creating the promotion. Unavailable EagleEye promotion settings will then be hidden.

🚧

If the EagleEye integration is disabled, the EagleEye Staff Rewards option will not appear under the Promotion Type dropdown menu.

Pertinent settings:

SettingDescription
PrioritySpecifies the promotion priority.

Use 0 for the highest priority.
Stop further rules processingSpecifies if further promotions can be applied or not.
Max usageSpecifies how many times the promotion can be used. Leave empty for unlimited uses.
Require loginSpecify if a promotion is applicable to logged in users only.

🚧

It's not possible to provide a discount amount for EagleEye promotions. This is because the discount amount for EagleEye promotions comes direct from the EagleEye service, and it is controlled there.

EagleEye Promotion Flow

Basket

EagleEye promotions will be applied to the basket like any other standard Aurora promotion. This will depend on the promotion configuration:

  • If a promotion has coupons configured, it will be applied when a user enters the promotion coupon
  • If a promotion has no coupons configured, it will be applied automatically

When an EagleEye promotion is applied to a basket, Aurora will connect to the EagleEye service and validate the user, also checking the discounts applicable to them. If there is a discount configured for the user, the appropriate discount value and available balance will be retrieved. If the available balance covers the total cost of the order, the promotion will be applied.

If the EagleEye service cannot be connected to, the user cannot be verified by the EagleEye service, or if the user's EagleEye balance does not cover the total paid value of the order - an error message will be shown to the user.

Checkout

The standard checkout process registers the customers discounts with EagleEye as the order is placed. The process flow, on payment, is as follows:

  1. The discount is redeemed with EagleEye
    1. If the discount is approved:
      1. Continue to step 2.
    2. If the discount is rejected or EagleEye cannot be contacted:
      1. Discount is removed from the basket.
      2. The basket page is shown to the user with an error message describing the issue.
      3. The error is logged to "Failed Orders" log.
  2. Payment is taken:
    1. If payment succeeds:
      1. Order is stored with all discount details.
      2. Order completed page is shown.
    2. If payment fails or is rejected:
      1. EagleEye discount is refunded.
      2. The basket page is shown to the user with the usual error message pertaining to the failure of the payment.

Errors

Front-end errors

All EagleEye errors displayed to users benefit from central management with Multiple Language translations and Site Text, which allows you to customise error messages.

To customise these messages, navigate to the Content > Site text. Select Basket as the Search Page and type Error into the search field:

Available error messages will be displayed. From here, each entry can be edited.

Failed Orders

If an EagleEye error occurs during the checkout process, an error is logged in Orders > Failed Orders.

Order Refund Errors

If an EagleEye error occurs while refunding an order, the refund will not be prevented, but will continue. However a note regarding the error will be visible in the confirmation message that is subsequently shown.

Further details regarding the error will be visible under the Errors tab on the View Order page.

A manual EagleEye refund may then be necessary via the EagleEye platform.