Skip to main content
Sleek’s SDK can extract order details from pages your users are visiting. This feature allows you to capture successful transactions and order details. This documentation will guide you through the integration process.
This document assumes that you have already integrated the Sleek SDK. If you haven’t, please refer to the SDK integration guide.

Enable order extraction

There are two ways to get order information from Sleek:
  1. Manual Extraction: Extract order information from a specific tab using the extractOrder method
  2. Event-Based: Subscribe to the ORDER_EXTRACTED event to receive order information automatically
Order extraction is only supported on cart, checkout, and checkoutComplete.

Manual Extraction

To extract order information from an cart, checkout or order confirmation page, you can use the extractOrder method:
Sleek will only return order information on pages that are classified as cart, checkout or checkoutComplete. To determine the page classification, you can use the classifyPage method. See the page classification guide for more information.

Event-Based Extraction

Alternatively, you can receive order information automatically by subscribing to the ORDER_EXTRACTED event. This requires to set emitPageClassification to true in the SDK’s options during initialization.

Order data structure

The Order object returned by the SDK contains comprehensive information about the order details:
What’s next: Now that you have enabled order extraction, you can check out the TypeDoc for specific event types and methods on the SDK.

View TypeDoc

Browse the reference TypeDoc for the SDK.