Skip to Main Content
Riverty Docs
riverty logo Docs

Add Goodwill

The "Add Goodwill" interface allows you to process goodwill adjustments when customers experience issues such as complaints, delivery delays, missing items, or other scenarios that warrant compensation without returning the goods. Goodwill adjustments can also be used in cases where the client chooses to compensate the customer for lost items, defective products that don’t need to be returned, or specific corrections like voucher usage or price discrepancies.

The "Add Goodwill" interface allows clients to process goodwills for orders with a complaint of the customer but without a return of goods. There are three main categories for such a goodwill:

  • Customer Service Goodwill: For customer complaints, delayed delivery, or defective items that do not need to be returned.
  • Goodwill for Lost Packages: When a package is lost by the carrier, and you need to compensate the customer without a return.
  • Adjustments for Pricing Errors: Correcting an order when the price charged does not match the advertised price.

In each case, you must provide the goodwillReason field with the appropriate reason from the predefined list (e.g., CUSTOMER_COMPLAINT, DELIVERY_DELAYED).

In all cases, a refund will be triggered if the end-customer has already paid for the goods and there is no outstanding amount on the end-customer’s account.

Key Points:

  • Prerequisites:
    • The order must have been created using the create order request and confirmed by Accounting as a Service via an Qualified response notification.
    • The line item must have been shipped and invoiced; the create invoice request must have been sent to Accounting as a Service and confirmed via Qualified Response notification.
  • You have to ensure that the goodwill is always applied to specific line items within the order. If the goodwill applies to the entire order, you must split the goodwill value among all relevant line items.
  • The goodwill amount must be calculated and provided by you; Accounting as a Service will use the values exactly as provided.

General Workflow

  1. Order Creation: Order is placed using create order and confirmed by Accounting as a Service via Qualified response notification.
  2. Invoice and Shipment: Line items are shipped and invoiced; the create invoice request is confirmed by Accounting as a Service via Qualified response notification.
  3. Grant Goodwill: You have to identify the need for a goodwill adjustment in your system (e.g., CRM/OMS) due to customer service decisions, complaints, or issues.
  4. Submit Goodwill Request: You have to calculate the goodwill values for the affected line items and submit them via the add goodwill request to Accounting as a Service.
  5. Validation and Confirmation: Accounting as a Service validates the goodwill request and provides feedback (confirmation or error) via via Qualified response notification.
  6. Booking and Refund: Accounting as a Service books the goodwill-revenue, taxes, and discounts of the returned line items and processes the refund (if configured).
  7. Notifications:
    a. Optionally, Accounting as a Service triggers the refund completed notification once the payment has been processed.
    b. Optionally, the end-customer is informed about the initiated refund via email.

You are responsible to provide the correct items that need to be considered (e.g. Discounts, Shipment-Discounts) and the correct values (considering previously granted goodwills). Accounting as a Service takes the values as given.

Path

POST /businesses/{businessCode}/customers/{customerNumber}/orders/{orderReference}/goodwills

Request Parameters

businessCode
required
string
The business in the context of which this request is to be executed, e.g. 1000
customerNumber
required
string
The customer in the context of which this request is to be executed, e.g. TFI2021072801
orderReference
required
string
The order in the context of which this request is to be executed, e.g. TFI2021072801_03
X-Request-ID
string
The unique ID of this particular request/transaction. Subsequent requests with the same request ID might get ignored.

Request Body

application/json

object
creditDate
string
yyyy-MM-dd
Format(yyyy-MM-dd)
Date the goodwill is credited
goodwillDate
required
string
yyyy-MM-dd
Format(yyyy-MM-dd)
Date the goodwill is created
goodwillReason
string
Enum:
  • CUSTOMER_COMPLAINT
  • DELIVERY_DELAYED
  • ARTICLE_PARCEL_MISSING
  • CORRECTION_VOUCHER
  • ARTICLE_DEFECTIVE
  • CORRECTION_PRICE
  • LOSS_OF_RETURN_POST
  • LOSS_OF_RETURN_WAREHOUSE
  • LOSS_OF_DELIVERY
  • CONTRADICTION_OF_SIGNATURE
  • FRAUD
  • ISSUE_IN_STORE
  • REFUND_EXPRESS_COSTS
  • OTHER
  • LOSS_OF_DELIVERY_WARENPOST
  • WRONG_DELIVERY
Reason for the goodwill: * CUSTOMER_COMPLAINT = customer complaint * DELIVERY_DELAYED = delivery delayed * ARTICLE_PARCEL_MISSING = article/parcel missing * CORRECTION_VOUCHER = correction voucher * ARTICLE_DEFECTIVE = article defective * CORRECTION_PRICE = correction price * LOSS_OF_RETURN_POST = loss of return post * LOSS_OF_RETURN_WAREHOUSE = loss of return warehouse * LOSS_OF_DELIVERY = loss of delivery * CONTRADICTION_OF_SIGNATURE = contradiction of signature * FRAUD = fraud * ISSUE_IN_STORE = issue in store * REFUND_EXPRESS_COSTS = refund express costs * OTHER = other
goodwillReference
required
string
Max length: 30
maxLength(30)
External goodwill number
invoiceReference
string
Max length: 30
maxLength(30)
Invoice number of referenced invoice
required
array

Responses

Add Goodwill example

Request Example

    
        {
 "items": [
  {
   "vatType": "NORMAL",
   "quantity": 2.5,
   "vatAmount": 19.02,
   "vatPercent": 19,
   "grossUnitPrice": 119.12,
   "orderItemReference": 3
  }
 ],
 "creditDate": "2018-03-21",
 "bankDetails": {
  "bic": "GENODEM1MSC",
  "iban": "DE51100100501234567890",
  "accountOwner": "Max Mustermann"
 },
 "goodwillDate": "2018-03-21",
 "goodwillReason": "CUSTOMER_COMPLAINT",
 "invoiceReference": "IDE12345678901",
 "goodwillReference": "GDE12345678901"
}
    

Response Example

    
        {
 "internalRequestId": "23c9579b-baaf-468f-a529-f876226e183c"
}
    

Use Cases

Goodwill with Alternative Refund Payment Method (Bank Transfer)

In some scenarios, such as when the original payment method does not involve a PSP or bank account (e.g., Cash on Delivery or Omnichannel payments), Accounting as a Service may not have the necessary details to process a refund. In such cases, the client must provide alternative refund payment details in the add goodwill request.

Implementation:

When processing a goodwill that requires an alternative refund method, you have to request the details from the end-customer and include the customer's bank details within the add goodwill request. This additional information allows Accounting as a Service to perform the refund via bank transfer, even when the original payment method does not directly support refunds. The bank details should include the account accountOwner, IBAN, and BIC (for non-SEPA countries).

Sample

{
    "goodwillDate": "2018-03-21",
    "goodwillReason": "CUSTOMER_COMPLAINT",
    "goodwillReference": "GDE12345678901",
    "invoiceReference": "IDE12345678901",
    "items": [
        {
            "grossUnitPrice": 5.00,
            "orderItemReference": 2,
            "quantity": 1.0,
            "vatAmount": 0.87,
            "vatPercent": 21,
            "vatType": "NORMAL"
        }
    ],
    "bankDetails": {
        "accountOwner": "John Doe",
        "iban": "DE436345345344742",
        "bic": "BOFIIE2DXXX"
    }
}