A мессенджер clothing store with photo try-on

The customer chats in мессенджер, the assistant finds products in your catalog, shows them on the customer's own photo, and takes the order — orders land in mongoDb and Microsoft SQL.

  • Selfie try-on answers the biggest objection
  • Products found by description, not SKU
  • Orders placed in the chat — no site, no cart
  • Fast replies: frequent searches cached in redis
RedisMongoDB ToolGoogle Sheets ToolWhatsApp Business CloudMongoDB Atlas Vector StoreEmbeddings OpenAI

How it works

To move data from Microsoft SQL to Edit Image automatically, use a ready-made scenario — no manual exports.

  1. Starts when: WhatsApp message trigger
  2. Check: Check if message is button or image
  3. If yes: Route interactive vs image message
  4. If yes: Parse button and user data
  5. Check: Route VTO vs order button tap
  6. If yes: Set VTO context in Redis
  7. Then: Prompt user to upload selfie
  8. If no: Order orchestration AI agent
  9. Then: Send order confirmation
  10. If no: Get VTO context from Redis
  11. Check: Is VTO product ID stored in Redis?
  12. If yes: Extract image ID, waId, and product ID
  13. Then: Get product image from MongoDB
  14. Then: Download product image from Drive (VTO)
  15. Then: Resize product image to 1024px
  16. Then: Extract product image as base64
  17. Check: Merge product, selfie, and validation result
  18. Check: Validate merged selfie before try-on
  19. If yes: Build Gemini image generation API payload
  20. Then: Generate VTO with Gemini API
  21. Then: Convert Gemini response to image file
  22. Then: Upload VTO result to WhatsApp
  23. Then: Send VTO result to user
  24. Then: Delete VTO context from Redis
  25. If yes: Notify user VTO is processing
  26. If no: Ask user to resend valid photo
  27. Then: Get WhatsApp media URL
  28. Then: Download user selfie
  29. Then: Analyze user selfie with Gemini
  30. Check: Gemini: confirm exactly one person
  31. Then: Resize user selfie to 1024px
  32. Then: Extract user selfie as base64
  33. If no: Ask user to send correct photo
  34. If no: Validate incoming message
  35. Check: Pass valid messages, block invalid
  36. If yes: Get user session from Redis
  37. Then: Load session and append user message
  38. Then: AI shopping agent (BytezBot)
  39. Then: Detect JSON intent or plain text reply
  40. Then: Append AI reply to session history
  41. Then: Save session to Redis
  42. Check: Route JSON intent vs plain text reply
  43. If yes: Route product search vs recommend
  44. If yes: Build Redis cache key from search query
  45. Then: Check Redis cache
  46. Check: Is product cached in Redis?
  47. If yes: Parse cached product JSON array
  48. Check: Loop through products
  49. Then: Build product card message body
  50. Then: Convert product image base64 to binary
  51. Then: Upload product image to WhatsApp
  52. Then: Send product message with buttons
  53. If no: MongoDB Atlas vector search
  54. Then: Download product image from Drive
  55. Then: Convert product image to base64
  56. Then: Aggregate all product base64 images
  57. Check: Combine vector search results with images
  58. Then: Combine products with base64 images
  59. Then: Store products in cache
  60. Then: Unpack products from cache result
  61. If no: Send text response to user
  62. If no: Send validation error to user
  63. Then: GPT-5-nano (intent classifier)
  64. Then: GPT-4o (order agent)
  65. Then: Create order in MongoDB
  66. Then: Get product info from MongoDB
  67. Then: Log order to Google Sheets
  68. Then: OpenAI embeddings
  69. Then: Session memory for shopping agent
  70. Then: Session memory for order agent

You can launch this Microsoft SQL + Edit Image integration in Scriptera: describe the task in plain words — the scenario is built, launched and monitored for you.