Overview
The Submission Service is a conversational AI agent that enables users to submit used items through natural language and photos. It guides users through:- Product Identification: Finding the product in the catalog
- Options Selection: Choosing product variants/options
- Item Creation: Creating the item in LoopOS Core
- Protocol Completion: Answering all required protocol questions
This is the only service that doesn’t follow the standard LoopOS AI services pattern. It uses the
/chat endpoint and follows the DeepChat standard for conversational interfaces.How It Works
The Submission Service uses a multi-agent workflow:1
Product Identification
User describes product → Agent searches catalog → Presents options → User confirms product and brand
2
Options Selection
Agent presents product options/variants → User selects → Options validated
3
Item Creation
Agent creates item in LoopOS Core → Receives item_token and item_id
4
Protocol Questions
Agent asks all protocol questions → Validates answers → Completes submission
Agents
Product Identification Agent
Identifies products from user descriptions and images:- Tools:
get_catalog- Searches catalog for products - Behavior:
- Always validates against catalog (never invents products)
- Presents options when multiple matches found
- Uses images to help identify products
- Confirms product and brand before proceeding
Product Options Agent
Collects product options/variants:- Tools:
get_product_options- Retrieves available options - Behavior:
- Presents options as buttons
- Validates selections
- Handles “See more” for long option lists
Create Item Agent
Creates the item in LoopOS Core:- Tools:
create_item- Creates item via LoopOS Core API - Behavior:
- Requires product_id, brand_id, option_value_ids
- Creates item and receives item_token
- Immediately hands off to protocol agent
Protocol Agent
Asks and validates protocol questions:- Tools:
get_product_protocol- Gets protocol questionsvalidate_protocol_answer- Validates answersfinish_product_creation- Completes submission
- Behavior:
- Asks one question at a time
- Shows progress (e.g., “1/10”)
- Uses images to infer answers when possible
- Presents final summary before completion
API Endpoint
POST/chat
Follows the DeepChat standard for conversational interfaces.
Request Format
Response Format
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
language | string | No | Language code (default: “PT-PT”) |
messages | array | Yes | Conversation messages |
images | array | No | Image URLs or base64 data |
conversation | boolean | No | Whether this is conversational (default: true) |
session_id | string | No | Session identifier for conversation tracking |
loopos_core_context | string | No | Business context |
loopos_core_base_url | string | Yes | LoopOS Core base URL |
loopos_submission_base_url | string | Yes | LoopOS Submission base URL |
loopos_submission_tag_filter | string | No | Tag filter for submission |
loopos_submission_product_tag_filter | string | No | Product tag filter |
loopos_submission_category_tag_filter | string | No | Category tag filter |
loopos_submission_brand_tag_filter | string | No | Brand tag filter |
Integration with LoopOS Core
The Submission Service requires a LoopOS Core script block:Required Script Block
- Name:
LoopOSAISubmissionAPI - Slug:
loopos_ai_submission_api - Location: LoopOS Flow Script Block
- Catalog queries
- Product options retrieval
- Protocol questions
- Item creation
- Protocol answer validation
Features
Image Support
Users can upload images to help identify products and answer protocol questions.
Catalog Validation
All product suggestions validated against catalog - never invents products.
Progress Tracking
Shows progress through protocol questions (e.g., “1/10”).
Answer Validation
All protocol answers validated before acceptance.
Button Options
Options presented as clickable buttons for better UX.
Final Summary
Presents final summary before completion for user confirmation.
Protocol Question Flow
The Protocol Agent follows a specific flow:- Get Protocol: Calls
get_product_protocolto retrieve all questions - Iterate Questions: Asks each question one at a time
- Show Progress: Displays question number (e.g., “1/10”)
- Present Options: Shows options as buttons when available
- Validate Answers: Validates each answer before accepting
- Final Summary: Presents complete summary before submission
- Complete: Calls
finish_product_creationto finalize
Best Practices
Limitations
The service requires the LoopOS Core script block to be properly configured. Ensure the script is activated and accessible.
Example Conversation
Related Documentation
- Architecture - System architecture
- Agents - Agent architecture
- Context - Context management
- API Reference: Chat - Detailed API documentation