Skip to Content
Agentic Shopping SDK

Agentic Shopping SDK

ShopOps is an embedded UI SDK that lets consumer chat products offer product discovery and a complete checkout flow without leaving the conversation.

  • Product Cards: send a text chunk and render product cards with detail sheets, delivery estimates, and purchase actions.
  • Checkout: collect shipping and payment in a hosted flow and return an order confirmation.

Minimum integration

  1. Mint a short-lived sessionToken for a single conversation.
  2. Render Product Cards with the most recent intent text.
  3. Listen for checkout completion events and post the receipt back into the thread.

Session token

Your backend exchanges a private API key for a short-lived token scoped to one conversation.

POST /v1/sessions Authorization: Bearer <SHOP_OPS_SECRET_KEY> Content-Type: application/json { "conversationId": "chat_7F1E3A", "userId": "u_3921", "environment": "sandbox" }
{ "sessionToken": "sesh_sandbox_7p1n9GJxQk3vK" }

Web

import { ShopOps } from '@shopops/agentic-shopping' ShopOps.configure({ sessionToken }) const cards = ShopOps.ProductCards.mount('#shopops-cards', { text: latestMessageText, onEvent(event) { if (event.type === 'checkout.completed') { console.log(event.orderId, event.receiptUrl) } } }) // update cards when the message changes cards.update({ text: nextMessageText })

React Native

import { ShopOpsProductCards } from '@shopops/agentic-shopping/react-native' <ShopOpsProductCards sessionToken={sessionToken} text={latestMessageText} onEvent={(event) => { if (event.type === 'checkout.completed') { // post a receipt message to the thread } }} />

SwiftUI

import ShopOpsAgenticShopping ShopOps.configure(sessionToken: sessionToken) ShopOpsProductCards(text: latestMessageText) { event in if case let .checkoutCompleted(orderId, receiptURL) = event { // post a receipt message to the thread } }

Jetpack Compose

import com.shopops.agenticshopping.ShopOps import com.shopops.agenticshopping.ui.ShopOpsProductCards ShopOps.configure(sessionToken = sessionToken) ShopOpsProductCards( text = latestMessageText, onEvent = { event -> if (event is ShopOpsEvent.CheckoutCompleted) { // post a receipt message to the thread } } )

Hosting model

On mobile, the SDK ships UI as an embedded web runtime with a native event bridge. Your app receives structured events and never renders cards or payment forms.

Last updated on