Receive Voucher Amounts from OMS

Objective

Introduce new fields in the OMS <> SC API so that more fields from OMS can be received in terms of vouchers and discounts.

  • To ensure the customer pays the correct amount on delivery, these new fields need to be reflected to the customer on the document templates.
  • Use case:
    • A customer checks out on the website and uses a voucher: this voucher can be split over the item price and the shipping fees.
    • Initially, the amount of the voucher that was applied to the shipping fees was not received by Seller Center. Therefore, when the shipping fees amount was printed on any delivery document, the customer would be asked to pay more than what was shown in checkout.
      Critical Knowledge

      • This feature requires OMS development as a prerequisite.
      • A configuration parameter has been introduced to decide which calculation method should be used for total and voucher amounts.
      • If you want to enable “Receive voucher amounts from OMS,” please raise a TMLSD ticket. The parameter that needs to be enabled is order/use_voucher_from_oms/enabled
      • New placeholders have been created for “Invoice” and “Shipping Label” document templates

      What Has Changed ?

      Description Example

      Part 1. Calculation Method in Customer Information (Order Details screen)

      Calculation has been changed to take into account the new fields that are received from OMS in Seller Center.

      Example shows the following use case :

      • Voucher = 100
      • Unit price = 50
      • Shipping Fees = 757,50

      Details of calculation shown below.

      With feature switch ON:

      Voucher-amount-customer-info-1

      With feature switch OFF:

      Voucher-amount-customer-info-off

      Part 2. Improvements for Document Templates

      New placeholders for invoice and shipping labels:

      • “Customer Total After Discount”
      • “Customer Shipping After Discount”
      • “Customer Voucher”

      Revamped calculation of “Cash on Delivery Collection” placeholder if feature switch is enabled.

      Details of calculation shown below.

      Calculation Method

      Part 1. Customer Information in Order Details

      Field Name Feature switch OFF Feature switch ON
      Grand Total paidPrice + shippingFeeItems paidPrice + shippingFeeItems – shippingVoucherAmount
      Voucher Amount unitPrice – paidPrice – walletCredits Not Visible
      Voucher Total Not Visible voucherAmount + shippingVoucherAmount

      Part 2. Document placeholders

      Note: New placeholders are marked with a *

      Field Name Feature switch OFF Feature switch ON
      Cash on Delivery collection IF(charge_money =1, paidPrice + shippingFeeItems, 0) IF(charge_money =1, paidPrice + shippingFeeItems – shippingVoucherAmount, 0)
      Customer Total after Discount paidPrice + shippingFeeItems paidPrice + shippingFeeItems – shippingVoucherAmount
      Customer Shipping after Discount shippingFees – shippingVoucherAmount shippingFees – shippingVoucherAmount
      Customer Voucher* voucherAmount + shippingVoucherAmount voucherAmount + shippingVoucherAmount

      Configuration

      As shown in the “Calculation method” section above, no updates of document templates will be needed if you already use the “Cash on Delivery Collection” placeholder. You might, however, want to add the three new placeholders for accurate display of “Shipping Amount” or “Voucher Total.” In that case, you would only need to update the document templates “Invoice” and “Shipping Label”