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.


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:

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

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

1{
2 "experience": "skip_order",
3 "auth": {
4 "public_id": "ca80b8701d2711eba195bc764e10b970",
5 "sig": "Bp165d886LT2CKW9Hppv5LPja4k8dTtG8STDtub/jgs=",
6 "ts": 1585925651,
7 "trust_level": "recognized",
8 "sig_field": "26115443"
9 },
10 "resource_id": "c1e7a5766f9811eabe8abc764e10028e"
11}
  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:

1{
2 "public_id": "ca80b8701d2711eba195bc764e10b970",
3 "sig": "Bp165d886LT2CKW9Hppv5LPja4k8dTtG8STDtub/jgs=",
4 "ts": 1585925651,
5 "trust_level": "recognized",
6 "sig_field": "26115443"
7}

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