๐ŸŽŸ๏ธPresales

Presale Feature Guide

Overview

The LiquidCommerce SDK provides comprehensive support for presale products, allowing merchants to offer products for purchase before general availability. This guide covers how to integrate presale functionality into your application.

What are Presales?

Presales enable customers to reserve and purchase products before they become widely available. Key features include:

  • Advanced Purchase: Customers can buy products before stock arrival

  • Limited Quantities: Presale products often have purchase limits

  • Scheduled Availability: Products have defined presale windows

  • Exclusive Access: First-come, first-served inventory reservation

Working with Presale Products

Identifying Presale Products

Use the catalog search to find presale products:

const presaleProducts = await liquidCommerce.catalog.search({
  filters: [{
    key: ENUM_FILTER_KEYS.PRESALE,
    values: ENUM_BINARY_FILTER.YES
  }],
  loc: {
    address: {
      one: '123 Main St',
      city: 'New York',
      state: 'NY',
      zip: '10001'
    }
  }
});

// Extract presale information from products
presaleProducts.products.forEach(product => {
  product.sizes.forEach(size => {
    const presale = size.attributes?.presale;
    if (presale?.isActive) {
      console.log({
        product: product.name,
        availableFrom: presale.canPurchaseOn,
        estimatedShipping: presale.estimatedShipBy,
        status: 'Active Presale'
      });
    }
  });
});

Cart Response Structure

When working with presale items, the cart response includes additional fields:

Adding Presale Items to Cart

Basic Implementation

Handling Presale Events

The SDK provides specific event types for presale scenarios:

Example event handling:

Checkout Process

Preparing Checkout

Complete the checkout process promptly when isPresaleLocked is true:

Time-Sensitive Checkout

Monitor the reservation time when dealing with presales:

Best Practices

1. Clear User Communication

2. Cart Separation

3. Error Recovery

Common Integration Patterns

Pattern 1: Presale Product Page

Pattern 2: Presale Collection Page

Limitations and Considerations

System Limitations

  • Cart Exclusivity: Presale items require dedicated carts

  • Time Constraints: Reservations have expiration times

  • Quantity Restrictions: Limited inventory per customer

  • Geographic Availability: Some presales may be region-specific

User Experience Considerations

  1. Transparency: Always show presale status and estimated shipping

  2. Urgency: Display reservation timers when applicable

  3. Clarity: Explain why presale items need separate orders

  4. Feedback: Provide clear error messages for presale-specific issues

Summary

The presale feature in LiquidCommerce SDK enables:

  • Early access to limited products

  • Automated inventory management

  • Time-based reservations

  • Clear event-driven feedback

Successful presale integration requires careful attention to:

  • Event handling for various presale states

  • Time-sensitive checkout flows

  • Clear user communication

  • Proper cart segregation

By following this guide and the provided examples, you can create a smooth presale experience that maximizes conversion while maintaining inventory integrity.

Last updated