Overview
Admin Chat API provides administrative functions for managing customer conversations, transferring chats between stores and admin support, and monitoring chat system health. Location:convex/admins/chat.ts
Transfer Conversation to Store
Transfer an admin conversation to a specific store for direct customer support.ID of the conversation to transfer
Target store ID to transfer to
Optional order ID if conversation is about a specific order
Whether to copy message history to new conversation
Transfer Conversation to Admin
Transfer a store conversation back to admin support.ID of the conversation to transfer
Optional reason for transfer
Update Chat Settings
Update global chat system settings.Enable/disable direct messaging between customers and stores
Maximum image size in MB for chat messages
Allowed image MIME types
Enable/disable admin support chat
Get Admin Conversations
Retrieve admin conversations with customer and order information.Filter by conversation status (default: “active”)
Maximum number of conversations to return (default: 50)
Block Conversation
Block a conversation from receiving new messages.ID of the conversation to block
Reason for blocking the conversation
Unblock Conversation
Unblock a previously blocked conversation.ID of the conversation to unblock
Toggle Store Direct Messaging
Enable or disable direct messaging for a specific store.Store ID to update messaging settings for
Whether to enable direct messaging
Get Store Messaging Status
Check the messaging status for a specific store.Store ID to check status for
Get Chat Statistics
Retrieve comprehensive chat system statistics.Start date filter (Unix timestamp)
End date filter (Unix timestamp)
Get Eligible Stores for Transfer
Get stores that a customer has orders with, eligible for conversation transfer.Customer ID to check eligible stores for
All admin chat functions require admin authentication and will throw an error if called by non-admin users.
