Users message the marketplace’s team, and each other, in conversations. Starting one again continues it.
Who answers a question about a listing or an order is the marketplace’s choice, in listings.questions_to from GET /v1/marketplace. Your shop always sends the same request, and mongrl routes it:
questions_to |
A question with listing_id or order_id goes to |
kind |
|---|---|---|
team (the default) |
The marketplace’s team, in a support thread for that listing or order: one per person and listing (or order) | support, with listing_id or order_id |
seller |
The seller (for an order, the buyer or the seller): one per buyer and listing, or per order | listing or order |
support: true writes to the team in general: one thread per person, apart from those about listings and orders. When the team answers, sellers can also ask about their own listings, at any stage. Show the person who answers on the listing page, e.g. “Ask Used Icons” or “Ask the seller”.
Start or continue a conversation
Section titled “Start or continue a conversation”POST /v1/me/conversations{ "listing_id": "8f3c…", "body": "Is the leather original?" }The answer has the conversation and the new message. If one already exists, the message joins it.
Show the inbox
Section titled “Show the inbox”GET /v1/me/conversationslists the user’s conversations, latest first, each withlast_message,last_message_atandunread. Page withlimitandoffset.GET /v1/me/conversations/{id}/messagesreads one, oldest first, and marks it read. Passafter=<last message id>to get only newer messages.POST /v1/me/conversations/{id}/messageswith{ "body": "…" }replies.
In a message, from_marketplace: true means the marketplace’s team wrote it (support); otherwise sender_id is the user who did. In support conversations, user_a is the user asking. Show a conversation’s listing_id or order_id with it, so the person sees what it’s about.
Show a badge from the sum of unread. There’s no push: refresh the inbox when the user opens it, and while a conversation is open, ask for messages after the last one every few seconds.
Emails
Section titled “Emails”When someone gets a message they’re emailed a link to https://<your shop>/<lang>/messages/<id>. Build that page. See Pages your shop needs.