Headless Docs
Latest (1.2.3)
Latest (1.2.3)
  • Overview
  • Change Log
  • General Steps
    • Update Prices on Page
    • Update ATC Events
      • Shopify Functions
      • Shopify Plus + Scripts
    • Preview Your Site
    • Lite Mode
  • Next.js Steps
    • Requirements
    • Add Intelligems Provider
    • Track Page Views
    • Update Prices on Page
    • Update ATC Events
    • Preview Your Site
  • Next.js - App Directory Configuraiton
    • Requirements
    • Add Intelligems Provider
    • Track Page Views
    • Update Prices on Page
    • Update ATC Events
    • Preview Your Site
  • Gatsby Steps
    • Requirements
    • Add Intelligems Provider
    • Track Page Views
    • Update Prices on Page
    • Update ATC Events
    • Preview Your Site
  • Pack Digital Steps
    • Requirements
    • Add Intelligems Provider
    • Track Page Views
    • Update Prices on Page
    • Update ATC Events
    • Preview Your Site
  • Shopify Hydrogen / Remix
    • Requirements
    • Update loader()
    • Add Intelligems Provider
    • Track Page Views
    • Update Prices on Page
    • Update ATC Events
    • Preview Your Site
  • Examples
    • Custom Events
    • Content Testing
    • Gift With Purchases
  • Reference
    • Providers
      • Provider Props
    • Components
      • Price Components
    • Hooks
      • Price Hooks
      • Offer Hooks
      • Track Hooks
      • Experience Hooks
      • Variation Hooks
      • Cart & Checkout Hooks
Powered by GitBook
On this page
  • Types
  • useIgOffer()
  • useIgOfferTier()
  • useIgOffers()
  1. Reference
  2. Hooks

Offer Hooks

Types

type IntelligemsOfferTier = {
  id: string;
  minimumUnits: number;
  maximumUnits: number;
  unitDiscount: number;
  discountTitle: string;
  giftWithPurchaseTitle: string;
  isFreeShipping: boolean;
  isGiftWithPurchase: boolean;
  giftWithPurchaseProductId: string;
  giftWithPurchaseVariantId: string;
  autoAddGiftWithPurchase: boolean;
  giftWithPurchaseHandle: string;
};


type DiscountApplicationType = 
  "tieredDiscount" | 
  "cartDiscount" |
  "freeGift" |
  "freeShipping"

type DiscountApplicationMethodType = "perItem" | "perOrder"
  
type IntelligemsOffer = {
  id: string;
  variationId: string;
  enabled: boolean;
  isTest: boolean;
  isArchived: boolean;
  name: string;
  unitType: string;
  discountType: string'
  tiers: IntelligemsOfferTier[];
  maximumDollarDiscount: number;
  discountApp: DiscountAppDtoSchema.nullable();
  discountApplicationType: DiscountApplicationType;
  discountApplicationMethod: DiscountApplicationMethodType;
  combinesWithIntelligems: boolean;
  combinesWithShopify: boolean;
  shouldRejectCodes: boolean;
}

useIgOffer()

const useIgOffer = (experienceId: string) => {
isReady: boolean;
offer: IntelligemsOffer
}

useIgOfferTier()

const useIgOfferTier = (experienceId: string, units: number) => {
isReady: boolean;
tier: IntelligemsOfferTier
}

useIgOffers()

const useIgOffers = (experienceId: string) => {
isReady: booolean;
offers: IntelligemsOffer[]
}
PreviousPrice HooksNextTrack Hooks

Last updated 7 months ago