Virbe Documentation

Product Lookup by Scan

Set up RFID, barcode, or QR code scanning on a kiosk to trigger instant product information display through the virtual being.

Product Lookup by Scan (RFID / Barcode / QR Code)

All three scanning methods – RFID, barcode, and QR code – trigger the same product lookup flow. The only difference is how the scan event enters the conversation. This guide covers the shared setup and the lookup flow that works with any scanner type.

Setting Up the Scanner Signal

For Kiosk (Serial Port Scanner)

RFID readers, barcode scanners, and QR code scanners can be connected to the kiosk via serial port (preferred) or USB.

  1. Connect the scanner hardware to the kiosk computer
  2. Configure the signal name in Dashboard → Profiles → Settings → Metahuman Kiosk Profile Settings:
    • Define a custom signal name for scan events (e.g., scan)
    • The kiosk app will read the scanner input and send this signal along with the scanned value
  3. Set up the Conversation Flow to listen for the scan signal on the Start node
Scanner hardware → Kiosk app reads serial port → sends signal "scan" with value "EAN_CODE"
→ Conversation Flow Start node triggers on "scan" signal

For Web Widget (Programmatic)

If you are using the web widget instead of a kiosk, trigger the scan signal from JavaScript:

const widget = document.querySelector('virbe-plugin');

// Send the scanned value as a signal
widget.sendSignal('scan', 'EAN_OR_SKU_CODE');

Alternatively, use the Messages API to send a custom action:

curl -X POST \
  "https://my-assistant.virbe.app/api/v1/conversations/CONVERSATION_ID/messages/add" \
  -H "x-virbe-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "senderId": "scanner",
    "action": {
      "customAction": { "name": "scan", "value": "EAN_CODE_HERE" }
    }
  }'

Configuring the Conversation Flow

The Start node in your Conversation Flow listens for the scan signal. When triggered, the scanned value (EAN, SKU, or product code) is available as a conversation variable that you can reference in subsequent nodes.

Connect the scan signal branch from the Start node to the lookup step below.


Step 1: Look Up the Product

Choose the lookup method based on where your product data lives.

Option A: External API (Call Webhook)

Use a Call Webhook node to query your external product API with the scanned code.

  • Method: POST
  • URL: Your product API endpoint
  • Request body:
{
  "ean": "{{conv.scanned_value}}"
}

This uses the same API as the product search flow, just with an EAN/SKU lookup input instead of a natural language query. See API Integration Requirements for the full specification.

Option B: Built-in Data Table (Find Record(s))

If your product data is stored directly in Virbe, use a Find Record(s) node to query a local product Data Table.

  • Table: Your product catalog Data Table
  • Filter by: EAN/SKU column
  • Condition: Equals
  • Match by: Context Variable – {{conv.scanned_value}}
  • Max records: 1
  • Store result as: conv.product

Option C: Knowledge Base

If product information is stored as Knowledge Base documents, the LLM Response node with RAG will automatically search for relevant content based on the scanned product identifier. Add the scanned value to the LLM's additional context field.

Which option should you choose?

  • External API – large catalogs with real-time pricing and availability
  • Data Table – smaller, curated product sets managed directly in Virbe
  • Knowledge Base – narrative product descriptions and specifications where semantic search is beneficial

Step 2: Present the Product

After looking up the product, present it to the customer using two parallel actions:

Avatar speaks about the product

Add an LLM Response node:

  • System instruction:
You are a helpful store assistant. A customer just scanned a product. Describe this
product enthusiastically but concisely – mention its key features, price, and who it
is best suited for. Keep it under 3 sentences. Ask if they would like to see similar
products or have any questions.
  • Additional context: Inject the product lookup result (webhook response or Data Table record)

Display the product card

Use a Custom Action node to send the product data to the kiosk for card display:

  • Action name: display-product-cards
  • Value: The product data including imageUrl, title, price, productPageUrl

The kiosk renders a product card that the customer can tap to open the full product page.


Step 3: Continue the Conversation

After presenting the scanned product, add a Checkpoint with "Wait for user input" to let the customer decide what to do next.

Common follow-up paths:

  • "Show me similar products" – use a Go to Flow node to enter the product search flow with the scanned product's category pre-filled as a variable
  • "Tell me more" – use an LLM Response node with full product details as context
  • Customer scans another product – the flow restarts from the scan signal trigger

The scan flow can coexist with the conversational product search flow in the same Conversation Flow. The Start node routes to the appropriate sub-flow based on whether the trigger is a scan signal or a user text/voice input matched by the Intent Matcher.

On this page