4 Ways to Improve the Post-Purchase Experience

This is a guest post from Richard Moot, Developer Evangelist at Shippo, a multi-carrier shipping application and dashboard. We partner with Shippo to verify addresses, provide rates, and print labels from USPS, UPS, FedEx, DHL, and all other major shipping careers. Visit Shippo’s blog to learn more about how we integrated their API into our platform.

Some of the most successful ecommerce stores have a strong focus on ensuring that not only does the purchase experience run as smoothly as possible, but the post-purchase process is pleasant and easy. We will go over the four ways that you can improve your post-purchase experience using Shippo. Shippo ensures that you have correct shipping addresses, provides rates to your customers, tracks packages, and provides a smooth returns process.

All code examples have been created using Shippo’s NodeJS client wrapper. Shippo also offers client wrappers in Ruby, JavaScript, C#, Java, PHP, and Python.

Address Validation

Part of the purchase process requires gathering address information from your customer. To help provide a smooth purchase experience, it's necessary to consider implementing address validation. Validating addresses help prevent surcharges for address corrections, failed deliveries, and returned packages. If you allow something to get all the way to the stage of failed delivery, you’re going to end up with an upset customer, potentially losing product.

As a developer, this is an easy problem to solve. When the customer is entering their address to get shipping rates or to possibly complete their order, you can grab that address and validate it immediately. This allows the customer to correct it, or provide an alternate suggestion that would be more amenable to the shipping carrier.

In order to validate an address, we simply need to send the address information to Shippo’s API. Then we’ll get back either a correct valid address (it may be a corrected version of what we provided), or it will indicate that the address provided is not valid. Below, we provide an address with a typo that will change street1 from “Claytona” to “Clayton.”

const shippo = require('shippo')('YOUR_SHIPPO_API_KEY');

let addressObject = {  
  name: "Shawn Ippotle",
  company: "Shippo",
  street1: "218 Claytona St.",
  city: "San Francisco",
  state: "CA",
  zip: "94117",
  country: "US",
  phone: "+1 555 341 9393",
  email: "shippotle@goshippo.com",
  validate: true
};

shippo.address  
  .create(addressObject)
  .then((response)=>{
    // Do actions with the validated address
    console.log(JSON.stringify(response, null, 2));
});

Had we tried to use the original address when shipping the package, there is a possibility that the shipping carrier would fail to deliver it to the correct address, or even charge a fee for correcting the address for you. With Shippo, address validation doesn’t cost anything, so you can already start saving money with this simple step, implemented at the stage where a customer is entering their shipping address.

Real-time Rates

We recently featured a great presentation at the Shippo Summit called The Evolution of Ecommerce Expectations. Part of that talk detailed the importance of displaying shipping rates and delivery times up front to increase conversion. When customers see the total cost of their cart up front and know when they can expect to receive their order, they’re far more likely to complete their purchase.

Real-time rates let your customers know up front just how much it will cost to ship their order, as well as how long they can expect it would take to arrive. Normally, this would require a painful SOAP-based integration with one or more shipping carriers in order to pull these rates in real-time. Thankfully, there are plenty of tools out there that can simplify this process in a developer-friendly way across multiple carriers.

Getting back rates for a shipment requires a bit more information than an address validation request, but this is only because we need to know where the package is shipping from, as well as its dimensions and weight.

const shippo = require('shippo')('YOUR_SHIPPO_API_KEY');

let addressTo = {  
  name: "Shawn Ippotle",
  company: "Shippo",
  street1: "218 Claytona St.",
  city: "San Francisco",
  state: "CA",
  zip: "94117",
  country: "US",
  phone: "+1 555 341 9393",
  email: "shippotle@goshippo.com"
}

let addressFrom = {  
  name: "Mrs Hippo",
  street1: "1092 Indian Summer Ct",
  city: "San Jose",
  state: "CA",
  zip: "95122",
  country: "US",
  phone: "4159876543",
  email: "mrshippo@goshippo.com"
}

let parcels = [  
  {
    length: "5",
    width: "5",
    height: "5",
    distance_unit: "in",
    weight: "2",
    mass_unit: "lb"
  }
]

let shipmentObject = {  
  address_from: addressFrom,
  address_to: addressTo,
  parcels: parcels,
  async: false
};

shippo.shipment  
  .create(shipmentObject)
  .then((response)=>{
    // You now have an array of all your rates available for that shipment.
    let rates = response.rates;
    // You can send those to the front-end to display, filter them, or even
    // adjust a small inflation on that rate before returning it to the user
    // to account for handling fees or other costs you might incure from
    // shipping
    console.log(JSON.stringify(rates, null, 2));
});

Shippo returns what we call a Shipment object, containing all the relevant information for shipping that package. In our example, we’ve isolated out the rates there so that we can send those back to the frontend (or wherever you would need to send them to in your own application).

Real-time Tracking

So far, everything discussed has been leading up to purchasing, but real-time tracking truly occurs post-purchase. This is an opportunity to create transparency in a purchase, allowing customers to feel engaged while also building trust with a retailer. One of the top reasons why online retailers receive negative reviews around customer experience is shipping delays or failures. Real-time tracking helps mitigate this problem and refocus any issues with delivery back to the carrier. It also allows your team to hold accountability toward the carriers when there is a failure to meet a service agreement.

Shippo provides a webhook for sending these real-time updates of your shipments, so that you can be aware of every package’s status and location. Not only does this help your support team, but it also allows you to forward on these status updates to your customers.

Prior to implementing the below for real-time tracking, you’ll want to head over to https://app.goshippo.com/api (Shippo account login required) and add in your webhook URL. If you don’t do this first, your tracking numbers won’t get registered to your webhook, and you’ll have to resend them.

const shippo = require('shippo')('YOUR_SHIPPO_API_KEY');

var webhookData = {  
  carrier: "usps",
  tracking_number: "1122334455667788",
  metadata: "test order"
}

shippo.track  
  .create(webhookData)
  .then((response)=>{
    // You'll be returned back the initial status of your shipment
    console.log(JSON.stringify(response,null ,2));
});

Using the above, we can send tracking numbers, along with their respective carrier name, to track any shipment that is a supported shipping carrier. So even if you didn’t generate your shipping label in Shippo, you can still utilize Shippo’s webhooks for tracking deliveries. This will allow you to send email or SMS notifications to customers, so that they stay informed about where their package is and when they should be receiving it.

Returns

Over half of online holiday shoppers take advantage of an easy Returns Policy, should it be available. Offering return shipping is a great way to allow customers to feel more comfortable with making a purchase. With Shippo, it's easy to create scan-based labels that aren’t charged unless they are utilized. You can provide them inside of the order, so that whenever a customer wants to send their order back, they can just re-pack the box and slap the label on to send your way.

Creating a return label is just a matter of flagging a shipment as a return shipment. You can even specify a return_address in the event that you have all of your returns processed at a specific place, one that may be different from where your orders are fulfilled.

Our example for returns might look a lot like our Real-time Rates examples, and that’s because all you need is to add another key called “extra” and set a sub-key of “is_return: true.” This effectively flags the shipment as a return shipment.

const shippo = require('shippo')('YOUR_SHIPPO_API_KEY');

let addressTo = {  
  name: "Shawn Ippotle",
  company: "Shippo",
  street1: "218 Clayton St.",
  city: "San Francisco",
  state: "CA",
  zip: "94117",
  country: "US",
  phone: "+1 555 341 9393",
  email: "shippotle@goshippo.com"
}

let addressFrom = {  
  name: "Shippo Returns Dept",
  company: "Shippo Returns",
  street1: "965 Mission Street",
  street2: "Suite 480",
  city: "San Francisco",
  state: "CA",
  zip: "94103",
  country: "US",
  phone: "+1 555 341 9393",
  email: "returns@goshippo.com"
}

let parcels = [  
  {
    length: "5",
    width: "5",
    height: "5",
    distance_unit: "in",
    weight: "2",
    mass_unit: "lb"
  }
]

let shipmentObject = {  
  address_from: addressFrom,
  address_to: addressTo,
  parcels: parcels,
  extra: {
    is_return: true
  },
  async: false
};

shippo.shipment  
  .create(shipmentObject)
  .then((response)=>{
    console.log(JSON.stringify(response, null, 2));
}, (err)=>{
  console.error(err);
})

The key difference between a return shipment and a regular shipment is the label. The created label will be what is called a “scan-based” label. A scan-based label will not charge your shipping carrier account until that label is scanned by the carrier. So you can create a return label, include it with the package, and you won’t be charged the shipping cost until it is used.

With these four strategies, you can easily improve the post-purchase experience on your ecommerce site. Each endpoint works independently of one another, so there is no need to implement everything, just what works for you. Sign up for Shippo and you'll get access to all of the previously mentioned functionality, in addition to discounted shipping rates via USPS and DHL right out of the box.

comments powered by Disqus