Order Edit and Refund Handling in Dollarback

Learn how Dollarback automatically adjusts customer cashback when orders are edited, partially refunded, or cancelled in Shopify.


Overview

The Order Edit and Refund Handling feature allows cashback rewards to automatically adjust when orders are edited, refunded, or canceled on Shopify.

This means your customers’ store credit always reflects the true value of their completed purchase, even if you later issue a refund or make order changes.


⚙️ Enabling the Feature

  1. Open the Dollarback App in your Shopify Admin.

  2. Navigate to Settings → Enable Order Edit Handling.

  3. Check the box “Enable order edit functionality”.

  4. Click Save Settings.

Once enabled, the app will begin dynamically recalculating rewards for all orders.


🧭 How It Works

Dollarback automatically tracks order changes and adjusts the corresponding cashback or store credit balance.

Let’s go through how this works in different scenarios:

1. Order is Refunded (Full or Partial)

  • When you refund items or the full order, Dollarback automatically debits the customer’s store credit.

  • The change is logged in the Order Edit History meta field.

If the customer doesn’t have enough credit to cover the debit, Dollarback records the owed balance under a metafield called “Balance Adjustment”, allowing you to track pending deductions.


2. Order is Edited (Items Added or Removed)

  • When items are added or removed or when discount / shipping is updated. Dollarback logs the change, but waits until the order is marked Paid.

  • Once marked Paid, the cashback is recalculated based on the new subtotal and credited to the customer’s account.

This ensures cashback adjustments happen only for finalized changes.


3. Order is Canceled

When an order is canceled in Shopify:

  • Dollarback debites the entire credited cashback for that order from the customer’s store credit.

  • The event is logged in Order Edit History.


📜 How Rewards Are Calculated

When an order is placed, Dollarback saves a snapshot of:

  • The customer’s tags (e.g., VIP, Bronze, etc.)

  • The cashback configuration active at that time

These snapshots ensure that:

  • Cashback is always based on the conditions at the time of purchase, even if customer tags or configurations change later.

  • The only dynamic check performed later is to determine which collections a product is part of, since collections can change frequently and dynamically and it is infeasible to store the entire catalogue.


💳 Metafields You Should Pin

For better visibility in Shopify Admin, we recommend pinning these metafields to your order and customer pages:

Metafield
Type
Description

Cashback Details

Order

Shows the latest credited cashback for that order.

Order Edit History

Order

Shows all cashback debit/credit events for that order.

Balance Adjustment

Customer

Tracks pending debit if the customer’s balance goes negative.

To pin them:

  1. Open any order or customer in Shopify.

  2. Click “View all” under Metafields.

  3. Find the relevant metafield and click the 📌 Pin icon.


🔁 Behavior Across Plans

Scenario
Old Plan (“Pro”)
New Plan (“Advanced”)

Normal Rewards

Refunds are skipped;

Order Edits are skipped; cashback not recalculated.

Refunds and order edits are handled automatically.

Scheduled Rewards

No recalculation at the time of awarding credit. Rewards are given as per initial order state.

Scheduled rewards are recalculated based on the order information at the time of credit. Any new change after the credit is issued is not taken into account

💬 Note: For all previously created scheduled rewards (before this feature was enabled), the existing behavior continues — refunds and edits are not supported.


⚠️ Shopify Warning for Item-less Refunds

If a refund is issued without selecting specific line items, Shopify shows the following warning:

“To avoid unexpected refunds, select items being refunded. For partial refunds, edit the order to add a discount.”

In such cases, Dollarback will not recalculate cashback since item-level context is missing.


📦 Handling Old Orders

For orders placed before enabling this feature:

If you refund or edit an old order after enabling the setting, cashback will now be recalculated for that order. (if it wasn't a scheduled reward)


🔔 Notifications and Event Updates

Dollarback does not trigger store credit notifications configured in the app (credited/debited) for order edits and partial refunds by default, since these differ from regular earning or redemption events.

Variables Sent

Each Store Credit Credited or Store Credit Debited event includes these variables:

  • orderId - Shopify Order ID that's on the URL

  • orderName - Internal order ID typically starts with #

  • eventType

Possible eventType Values and Their Meanings

Event Type
Description

order created

Cashback was given when the order was created (usually on checkout completion).

order paid

Cashback was given when the order was paid (usually on checkout completion).

order fulfilled

Cashback was given after fulfilment, depending on your app settings.

order updated

Store credit was given for any new credit when the order is updated

order refund

Store credit was debited due to a line item removal through order edit / partial refund.

order edited

Store credit was debited due to Shipping / Discount application through order edit.

order cancelled

Store credit is fully debited when an order was cancelled or when all line items are removed.

delayed cashback

Cashback credit was delayed and processed later due to delay store credit = enabled.

You can use these variables in your integrations to:

  • Create custom notification flows in Klaviyo or your email service.

  • Send notifications for adjustment events and inform customers.


🆘 Need Help?

If you have questions or need assistance setting up Order Edit and Refund Handling, our team is available via in-app chat support or email. We’ll be happy to walk you through examples and ensure your cashback program runs seamlessly.

Last updated