Skip to navigation

1-Click Actions in Emails

Redirect customers to a location of your choice using 1-Click URLs in emails to delay or cancel future shipments

View as Markdown

Ordergroove supports 1-Click URLs in emails to redirect customers to a location of your choice. This is usually used to delay or cancel future shipments.

For general information about 1-Click and the actions available, take a look at 1-Click Actions Overview in the Knowledge Center. In this guide we’ll go through how to set it up.


1. Email Setup

Reach out to Ordergroove — we will add a token value as a dynamic field in the email trigger content.

An order reminder email headed We're preparing your Order!, saying the Autoship order is almost ready to ship, with two buttons: Manage Order, for shipping sooner or rescheduling, and Skip This Delivery, for skipping this shipment and keeping the regular frequency.

2. Confirmation Experience

Once the customer has reached the landing page and completed the one-click flow confirmation that you have built, follow the steps below to trigger the confirmation to Ordergroove.

  1. Take the token query parameter value from the URL.

  2. Decode this value using JavaScript built-in functions:

JSON.parse(atob(decodeURIComponent(encoded_token_value)))

Decoding from Step 2 will give you a value such as:

{
"experience": "skip_order",
"auth": {
"public_id": "ca80b8701d2711eba195bc764e10b970",
"sig": "Bp165d886LT2CKW9Hppv5LPja4k8dTtG8STDtub/jgs=",
"ts": 1585925651,
"trust_level": "recognized",
"sig_field": "26115443"
},
"resource_id": "c1e7a5766f9811eabe8abc764e10028e"
}
  1. Take the value of resource_id and call the Ordergroove endpoint:

    • Staging: https://staging.restapi.ordergroove.com/orders/<resource_id>/cancel/
    • Production: https://restapi.ordergroove.com/orders/<resource_id>/cancel/

    With the following headers:

    • Authorization: JSON.stringify(<auth>)
    • Content-Type: application/json
  2. The value of <auth> is taken directly from the parsed token value:

{
"public_id": "ca80b8701d2711eba195bc764e10b970",
"sig": "Bp165d886LT2CKW9Hppv5LPja4k8dTtG8STDtub/jgs=",
"ts": 1585925651,
"trust_level": "recognized",
"sig_field": "26115443"
}
A merchant's landing page titled Skip my Next Autoship Delivery, showing that the next Autoship order ships on June 15th with one item that repeats every month, Yes, skip this delivery buttons above and below the order, and Nevermind and Make other changes links.

You’ve now implemented a Skip Order feature into your order reminder emails.