Pre-authorised Returns

Customer flow

In this type of return, the steps are as follows:

The customer can initiate the return with the different channels provided by the retailer. They can call customer service or request it with my account section on the frontend. This requirement can be caused by several reasons, such as:

  • The package received does not bring a “return label” so the customer cannot initiate the return as in the process indicated in type one.
  • The product to be returned has special characteristics and requires prior manual action to approve this transaction.
  • The carrier cannot generate a return in their side, their system only allows them to scan the goods when the rma is already imported in their systems.

After the previous step, OMS already has all the information from the customer and, at this moment, sends a notification to the Logistic Service Provider through which notifies them that they will receive a return from the customer at some point.

The customer completes the return label and sends the package to the carrier.

The warehouse verifies that the product/s returned is/are in good condition and if so, the warehouse will inform MOM that the customer “X” made a return of the lines “a and b” of the order “Y”.

MOM will calculate the refund associate to this return based on the retailer refund rules and generate the required notifications to perform the payment refund.

It could happen that the return package does not arrive to the warehouse due to a carrier mistake. The most common use case is when the customer has not received a refund after a few days, he will contact Customer Service. Through Admin, Customer Service will check the status of the return and will see that the package has not been delivered to the carrier. Therefore, they will request to the customer the receipt of the carrier and will contact the carrier for verification. If the receipt is correct, Customer Service will go to the OMS Admin panel to perform a return manually or the customer service tool will need to throw a message to MOM to generate the approval.

After this manual process, MOM sends a notification to “Payments” and then, the refund will be triggered to the end customer.

In this case, in which the package has been lost, Magento and the Logistic Service Provider (LSP) will contact to solve the problem. If the package arrives later to the warehouse and they send us a message MOM will handle the situation to not duplicate them.

Diagram

Integration

1- Once the customer initiate a return MOM will receive an authorize message that will create the return in MOM side.

{
    "return": {
        "sales_channel_id": "ST1",
        "order_id": "000000024",
        "user": "userB",
        "custom_attributes": [],
        "lines": [
            {
                "id": "28",
                "line_number": 1,
                "custom_attributes": [],
                "reason": "TOO_BIG",
                "reason_description": "Too big size"
            }
        ]
    }
}

In case you would like to change the source that handle the request, please specify the source in the following field:

{
    "return": {
        ..
        "source_id": "NEW_SOURCE",
        ..
    }
}

2- MOM will send an updated message informing about of the return has been requested successfully to all systems interested on being synchronized.

{
    "return": {
        "order_id": "000000024",
        "source_id": "SOU1",
        "user": "userB",
        "rma": "RMA-CS-000000024-1",
        "custom_attributes": [],
        "status": {
            "code": "REQUESTED",
            "name": "REQUESTED",
            "reason_code": "BOREQUEST",
            "date": "2017-10-04T11:10:20+00:00"
        },
        "lines": [
            {
                "id": "28",
                "line_number": 1,
                "sku": "WS08-XS-Blue",
                "status": "REQUESTED",
                "custom_attributes": [],
                "reason": "TOO_BIG",
                "reason_description": "Too big size"
            }
        ]
    }
}

NOTE: this is the message that out of the box our MOM connector is using to synchronize both systems MDC and create return entities in MDC.

3- MOM will also send an specific request to the warehouse with the aim they have information in advance about of the return that will arrive.

4- Once the warehouse receive the goods in their system they will send us a received message to record the return in MOM system.

{
    "return": {
        "sales_channel_id": "ST1",
        "order_id": "000000024",
        "source_id": "SOU1",
        "user": "userB",
        "rma": "RMA-CS-000000024-1",
        "lines": []
    }
}

Note: In the case of a partial approval you should specify the list of lines approved in the lines field.

5- At this point, MOM will APPROVE it so will send another updated message to the systems connected with us

{
    "return": {
        "order_id": "000000024",
        "source_id": "SOU1",
        "user": "userB",
        "rma": "RMA-CS-000000024-1",
        "custom_attributes": [],
        "status": {
            "code": "APPROVED",
            "name": "APPROVED",
            "reason_code": "CSRREQUEST",
            "date": "2017-10-04T11:10:20+00:00"
        },
        "lines": [
            {
                "id": "28",
                "line_number": 1,
                "sku": "WS08-XS-Blue",
                "status": "APPROVED",
                "custom_attributes": [],
                "reason": "TOO_BIG",
                "reason_description": "Too big size"
            }
        ]
    }
}

NOTE: this is the message that out of the box our MOM connector is using to synchronize both systems MDC and create return entities in MDC.

6- Once a return is generated the refund is calculated and the refund message updated is triggered

{
    "refund": {
        "order_id": "000000024",
        "store_id": "200001",
        "credit_note_number": "CUS19",
        "credit_note_date": "2017-10-04T11:11:12+00:00",
        "status": {
            "code": "RELEASED",
            "name": "RELEASED",
            "reason_code": "RELEASESUCCESS",
            "reason_name": "RELEASESUCCESS",
            "date": "2017-10-04T11:11:12+00:00"
        },
        "refund_type": "Return",
        "user": "userB",
        "refund_reason": "RELEASESUCCESS",
        "lines": [
            {
                "order_line": "1",
                "order_item_id": "28",
                "payments": [
                    {
                        "details": {
                            "cost_gross": "34.64",
                            "cost_net": "32",
                            "cost_vat": "2.64",
                            "vat_rate": "8.25",
                            "vat_detail": [
                                {
                                    "type": "VAT",
                                    "amount": "2.64",
                                    "rate": "8.25"
                                }
                            ]
                        },
                        "status": {
                            "code": "REFUNDED",
                            "name": "REFUNDED"
                        }
                    }
                ]
            },
            {
                "order_line": "2",
                "order_item_id": "SHIPPING",
                "payments": [
                    {
                        "details": {
                            "cost_gross": "5",
                            "cost_net": "5",
                            "cost_vat": "0",
                            "vat_rate": "0",
                            "vat_detail": [
                                {
                                    "type": "VAT",
                                    "amount": "0",
                                    "rate": "0"
                                }
                            ]
                        },
                        "status": {
                            "code": "REFUNDED",
                            "name": "REFUNDED"
                        }
                    }
                ]
            }
        ],
        "custom_attributes": []
    }
}