Skip to content

CustomerLoyalty

Type: schema

TypeScript Definition

typescript
CustomerLoyalty: {{
            /** @description The unique membership number assigned to the customer. */
            membership_number?: string;
            /**
             * Format: date-time
             * @description The date and time when the customer first enrolled in the loyalty program.
             */
            date_of_join?: string;
            /**
             * Format: date-time
             * @description The date and time when the customer's current loyalty program instance was assigned. This may change when loyalty program is reassigned.
             */
            date_of_assign?: string;
            /**
             * Format: date-time
             * @description The date and time when the customer's loyalty program instance will be reset. Null if loyalty program renewal type is 'never'.
             */
            date_of_reset?: string | null;
            /** @description The current tier of the customer's loyalty membership. This may change when tiers are upgraded, downgraded, or reassigned. */
            current_tier?: string;
            points_earned?: number;
            points_redeemed?: number;
            points_balance?: number;
            /** @description The total number of completed orders counted in the current loyalty program. */
            total_orders?: number;
            lifetime_orders?: number;
            /** @description The total amount a customer has spent within the current loyalty program, excluding taxes, promotional discounts, and redeemed loyalty points. This value is used to determine tier eligibility and earning points calculation. */
            total_spent?: number;
            lifetime_spent?: number;
            lifetime_savings?: number;
        };
        /**
         * CustomerReadyForReview
         * @description List of products and orders for which customer can write review.
         */
}

OpenAPI Schema

json
{
  "title": "CustomerLoyalty",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/CustomerLoyalty",
    "description": "API reference for the CustomerLoyalty schema"
  },
  "properties": {
    "membership_number": {
      "description": "The unique membership number assigned to the customer.",
      "type": "string"
    },
    "date_of_join": {
      "description": "The date and time when the customer first enrolled in the loyalty program.",
      "type": "string",
      "format": "date-time"
    },
    "date_of_assign": {
      "description": "The date and time when the customer's current loyalty program instance was assigned. This may change when loyalty program is reassigned.",
      "type": "string",
      "format": "date-time"
    },
    "date_of_reset": {
      "description": "The date and time when the customer's loyalty program instance will be reset. Null if loyalty program renewal type is 'never'.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "current_tier": {
      "description": "The current tier of the customer's loyalty membership. This may change when tiers are upgraded, downgraded, or reassigned.",
      "type": "string"
    },
    "points_earned": {
      "type": "integer"
    },
    "points_redeemed": {
      "type": "integer"
    },
    "points_balance": {
      "type": "integer"
    },
    "total_orders": {
      "description": "The total number of completed orders counted in the current loyalty program.",
      "type": "integer"
    },
    "lifetime_orders": {
      "type": "integer"
    },
    "total_spent": {
      "description": "The total amount a customer has spent within the current loyalty program, excluding taxes, promotional discounts, and redeemed loyalty points. This value is used to determine tier eligibility and earning points calculation.",
      "type": "number"
    },
    "lifetime_spent": {
      "type": "number"
    },
    "lifetime_savings": {
      "type": "number"
    }
  }
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: