Collapse Menu
Documentation
FastSpring App
Contact Support

mailingListEntry Webhooks

Overview

This article provides details about the mailingListEntry.updated webhook event.

Table of Contents

Cart Abandonment Tracking

You can collect email addresses of consumers who have entered their emails but abandoned their cart prior to checkout. FastSpring communicates this data with a mailingListEntry.updated webhook. This webhook is sent when additions or changes to the “abandoned,' 'subscribed' or 'unsubscribed' lists occur. 

Webhook Details: 

  1. After a consumer adds an item to their cart, a 30-minute timer starts. If the consumer does not complete the order within 30 minutes, FastSpring considers the cart abandoned. 
  2. Within 15 minutes of the end of that timer, an optional mailingListEntry.updated webhook event fires (if you have subscribed to this event). The data includes the consumer's email address and shows the list and the reason as abandoned.

The webhook data includes details about the abandoned product. If the consumer selects multiple products before they abandon the cart, the webhook data includes separate details for each product in the cart. Data includes:

  • product - The product path or ID
  • quantity - the quantity of the product that the consumer had selected
  • display - the product’s consumer-facing display name
  • summary - the product’s summary description
  • imageURL - a URL pointing to the products icon image file hosted by FastSpring

This data may be useful in creating customized remarketing messages to send to consumers who have abandoned the cart. For example, a customized remarketing message could include details about the product and the product's icon image, to remind the consumer what they had selected. 

Consumer Mailing List Opt-In

FastSpring Storefronts include an optional checkbox that your customers can use to opt in or out of future emails. If you subscribe to webhook events under Integrations > Webhooks, FastSpring keeps you apprised of the current mailing list status for each email address. FastSpring communicates this with a mailingListEntry.removed webhook. This webhook is sent when a previously-subscribed consumer has cleared the opt-in checkbox and completed an order. 

Webhook Details:

  1. After a consumer completes a purchase with an unrecognized email address, the mailingListEntry.updated webhook event fires within 15 minutes of the completed purchase.
  2. The list and the reason in the webhook data are either marked as subscribed or unsubscribed, depending on whether or not the consumer selected the opt-in checkbox.
  3. If a consumer who has previously opted in does again with the same email address, no mailingListEntry webhook event fires.

If a consumer whose email was previously subscribed opts out, 2 separate webhook events will fire within 15 minutes (in addition to the order.completed and related events):

  • mailingListEntry.removed - will show the list as subscribed, since the consumer's email address is being removed from the subscribed list.
  • mailingListEntry.updated - will show the list and the reason as unsubscribed.

 

Remarketing Messaging

For third-party remarketing services, see Extensions. These services assist you in receiving webhook data, parsing the information, and sending remarketing messages to consumers with abandoned carts. 

In the call to action of your remarketing message, you can include a link from which consumers can access the Storefront with the product preselected for them. For Web Storefronts, create a link to the product page by appending the product path (from the product field in the webhook data) to the Storefront’s homepage URL, separated by a forward slash. 

Example:

URL and Webhook product information for Example Product 1:

  • Homepage URL - https://yourexamplestore.test.onfastspring.com
  • Product in Webhook Data - example-product-1
  • Link to Example Product 1:
    https://yourexamplestore.test.onfastspring.com/example-product-1

mailingListEntry Webhooks

There are 3 mailingListEntry Webhooks:

  • mailingListEntry.updated - fires when a new email is added to the mailing list.
  • mailingListEntry.removed - fires when you need to remove an entry from a mailing list, such as when a consumer unsubscribes.
  • mailingListEntry.abandoned - fires 30 minutes after the most recent activity when a consumer enters their email address, but does not complete their purchase.

These Webhooks are unaffected by Webhook Expansion. Each post from FastSpring to your endpoint may contain multiple webhooks in its payload. 

Contents of Event Payloads

Name

Type

Description

id

string

ID of the event

list

string

list for which the email address entry has been updated: subscribed, unsubscribed, or abandoned

updated

integer

date of the update, in milliseconds

reason

string

reason the list was updated: failed, subscribed, unsubscribed, or abandoned

order

object

details of the transaction associated with the update, if any

order.reference

string

if the order was not completed at the time of the update, this would be null; otherwise, it is the customer-visible order reference for the transaction

order.id

string

internal ID of the order, if applicable

order.order

string

internal ID of the order, if applicable

order.referrer

string

Full url from the page where the abandoned checkout/cart event occurred

order.session

string

 

order.storefront

string

Name of the storefront in FastSpring

order.items

array

list of products that were in the cart at the moment the email address was entered; one object per product; this data can be useful in creating customized re-marketing email messages; see Products for more information

order.items.product

string

product path / product ID

order.items.path

string

Path of the main product if this item is a product variation

order.items.quantity

integer

quantity of the current product that was selected

order.items.display

string

customer-facing Display Name of the product

order.items.summary

string

descriptive text from the product's Summary field

order.items.imageURL

string

URL of the product's Icon image file, hosted by FastSpring

order.items.isVirtual

boolean

 

order.items.isSubscription

boolean

True if the product is a subscription

order.items.variation

 

Product variation path / product variation ID if this item is a product variation

order.items.description

string

Contents of the product's long Description

order.items.sku

string

optional internal SKU ID (e.g., your part number) for the current product

order.items.pricing

object

product price; may contain multiple "string":number pairings, one for each specified currency (e.g. "USD":14.95)

abandoned_cart_session

string

The abandoned cart/checkout session ID (expires after 24 hours by default)

abandoned_cart_session_url

string

Your store ID with abandoned cart/checkout session ID appended ie https://storename.onfastspring.com/session/abandoned_sessionID

abandoned_at

string

Date and time when the checkout/cart was abandoned

email

string

email address that was updated

firstName

string

first name associated with the customer's email address, if known

lastName

string

last name associated with the customer's email address, if known

country

string

two-character ISO code for the country detected via IP Address

currency

string

three-character ISO code for the currency of the abandoned cart

language

string

ISO 2-character language code for the language in which the checkout session was processed

storefront

string

Name of the storefront in FastSpring

referrer

string

Full url from the page where the abandoned checkout/cart event occurred

optIn

string

True if user has opted in to communications via the FastSpring checkout

mailingListEntry.updated

Example:

  • { 
      "id":"daf8f936dbf78731424aec6744068e07ef9ecd4d808dc9868c8d98c6ed4c63d0",
      "list":"subscribed",
      "updated":1462308750819,
      "reason":"subscribed",
      "order":{ 
        "reference":"YES200316-9780-92149",
        "id":"hJl86j9FQBaPhlXhSjlbBw",
        "order":"hJl86j9FQBaPhlXhSjlbBw",
        "items":[
          { 
            "product":"example-product-1",
            "quantity":1
            "display":"Example Product 1",
            "summary":"Lorem ipsum dolor sit amet, consectetuer adipiscing elit.",
         "imageUrl":"https://d8y8nchqlnmka.cloudfront.net/VTetZH1kQD8/-rl0Wko4SzQ/example-box.png"
          }
        ]
      },
      "email":"jdoe@gmail.com",
      "firstName":"John",
      "lastName":"Doe"
    }

mailingListEntry.removed

Example:

  • { 
      "id":"91143a785402b7867f965557e3eaf4e958cfac639c07c4d7b0726bfd6ed0bfbb",
      "list":"subscribed",
      "updated":1462371921845,
      "email":"jdoe@gmail.com",
      "firstName":null,
      "lastName":null
    }

mailingListEntry.abandoned

When a consumer enters their email address, but does not complete their purchase, the mailingListEntry.abandoned event fires 30 minutes after the most recent activity.

Example:

  • {
        "id": "11318408534c4eccacef0c585e9cf47739e56331ef3695ea4d0bbb3587788177",
        "list": "abandoned",
        "updated": 1619503632991,
        "reason": "abandoned",
        "order": {
            "reference": null,
            "id": null,
            "order": null,
            "referrer": "https://solisinc.test.onfastspring.com/",
            "session": "8YXf4EdPSfI:BknYgazoSSC-GjChXtHRMQ",
            "storefront": "solisinc",
            "items": [{
                "product": "dj-soft-pro",
                "path": "dj-soft-pro",
                "quantity": 1,
                "display": "Yosoy Pro Cloud",
                "summary": "Yosoy Pro Cloud subscription",
                "imageUrl": "https://d8y8nchqlnmka.cloudfront.net/8YXf4EdPSfI/fHonzeEtTVg/5af7b9528b57f731e597f866_66_Grooveshark.png",
                "isVirtual": false,
                "isSubscription": true,
                "price": 255.46,
                "variation": "dj-soft-pro",
                "description": "Music anytime anywhere",
                "sku": null,
                "pricing": {
                    "values": {
                        "USD": 255.46
                    }
                }
            }, {
                "product": "product-b",
                "path": "product-b",
                "quantity": 1,
                "display": "Product B",
                "summary": null,
                "imageUrl": null,
                "isVirtual": false,
                "isSubscription": false,
                "price": 41.19,
                "variation": "product-b",
                "description": "Product B",
                "sku": null,
                "pricing": {
                    "values": {
                        "USD": 45.0,
                        "EUR": 41.19,
                        "GBP": 33.65
                    }
                }
            }, {
                "product": "how-to-win-friends-ebook",
                "path": "how-to-win-friends-ebook",
                "quantity": 1,
                "display": "Summary of How to Win Friends and Influence Others",
                "summary": "fdfsdYXWin friends and influence others...",
                "imageUrl": "https://d8y8nchqlnmka.cloudfront.net/8YXf4EdPSfI/GG3I_ETRSWU/summary_of_winning_friends.jpg",
                "isVirtual": false,
                "isSubscription": false,
                "price": 6.99,
                "variation": "how-to-win-friends-ebook",
                "description": "You can go after the job you want—and get it!\n\nYou can take the job you have—and improve it!\n\nYou can take any situation—and make it work for you!\n\nDale Carnegie's rock-solid, time-tested advice has carried countless people up the ladder of success in their business and personal lives. One of the most groundbreaking and timeless bestsellers of all time, How to Win Friends & Influence People will teach you:\n\n-Six ways to make people like you\n\n-Twelve ways to win people to your way of thinking\n\n-Nine ways to change people without arousing resentment\n\nAnd much more! Achieve your maximum potential—a must-read for the twenty-first century with more than 15 million copies sold!",
                "sku": "SKU-0001",
                "pricing": {
                    "values": {
                        "EUR": 6.99,
                        "GBP": 3.56,
                        "USD": 5.99
                    }
                }
            }]
        },
        "abandoned_cart_session": "BknYgazoSSC-GjChXtHRMQ",
        "abandoned_cart_session_url": "https://solisinc.test.onfastspring.com/session/BknYgazoSSC-GjChXtHRMQ",
        "abandoned_at": "2021-04-27 06:07:12",
        "email": "joconner@fastspring.com",
        "firstName": "John",
        "lastName": "O",
        "country": "DE",
        "currency": "EUR",
        "language": "en",
        "storefront": "solisinc",
        "referrer": "https://solisinc.test.onfastspring.com/",
        "optIn": false
    }