Integrations
The Better Data Square integration allows you to expose your Square-managed catalog, inventory, and multiple locations to conversational AI agents.
1import { SquareBackend } from '@commercegateway/commerce-gateway/square';2 3const square = new SquareBackend({4 accessToken: process.env.SQUARE_ACCESS_TOKEN!,5 environment: 'production', "cmt">// or 'sandbox'6 locationId: process.env.SQUARE_LOCATION_ID!,7});1const gateway = new LLMGateway({2 backends: {3 products: square,4 cart: square,5 },6});If you have multiple physical stores, the Square backend can route availability checks to the location closest to the user.
Automatically maps Square's CatalogObject types (ITEM, ITEM_VARIATION, IMAGE) to the gateway's universal Product format.
Uses Square's Search API to ensure that price changes or seasonal updates in your Square Dashboard are immediately reflected in the AI conversation.
For advanced multi-location routing, see our Architecture Guide.
