Wrong Item Getting Reward Discount

We have an integration with Square. We’re using Square Loyalty as well.

In it, we have created a loyalty program where if the user uses 150 points, they can redeem a few item options.

Item 1: 4.50
Item 2: 2.25

On our client app side, the user can select either of the items to pick the reward for.

Example: User selects item 2 as a reward and also adds item 1 as a normal item to the order.

But when submitting the order to Square, it seems like they have used Item 1 as the reward and given a discount of $0.90 instead of the selected item 1’s supposed $0.45

Why is this? How can we send the correct item as a reward?

This is confusing to the end users as they’ve selected one product from the reward, but another one has been given as the reward. Also, the bill calculation goes haywire too, since we calculated the discount for a lesser-priced product, but the final total charged is different from what we displayed on the client app.

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Manage Loyalty Rewards
Loyalty Program
Set up a Loyalty Program (Walkthrough 1)

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The issue you’re experiencing is likely due to how Square’s pricing engine applies discounts to maximize the reward value for the buyer. When multiple items are eligible for a reward, Square automatically applies the discount to the item that provides the greatest value to the customer, which in this case is the more expensive item.

To ensure that the correct item is used as the reward, you can take the following steps:

  1. Specify the Reward Item in the Order: When creating the order, ensure that the item you want to be used as the reward is clearly specified. You can do this by setting the item variation ID for the reward in the order line item.

  2. Use Deferred Reward Creation: Consider using the deferred reward creation approach. This allows you to show a preview of the order with the intended discounts applied before actually creating the reward. This way, you can confirm with the user that the correct item is being used as the reward.

  3. Check the Discount Application: After creating the order and applying the reward, retrieve the order to verify that the discount has been applied to the correct item. If not, you may need to adjust the order or the reward application logic.

  4. Custom Logic for Reward Application: Implement custom logic in your application to track and apply the reward to the specific item selected by the user. This might involve managing the reward application on the client side before sending the final order to Square.

By ensuring that the correct item is specified and using deferred reward creation, you can better control which item is used as the reward and avoid confusion for the end users.

This answer was reviewed by @Bryan-Square.