> ## 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.

# Collection Viewed

The Collection Viewed Webhook is triggered when a customer views a specific collection page in your store. This data helps in understanding customer interests and can be used for personalized marketing and retargeting based on the collections they browse.

### 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 `COLLECTION_VIEWED`.
</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.
    </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.

      <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="collection_viewed" type="object">
      Details of the collection viewed.

      <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>
  </Expandable>
</ResponseField>

<RequestExample>
  ```json Response theme={null}
  {
    "event_time": "2026-05-07T10:00:00Z",
    "event_type": "COLLECTION_VIEWED",
    "event_id": "evt_987123654",
    "store": {
      "id": "store_01",
      "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"
      },
      "collection_viewed": {
        "collection_id": 112233,
        "name": "Summer Collection",
        "handle": "summer-collection",
        "image": "https://cdn.shopify.com/collections/summer.jpg",
        "timestamp": "2026-05-07T10:00:00Z"
      }
    }
  }
  ```
</RequestExample>
