Return Return Product Process Design Technology Development Docking Provides the Most Effective Home Access Solution

Keywords: ASP.NET encoding JSON Mobile Java


In recent years, the scale of e-commerce transactions in China is growing, online orders are increasing, and returns and exchanges are becoming more and more common.Return and exchange link is an important part of online shopping process, and also an important aspect reflecting e-commerce platform and business service level.At the same time, returns and exchanges are also the most easily disputed link among e-commerce platforms, businesses and consumers.In order to ensure this link of services, e-commerce platforms continue to introduce a variety of services, including return and exchange door-to-door pick-up services.
At present, Taobao, Jingdong, mostly have this service. Unfortunately, such large e-commerce enterprises are used internally by the platform and do not provide services to other e-commerce platforms. That is to say, other e-commerce platforms need to use Taobao. It is almost impossible for Jingdong to return and exchange goods to pick up parts. However, it is unrealistic for these small and medium-sized E-commerces to develop independently, the cost is too high and the cycle is long, of course.I write this article, but also have full confidence to help you. Fortunately, many third-party logistics service companies have also noticed this situation and launched similar services. The well-known national brand Express Bird has pioneered the return and exchange door pick-up service. The difference is that the delivery service of Express Bird is really for our e-commerce services. For this reason, I specially studied it.Express bird's door pick-up business, made some personal summary, to share with you, product managers and technical personnel must see, there must be gains.

1. Service Introduction

1.1 What is a return-to-home pick-up?
Return and exchange door-to-door pick-up service is a comfortable and convenient logistics return service provided by the buyer when returning goods. When the buyer purchases goods for exchange or return, the logistics company arranges the courier to pick up the returned goods at home as a service.
1.2 Service flow for return to home

The figure above is a service flow chart, from which we can see that there are buyers, e-commerce platforms, courier birds, logistics companies, couriers. Let's start with consumer buyers.

Let's make a comparison of the return service before and after.
Before docking return service:
Customers have trouble applying for return thieves. First, the customer should contact the courier by phone or deliver the goods to the courier outlet by himself. Also, note a small note on the returned goods, write down the order number and return instructions, and also log in to the website to fill in the shipping bill number when the goods are mailed out. If the customer fills in an error, it will affect the time when the customer's refund funds arrive in the account.Have you ever had a return experience, do you agree?

After seeing the docking return service:
Customers only need to apply for a return slightly, one return, the logistics company will arrange couriers to pick up the items at home, customers at home to drink a cup of coffee to complete the return.There are also a variety of value-added services, you can book the courier's arrival time, pay freight online, some have freight insurance, basically no cost, customers do not need to note the order, follow-up operations are automatically completed by the system, and finally the customer can only raise their thumb for you, say: very good!

Next, E-commerce Platform
E-commerce receives customer return requests, e-commerce customers will conduct initial examination according to their own review rules, whether the return conditions are met, initiate a return application to express birds when they are satisfied, and notify customers when they are not satisfied. This part of the function can be designed according to their own internal business needs, the major mainstream course remains unchanged, and other value-added services functions, you can find out about the customer service of express birds here.Let's not go into details.

The remaining roles, the relationship between courier bird, logistics company, courier, they have their own internal business processes, should not be simple, if you are interested, you can leave a message for me, to elaborate.

2. Service Advantage

Door-to-door pick-up service is a one-off business that benefits both buyers and e-commerce platforms.
What can a seller get?
1, let your buyer experience fast and convenient return service, provide your store competitiveness
2. Settle freight online and pay without worry
3. Conduct basic acceptance upon return to ensure that the returned goods meet your return requirements
4. Return information is monitored throughout, so that you can keep track of the return progress in real time
5. Ensure the quality of returns throughout, so that you don't worry about logistics problems

What can a buyer get?
1. Return is easier, someone will pick it up if they want it back, and they can also make an appointment.
2. Easier payment, online payment of freight
3. Don't be afraid of losing or destroying returned goods, couriers have checked and accepted them, risk transfer

3. Service Interface

In order to take care of new technicians, I will share the source code, copy the source code to your project, and you will be able to quickly complete the docking of the door-to-door return interface.Here we take the door return service of Shentong Express as an example to explain, call the standard API interface of door pick-up provided by courier bird, after successful call, Shentong Express will pick-up at home, and support the track query of Shentong Express Bill.The Express Bird API interface does not distinguish between development languages and supports program calls in Java, C#, PHP, Python, ObjectC and other development languages.The implementation process is explained in detail below.

3.1. Complete preliminary preparations

   Go to the Express Bird website to register an account for free
   Get an apiKey for free (required for interface privilege validation)
   Complete Real Name Authentication Process
   Order a free meal

3.2.API interface

   Test call address:
   Official call address:
   Request method: POST
   Encoding format (utf-8): application/x-www-form-urlencoded;charset=utf-8
   Return type: JSON  
   Debugging page:

3.3. System Request Parameters (Headers)

3.4. Single Request Parameter (Body)

3.5. Return

3.6. Next Single Request Parameter (Json example)

        "ExpAreaName":"Qingpu District",
        "Address":"Pearl Road"
        "ExpAreaName":"Chaoyang District",
        "Address":"Sanlitun Street"
    "Remark":"Handle with care"

3.7. Order Request Full Message (URL Encoding)


3.8. Order successfully returned message (Json example)

        "ShipperCode":" STO",

Actual business will exist, cancel the operation function, customer orders, due to many reasons to cancel the order, this courier bird also provides the interface to cancel the door access, let's explain how to call.

3.9. Cancel request parameter (Body)

3.10. Cancel return parameter (Return)

3.11 Cancel request parameters (Json example)

  "OrderCode": "012657018199",
  "ShipperCode": "SF",

3.12 Cancel successful return message (Json example)

    "EBusinessID": "1237100",
    "Success": true,
    "ResultCode": "100",

3.13. Step-by-step explanation (C#version)

  • Request Packet Structure

  • C#Call Code Example
//E-commerce ID
string eEBusinessID = "test1617571";
 //E-commerce encryption private key, courier bird provided, take care to keep, do not leak
 string appKey= "554343b2-7252-439b-b4eb-1af42c8f2175";
 //Request url
 string reqURL = "";
 //Request instructions 
 string reqType="1801";
 string dataType = "2"; 
 //Character encoding using UTF-8 
 string charset = "UTF-8"; 
 //JSON String
 string string jsonStr = "{
        \"ExpAreaName\":\"Qingpu District\",
        \"Address\":\"Pearl Road\"
        \"ExpAreaName\":\"Chaoyang District\",
        \"Address\":\"Sanlitun Street\"
    \"Remark\":\"Handle with care\"
}" ;
 //Encrypt (jsonStr+APIKey) with MD5
 string md5Str=MD5(jsonStr + apiKey, charset);
 //Base64 encoding md5Str
 string base64Str=base64(md5Str,charset);
 //Encoding URL s (utf-8)
 string datasign = HttpUtility.UrlEncode(base64Str, charset); 
 //Request Message Parameters 
 string postStr = "RequestType=reqType&EBusinessID= eEBusinessID&RequestData=jsonStr 
&DataSign= datasign&DataType=dataType"; 
//Communication protocol uses Http protocol Post request to return track data
string post = SendPost(reqURL, postStr);

//The post data you get is the complete message returned by the courier bird. Then you can get the field information by writing a method to parse the json yourself.
  • C#Call Method
    ///String MD5 Encryption
    ///<param name="str">String to be encrypted</param>
    ///<param name="charset">encoding</param>
    private string MD5(string str, string charset)
        byte[] buffer = System.Text.Encoding.GetEncoding(charset).GetBytes(str);
            System.Security.Cryptography.MD5CryptoServiceProvider check;
            check = new System.Security.Cryptography.MD5CryptoServiceProvider();
            byte[] somme = check.ComputeHash(buffer);
            string ret = "";
            foreach (byte a in somme)
                if (a < 16)
                    ret += "0" + a.ToString("X");
                    ret += a.ToString("X");
            return ret.ToLower();
    /// <summary>
    /// base64 encoding
    /// </summary>
    /// <param name="str">Content</param>
    /// <param name="charset">encoding</param>
    /// <returns></returns>
    private string base64(String str, String charset)
        return Convert.ToBase64String(System.Text.Encoding.GetEncoding(charset).GetBytes(str));
 /// <summary>
    /// Post submit data, return source code of web page
    /// </summary>
    /// <param name="url">URL to send request</param>
    /// <param name="postData">Request message parameters</param>
    /// <returns>Response results from remote resources </returns>
    private string SendPost(string url, string postData)
        string result = "";
        byte[] byteData = Encoding.GetEncoding("UTF-8").GetBytes(postData.ToString());
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.ContentType = "application/x-www-form-urlencoded";
            request.Referer = url;
            request.Accept = "*/*";
            request.Timeout = 30 * 1000;
            request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727;
             .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)";
            request.Method = "POST";
            request.ContentLength = byteData.Length;
            Stream stream = request.GetRequestStream();
            stream.Write(byteData, 0, byteData.Length);
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            Stream backStream = response.GetResponseStream();
            StreamReader sr = new StreamReader(backStream, Encoding.GetEncoding("UTF-8"));
            result = sr.ReadToEnd();
        catch (Exception ex)
            result = ex.ToString();
        return result;

3.14. About signatures
Express bird docking with third-party e-commerce company system has a certain security mechanism.Docking using IP authentication and signature, the specific scheme is as follows:

Prevent data tampering 5 required (R) parameters RequestData==data content are passed in a POST request (URL encoding: UTF-8)
EBusinessID==User ID RequestType=Request Instruction Type DataSign==
Data content signature: MD5 encryption with (request content (unencoded) +ApiKey, Base64 encoding, and URL(utf-8) encoding
DataType==2 (return data type is json) Note: Once a DataSign is generated, the other party receives the data and signs it with the same algorithm (push interface)
RequestType 101/102 does not require a URL
Encoding), generating summaries, comparing whether the summaries are the same or not, if different, indicating that data tampering occurred during transmission.Call Interface Authentication
When registered as a courier bird user, the corresponding user ID and APIKey are generated, which correspond to the user name and APIKey to the password.

3.15. Return code definition
101| Missing required parameters
102| Check Question
103| Formatting Issues

4. Summary

Customers who are willing to pay for our platform shopping will also consider the convenience of returns. Resolving customers'concerns is a good service. I do not agree with some product managers who believe that the process of returns should be complex enough to make consumers feel the trouble of returning goods, so that they can not return them. This kind of thinking is not desirable. We should focus on product quality.Work hard, good products, such as WeChat and Alipay, are all necessary for mobile phones. Even if there is a regular pop-up window to remind you, buddy, uninstall WeChat, you are still indifferent, because you can't leave WeChat.I really hate some software. It is hard to find the uninstall button when installing, and it is not clean when uninstalling. Like dog skin paste, it is attached to the computer. The same is true for online shopping. You can make one-click purchase, but also one-click return. This year, the customer is God. If you are shopping for grandfather, the return is Buddha, and the return is Buddha.If we make Mr. Buddha uncomfortable, he will let us pay for poor sales.At that time, don't think about how to ship to customers, you can only be sad, haha!A sad, little white head.On the contrary, we should make the return process to the extreme, don't worry about customer returns, quality issues, the return can not be retained. You keep a single order and lose a customer. The communication effect of customers will make you lose the whole market, buy better and return, and sales will double. Return services can test e-commerce's service attitude to consumers.There is no shortcut to retaining returnees. Be sure to service to the last stop.Do a good job of home return service!

5. Appendix

Due to the length of the article, I will explain the status of the pickup push interface separately in the next article. After the order is successfully placed on the door, the courier receives the order and will feedback the status of the order. The courier bird will push the status to the server of the e-commerce platform in real time.

Posted by outsidaz on Tue, 17 Mar 2020 10:46:28 -0700