Skip to main content

Overview

Corso supports headless stores that use the Shopify Storefront API for cart and checkout management. Site developers can implement the Corso widget on a site by placing a single <script /> tag, and then a one-line <div /> tag wherever they want the widget to appear. The widget will fully manage customer opt-in or opt-out preferences, it will retrieve the protection pricing from the Corso API, and it will add the appropriate Corso protection product variant to the cart.

App Installation

This guide assumes that you have installed the Corso Green Shipping Protection App from the Shopify app store. If you have not completed this step, you can install the app here: https://apps.shopify.com/green-shipping-protection. You must also have accepted the required app subscription, which can be done from inside the app in your Shopify Admin.

Implementation Steps

Once the installation is complete, the basic steps to implement Green Shipping Protection on your site are:

  1. Add a script tag to the <head> of any page that needs the widget on it
  2. Insert a hidden placeholder div at any point where you want the widget to appear

The placement process can typically be completed in just a few minutes. We are always available to work through the process together during an implementation call, but the steps can generally be completed in a self-guided manner after exchanging a few points of information.

The Corso Customer Success Team leads the implementation effort, and can bring in members of the product development team as needed to assist.

Functionality

At a high level, the widget that you will be incorporating into your site works by performing the following steps:

  1. Query the Corso API to retrieve details about how the widget should be displayed. The response includes various settings and styles which can be set from within the Green Shipping Protection app in the Shopify admin.
  2. Attempt to place the widget on the page.
  3. Based on the contents of the cart, request a protection price from the Corso API.
  4. Display the price on the widget
  5. If the checkbox on the widget is checked (indicating that the customer elects to protect their order with green shipping protection), the appropriate product variant will be added to the cart.
  6. Checking or un-checking the checkbox on the widget will add or remove the product from the cart.