DOM Package

DOM Package Overview

What the Tiquo DOM Package provides

The Tiquo DOM Package (@tiquo/dom-package) is a headless JavaScript SDK for browser-based Tiquo integrations. It provides customer authentication, first-party website analytics, customer data helpers, custom service catalogs, customer-flow and membership embeds, locked service-booking embeds, session management, and WebView token handoff.

Headless means that the SDK supplies authentication, data, and integration methods rather than finished page components. Your application owns forms, cards, navigation, loading states, errors, and profile pages. Tiquo supplies its own transactional interface only inside hosted customer-flow, service-booking, and membership iframes.

Use the DOM Package when you control the JavaScript build for your website or app and want a typed SDK that works directly with the Customer API.

New integrations should import Tiquo as the main SDK class. Specialist exports such as TiquoAnalytics and TiquoPhone are available for analytics-only setups and phone number utilities, while TiquoAuth remains as a backwards-compatible alias for older authentication integrations.

What it provides

AreaDescription
SetupInstall the package, get a public key, and initialize the SDK
Customer AuthenticationSign customers in with an email OTP flow
Website AnalyticsTrack first-party pageviews, custom events, and known-customer activity
Customer DataFetch and update the customer profile, preferences, and company memberships
EnquiriesCreate enquiries from your own forms and list a signed-in customer's enquiries
Orders and BookingsList orders and bookings, cancel or reschedule bookings, and fetch receipts and booking tickets
Pass BalancesShow how many Access Passes and Guest Passes the signed-in customer has left
Marketing SignupCollect newsletter and SMS opt-ins without login from a custom form
Business PoliciesRetrieve and display saved business policies using stable policy IDs
Service Catalogs and Locked BookingLoad a customer flow's services, build custom catalog and detail pages, and embed booking for one selected service
Embeds and MembershipsEmbed customer flows and public membership signup, pass signed-in sessions securely, and understand membership listing behavior
Session ManagementHandle auth state changes, logout, token refresh, multi-tab sync, and cleanup
Framework IntegrationConnect the headless SDK to React or another reactive UI framework
Utilities and ErrorsNormalize international phone numbers and handle typed SDK errors
WebView IntegrationPass native app tokens into a WebView-hosted page
Dashboard ConfigurationConfigure public keys, website domains, OTP sender details, and session behavior
Consent and SecuritySet analytics consent modes and understand domain protection and token handling

DOM Package, Hosted Package, and hosted iframes

These are related integration layers, but they are not interchangeable:

LayerHow it is addedWhat it provides
DOM PackageInstall @tiquo/dom-package from npm and call typed JavaScript methodsHeadless authentication, data, analytics, token, catalog, and embed helpers for applications with a build step
Hosted PackageAdd the Tiquo hosted script and data-tiquo-* HTML attributesDeclarative authentication and customer-data behavior for Webflow and other site builders
Hosted customer flowAdd a Tiquo iframe directly or create it with a DOM or Hosted Package embed helperTiquo's transactional UI for booking or membership signup

Seeing a Tiquo iframe on a page does not mean the page uses the Hosted Package. Both packages can create and authenticate the same hosted flows, but the npm SDK and hosted script are separate delivery methods with different public APIs.

Method index

AreaMain DOM Package methods
AuthenticationsendOTP(), verifyOTP(), getUser(), isAuthenticated(), logout()
Customer dataupdateProfile(), getProfileFields(), uploadProfilePhoto(), getCompanies(), getCompanyColleagues()
EnquiriescreateEnquiry(), getEnquiries()
Orders and bookingsgetOrders(), getBookings(), getUpcomingBookings(), cancelBooking(), getBookingRescheduleOptions(), rescheduleBooking(), getReceipt(), downloadReceipt(), downloadBookingTicket(), addBookingToCalendar()
Wallet cardsgetWalletCardLinks()
Guest invitationsgetGuestFlows(), getGuestFlow(), createGuestInvitations(), getGuestInvitation(), getGuestInvitations() (sent invitations with history), acceptGuestInvitation(), getGuestPasses() (lists live invitations)
Pass balancesgetPassBalances() (counts Access Passes and Guest Passes)
Marketing signupsubscribeToMarketing()
Business policiesgetPolicies(), getPolicy(), displayPolicy()
Service catalogsgetFlowServices(), getFlowService(), getFlowAvailability()
EmbedsembedCustomerFlow(), embedServiceBooking(), embedMembership(), getIframeToken()
Saved cardsembedCardForm(), embedPaymentMethods(), getPaymentMethods(), setDefaultPaymentMethod(), removePaymentMethod()
Sessions and external tokensonAuthStateChange(), getAccessToken(), getRefreshToken(), initWithTokens(), destroy()
Analyticstiquo.analytics, TiquoAnalytics, setConsent(), getConsent()
UtilitiesTiquoPhone, TiquoAuthError

From version 1.14.0, getMemberships() returns the signed-in customer's memberships and the organization's public plans, including read-only memberships from a connected system such as HubSpot (isExternal: true). See Listing memberships and plans. From version 1.18.0, getPermissions() and hasPermission(name) return the membership permissions the customer holds. From version 1.19.0, the consent option, setConsent() and getConsent() control analytics consent, and version 1.20.0 adds cookieless analytics. Version 1.22.0 adds booking and order links, event names, descriptions and prices to bookings, the receipt number and VAT summary to receipts, and downloadReceipt(). Version 1.23.0 adds getProfileFields(), and version 1.24.0 adds addBookingToCalendar().

Sur cette page