1. Introduction
Sanal AI
  • Introduction
    • ๐Ÿ’ฌ Sanal AI Integration
    • ๐Ÿค Overview
    • ๐Ÿš€ Getting Started
    • ๐Ÿ› ๏ธ Integration Flow
    • โœ… Checklist
    • ๐Ÿ”Œ Bridge Protocol
  • Data Sync
    • ๐Ÿ› ๏ธ Data Sync
    • ๐Ÿ“ Data Layout
    • ๐Ÿช Merchants
    • ๐Ÿ“‚ Categories
    • ๐Ÿท๏ธ Items
    • ๐Ÿ›’ Products
    • ๐Ÿ“ฆ Inventory
    • ๐Ÿ‘ค Customers
    • ๐Ÿงพ Orders
    • ๐Ÿงพ Variants & Combinations
  • API Requirements
    • ๐Ÿ”Œ API Requirements
    • API: `syncMerchants`
    • API: `syncCategories`
    • API: `syncItems`
    • API: `syncProducts`
    • API: `syncInventory`
    • API: `syncCustomers`
    • API: `syncOrders`
  1. Introduction

โœ… Checklist

โœ… Checklist#

WebView or iframe loads the widget URL
Bridge channel registered (SanalBridge for Flutter)
Handler waits for SANAL_READY, then sends SANAL_INIT and SANAL_CART_SYNC
Cart changes from the widget update your cart and re-sync
Navigation messages open the correct screens in your app

โš ๏ธ Important timing rule#

Wait for SANAL_READY before sending SANAL_CART_SYNC.
In Flutter, onPageFinished fires before the React app has mounted. Sending the cart too early will be ignored. Use SANAL_READY as the signal to sync the cart.
Previous
๐Ÿ› ๏ธ Integration Flow
Next
๐Ÿ”Œ Bridge Protocol
Built with