The Nexus client is the main interface for communicating with the server from the chatbot. It provides methods for sending messages, updating orders, managing customers, and other server operations.Documentation Index
Fetch the complete documentation index at: https://docs.chataigne.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheNexusClient is a facade that composes specialized clients for different domains:
- ConversationClient - Get conversation data
- MessageClient - Send messages and register tool calls/results
- OrderClient - Manage order drafts and registrations
- AddressClient - Check delivery addresses and fees
- CustomerClient - Update customer data and memory
- PaymentClient - Generate payment method URLs
- FeedbackClient - Create customer feedback
- ScheduledMessageClient - Schedule and manage delayed messages
Message Methods
register_text_message
conversation_id: str- Conversation identifiercontent: str- Message text contentsender: "user" | "assistant" | "tool"- Message sender type- Used for registering assistant responses in the conversation thread
register_tool_call
conversation_id: str- Conversation identifiertool_calls: list[ToolCall]- List of tool calls to register- Used for logging tool invocations in the conversation thread
register_tool_result
conversation_id: str- Conversation identifiertool_call_id: str- ID of the tool call being responded totool_result_data: str- Result data from the tool execution- Used for logging tool results in the conversation thread
send_platform_message
conversation_id: str- Conversation identifiercontent: str- Message content (auto-converts ** to * for WhatsApp)sender: "customer" | "location"- Message sendermessage_type: "text" | "button" | "flow" | "url" | "audio"- Message typelocation_id: str- Required for button messagescustomer_id: str- Required for button messagesbuttons: list[dict]- Button objects with id and title for button messagesurl: str- URL for url type messagescta: str- Call to action text for url/flow messages- Used for sending messages to customers via WhatsApp
send_reaction
conversation_id: str- Conversation identifieremoji: str- Emoji to react with (e.g., ’👍’, ‘❤️’, ’😊’)message_to_react: str- Content of message to react to (can be partial)- Used for reacting to customer messages
Order Methods
update_order_draft
order_draft_id: str- Order draft identifierupdates: OrderDraftUpdateDTO- Order updates (service type, items, requested time, etc.)- Used for updating order drafts with new items, delivery details, or timing
register_order_draft
order_draft_id: str- Order draft identifier- Used for converting an order draft to a confirmed order
- Returns order data or checkout URL for payment
Address Methods
check_address
location_id: str- Location ID for location modeaddress: str- Address string (optional if coordinates provided)coordinates: CoordinatesDTO- Lat/lng coordinates (optional if address provided)organization_id: str- Organization ID for organization modeservice_type: "delivery" | "collection"- Service typelocation_number: int- Number of locations to return (organization mode)order_draft_id: str- Optional order draft context- Used for validating delivery addresses and calculating fees
Customer Methods
get_customer
customer_id: str- Customer identifier- Used for retrieving customer details including memory
update_customer
customer_id: str- Customer identifierdata: dict- Customer data to update- Used for updating customer information
update_customer_memory
customer_id: str- Customer identifiermemory_entries: list[dict]- Memory entries with entityId, type, and data- Used for updating customer memory/preferences
Payment Methods
get_payment_method_register_url
customer_id: str- Customer identifierentity_id: str- Location or organization IDentity_type: "location" | "businessOrganization"- Entity type- Used for generating URLs to register new payment methods
Feedback Methods
create_feedback
conversation_id: str- Conversation identifierfeedback: str- Feedback textgeneral_score: int- Overall rating scorefood_score: int- Food quality score (optional)delivery_score: int- Delivery service score (optional)ordering_experience_score: int- Ordering process score (optional)order_id: str- Related order ID (optional)- Used for collecting customer feedback and ratings
Scheduled Message Methods
create_scheduled_message
conversation_id: str- Conversation identifiermessage: str- Message content to send laterscheduled_for: str- ISO 8601 datetime for deliverytype: "permanent" | "until_next_message"- Schedule persistence type- Used for scheduling delayed messages (reminders, follow-ups, etc.)
cancel_scheduled_message
scheduled_message_id: str- Scheduled message identifier- Used for cancelling previously scheduled messages
list_scheduled_messages
conversation_id: str- Conversation identifier- Used for retrieving pending scheduled messages for a conversation
Conversation Methods
get_conversation
store_number: str- Store’s WhatsApp numbercustomer_number: str- Customer’s WhatsApp number- Used for retrieving conversation data and context