> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexype.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Abandoned Session Recovery

The **Abandoned Session Recovery (ASR)** Webhook is triggered when a visitor browses your store and shows engagement but does not initiate a checkout session. It helps capture early-stage browsing intent by tracking browsing behavior, page visits, and any contact information provided during the session.

An **ASR event is sent after 15 minutes of user inactivity**, calculated from the visitor’s last recorded activity, provided that no checkout session has been created during that time.

Businesses can use this event to identify high-intent visitors early in their journey and engage them with personalized messaging, retargeting campaigns, or incentives before they leave. By leveraging this data, brands can reduce early-stage drop-offs and convert browsers into buyers.

### Headers

<ParamField body="X-Flexype-Authorization" type="string">
  A secret key used to verify that the webhook request originated from FlexyPe. Ensure this token is validated to prevent unauthorized access.
</ParamField>

<ParamField body="X-Webhook-Version" type="string">
  The version of the webhook payload. Here, the value will be `2026-05`.
</ParamField>

<ParamField body="X-Event-Id" type="string">
  The unique identifier for the event that triggered this webhook.
</ParamField>

### Body

<ResponseField name="event_time" type="string">
  The ISO 8601 timestamp when the event occurred.
</ResponseField>

<ResponseField name="event_type" type="string">
  The type of event. For this webhook, it is `ABANDONED_SESSION`.
</ResponseField>

<ResponseField name="event_id" type="string">
  A unique identifier for the event.
</ResponseField>

<ResponseField name="store" type="object">
  Information about the store where the event occurred.

  <Expandable title="Store Properties">
    <ResponseField name="id" type="string">
      Unique identifier for the store.
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the store.
    </ResponseField>

    <ResponseField name="shopify_domain" type="string">
      The Shopify domain of the store (e.g., `store.myshopify.com`).
    </ResponseField>

    <ResponseField name="main_domain" type="string">
      The primary domain of the store.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="payload" type="object">
  The event-specific data.

  <Expandable title="Payload Properties">
    <ResponseField name="user" type="object">
      Customer information captured during the session.

      <Expandable title="User Properties">
        <ResponseField name="email" type="string">
          The customer's email address.
        </ResponseField>

        <ResponseField name="full_name" type="string">
          The customer's full name.
        </ResponseField>

        <ResponseField name="first_name" type="string">
          The customer's first name.
        </ResponseField>

        <ResponseField name="last_name" type="string">
          The customer's last name.
        </ResponseField>

        <ResponseField name="dial_code" type="string">
          The country dial code.
        </ResponseField>

        <ResponseField name="phone" type="string">
          The customer's phone number.
        </ResponseField>

        <ResponseField name="phone_with_dial_code" type="string">
          The phone number including the dial code.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="cart" type="array">
      List of items currently in the cart.

      <Expandable title="Cart Item Properties">
        <ResponseField name="product_id" type="number">
          Shopify product ID.
        </ResponseField>

        <ResponseField name="variant_id" type="number">
          Shopify variant ID.
        </ResponseField>

        <ResponseField name="quantity" type="number">
          Quantity of the item.
        </ResponseField>

        <ResponseField name="price" type="number">
          Price of the item.
        </ResponseField>

        <ResponseField name="title" type="string">
          Title of the product.
        </ResponseField>

        <ResponseField name="handle" type="string">
          Shopify product handle.
        </ResponseField>

        <ResponseField name="image" type="string">
          URL of the product image.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="client_meta" type="object">
      Client technical metadata.

      <Expandable title="Client Meta Properties">
        <ResponseField name="client_ip" type="string">
          IP address of the client.
        </ResponseField>

        <ResponseField name="http_referer" type="string">
          HTTP referer URL.
        </ResponseField>

        <ResponseField name="user_agent" type="string">
          Browser user agent.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="metadata" type="object">
      Marketing and tracking metadata.

      <Expandable title="Metadata Properties">
        <ResponseField name="orig_referer" type="string">
          Original referer URL.
        </ResponseField>

        <ResponseField name="referer_host" type="string">
          Host of the referer.
        </ResponseField>

        <ResponseField name="landing_page" type="string">
          Initial landing page URL.
        </ResponseField>

        <ResponseField name="utm" type="array">
          List of UTM parameters.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="page_viewed" type="array">
      List of pages viewed during the session.

      <Expandable title="Page View Properties">
        <ResponseField name="url" type="string">
          The URL of the page visited.
        </ResponseField>

        <ResponseField name="timestamp" type="string">
          The ISO 8601 timestamp of the visit.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="products_viewed" type="array">
      List of products viewed during the session.

      <Expandable title="Product View Properties">
        <ResponseField name="product_id" type="number">
          Shopify product ID.
        </ResponseField>

        <ResponseField name="variant_id" type="number">
          Shopify variant ID.
        </ResponseField>

        <ResponseField name="title" type="string">
          Title of the product.
        </ResponseField>

        <ResponseField name="handle" type="string">
          Shopify product handle.
        </ResponseField>

        <ResponseField name="image" type="string">
          URL of the product image.
        </ResponseField>

        <ResponseField name="timestamp" type="string">
          The ISO 8601 timestamp of the view.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="collection_viewed" type="array">
      List of collections viewed during the session.

      <Expandable title="Collection View Properties">
        <ResponseField name="collection_id" type="number">
          Shopify collection ID.
        </ResponseField>

        <ResponseField name="name" type="string">
          Name of the collection.
        </ResponseField>

        <ResponseField name="handle" type="string">
          Shopify collection handle.
        </ResponseField>

        <ResponseField name="image" type="string">
          URL of the collection image.
        </ResponseField>

        <ResponseField name="timestamp" type="string">
          The ISO 8601 timestamp of the view.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="last_page_visited" type="object">
      The last page visited during the session.

      <Expandable title="Last Page Visited">
        <ResponseField name="url" type="string">
          URL of the last visited page.
        </ResponseField>

        <ResponseField name="timestamp" type="string">
          The ISO 8601 timestamp of the last visited page.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```json Response theme={null}
  {
    "event_time": "2026-05-07T10:00:00Z",
    "event_type": "ABANDONED_SESSION",
    "event_id": "evt_456789123",
    "store": {
      "id": "7607482d-ccf2-47a4-9a39-6a651357a1d5",
      "name": "My Awesome Store",
      "shopify_domain": "my-store.myshopify.com",
      "main_domain": "my-store.com"
    },
    "payload": {
      "user": {
        "email": "jane.doe@example.com",
        "full_name": "Jane Doe",
        "first_name": "Jane",
        "last_name": "Doe",
        "dial_code": "91",
        "phone": "9876543210",
        "phone_with_dial_code": "+919876543210"
      },
      "cart": [
          {
              "product_id": 9945414435106,
              "variant_id": 50597437931810,
              "quantity": 1,
              "price": 189,
              "title": "Cool T-Shirt",
              "handle": "cool-t-shirt",
              "image": "https://cdn.shopify.com/products/item.jpg",
          }
      ],
      "client_meta": {
        "client_ip": "1.1.1.1",
        "http_referer": "https://google.com",
        "user_agent": "Mozilla/5.0..."
      },
      "metadata": null,
      "page_viewed": [
        {
          "url": "https://my-store.com/products/cool-t-shirt",
          "timestamp": "2026-05-07T09:55:00Z"
        }
      ],
      "products_viewed": [
        {
          "product_id": 9945414435106,
          "variant_id": 50597437931810,
          "title": "Cool T-Shirt",
          "handle": "cool-t-shirt",
          "image": "https://cdn.shopify.com/products/item.jpg",
          "timestamp": "2026-05-07T09:55:00Z"
        }
      ],
      "collection_viewed": [],
      "last_page_visited": {
        "url": "https://my-store.com/products/cool-t-shirt",
        "timestamp": "2026-05-07T09:55:00Z"
      }
    }
  }
  ```
</RequestExample>
