Shopify Refunds to SAP Business One Credit Memo
First published on: 10/19/2023/10:16 am
Workflow Summary
- This workflow scans Shopify at regularly scheduled intervals for partial or fully refunded orders.
- Then, it creates an A/R credit memo for every refunded item and an outgoing payment for the business partner that corresponds with the SAP Business One sales order.
- Assumes the Shopify order has been fulfilled.
Workflow Description
A scheduled job will call Shopify at regular intervals (configurable) to retrieve any refunded or partially refunded orders since the last job run. The process will create an A/R credit memo for every refund in the order and an outgoing payment for the same business partner in the SAP Business One sales order.
Workflow Diagram
Mapping
SAP Business One Item Credit Memo
Shopify Refund Field |
SAP Item Credit Memo Field |
Comments |
---|---|---|
Header |
|
|
created_at |
ORIN.DocDate |
|
created_at |
ORIN.DocDueDate |
|
|
ORIN.DocType |
I |
|
ORIN.CardCode |
OINV.CardCode where OINV.U_V33SB_EXTERNALORDERID = order_id |
order_id |
ORIN. NumAtCard |
Shopify Order Number |
order_id |
ORIN.U_V33SB_EXTERNALORDERID |
|
|
ORIN.U_V33SB_EXTERNALORDERSRC |
“Shopify” |
id |
ORIN.U_V33SB_EXTERNALREFUNDID |
|
Refund_Line_Items |
|
|
line_items.sku |
RIN1.ItemCode |
|
line_items.quantity |
RIN1.Quantity |
|
line_items.price |
RIN1.UnitPrice |
|
subtotal |
RIN1.LineTotal |
|
|
RIN1.TaxCode |
Exempt |
line_items.id |
RIN1.U_V33SB_EXTERNALLINEID |
|
|
RIN1.BaseType |
“13” |
|
RIN1.BaseEntry |
Invoice DocEntry |
|
RIN1.BaseLine |
Invoice Line Number |
Expenses (Tax and Freight) |
|
|
|
RIN3.ExpnsCode |
‘ShopifyTax’ code |
total_tax |
RIN3.LineTotal |
|
|
RIN3.TaxCode |
“Exempt” |
|
RIN3.ExpnsCode |
‘ShopifyFreight’ code |
shipping_lines.price |
RIN3.LineTotal |
|
|
RIN3.TaxCode |
“Exempt” |
|
RIN3.ExpnsCode |
‘ShopifyDiscount’ code |
total_discounts |
RIN3.LineTotal |
|
|
RIN3.TaxCode |
“Exempt” |
SAP Business One Service Credit Memo
Shopify Refund Field |
SAP Service Credit Memo Field |
Comments |
---|---|---|
Header |
|
|
created_at |
ORIN.DocDate |
|
created_at |
ORIN.DocDueDate |
|
|
ORIN.DocType |
S |
|
ORIN.CardCode |
OINV.CardCode where OINV.U_V33SB_EXTERNALORDERID = order_id |
|
ORIN. NumAtCard |
Shopify Order Number |
order_id |
ORIN.U_V33SB_EXTERNALORDERID |
|
|
ORIN.U_V33SB_EXTERNALORDERSRC |
“Shopify” |
id |
ORIN.U_V33SB_EXTERNALREFUNDID |
|
|
|
|
|
RIN1.Description |
Shopify Order Refund |
|
RIN1.LineTotal |
Sum of all successful transaction amounts in the refund |
|
RIN1.TaxCode |
Exempt |
|
RIN1.AcctCode |
Defined by customer |
SAP Business One Outgoing Payments
Shopify Refund Field |
SAP Outgoing Payment Field |
Comments |
---|---|---|
Payments |
|
|
created_at |
OVPM.DocDate |
|
|
OVPM.DocType |
“rCustomer” |
|
OVPM.CardCode |
Credit Memo Card Code |
Payments_Invoices |
|
|
|
VPM2.InvType |
“it_CredItnote” |
|
VPM2.DocEntry |
Credit Memo DocEntry |
|
VPM2.SumApplied |
Sum of all successful transaction amounts in the refund |
Payments_CreditCards |
|
|
transaction[0].gateway |
VPM3.CreditCard |
Result of query GetCreditCardCode |
Last modified: 11/15/2023/8:21 pm |