Return campaign

Reverse the points a purchase earned when the customer returns it.

When a customer returns a purchase, the points that purchase earned shouldn't stay with them. There are two ways to set this up:

ApproachHow it worksUse it when
A. Delayed pointsPurchase points stay pending for the return period. A return cancels them before they become active.Members should see their points right away but use them only after a return is no longer possible.
B. Immediate pointsPurchase points are active right away. A return blocks the same amount in the member's wallet.Members should be able to use their points immediately.

Your integration has to connect each return to its original purchase. Send the purchase's documentIdentifier as linkedTransactionId on the return:

POST /transactions
{
  "type": "return",
  "email": "test.member@example.com",
  "documentIdentifier": "RET-0001",
  "linkedTransactionId": "TEST-0001",
  "grossValue": 5000,
  "products": [
    { "name": "Running shoes", "sku": "SH-100", "quantity": 1, "price": 5000, "grossValue": 5000 }
  ]
}

Without linkedTransactionId, Scops Loyalty can't tell which purchase's points to reverse.

A. Delayed points

1. Purchase campaign

Create a points campaign. On its Add units effect, click the clock icon and set a delay as long as your return period, for example 30 Days.

2. Return campaign

Go to Campaigns and click New Campaign. Name it, for example Cancel points on returns, and choose the Direct type and the Return Transaction trigger. Leave the rule without conditions and add the Cancel unit transfer effect with Pending units. Turn on Active and click Submit.

A return within 30 days cancels the original purchase's pending points. After 30 days the points are active and a return no longer affects them.

B. Immediate points

1. Purchase campaign

Use a points campaign without a delay.

2. Return campaign

Go to Campaigns and click New Campaign. Name it, for example Block points on returns, and choose the Direct type and the Return Transaction trigger.

Leave the rule without conditions and add the Cancel unit transfer effect with Active units. Choose your points wallet, click Σ and enter the same formula as the purchase campaign, for example items.total * 0.02. The formula is calculated on the returned items, so a partial return blocks only its share of the points.

Turn on Active and click Submit.

Only returns within a period

To react only to returns made within 30 days of the purchase, add a Custom condition to the return campaign's rule:

abs(date(originalTransaction.transactionDate) - date(transactionDate)) / 86400 <= 30

Conditions such as Original transaction value and Original has product from category let you treat returns differently depending on the original purchase.

Test it

  1. Record a purchase for a test member and check the Wallets tab. With approach A the points are pending; with approach B they are active.
  2. Record a return with linkedTransactionId set to the purchase's documentIdentifier.
  3. Check Wallets and History again. With approach A the pending points are cancelled; with approach B the amount is blocked.