Requests
Seller requests
Seller requests is a solution for sellers to create entity proposals. Each request needs to be reviewed by marketplace admin before it goes live.
Request types
product
- create a new product. Admin can later set thisproduct
as a global product, or seller-specific.product_collection
- create a new product collection.product_type
- create a new product type.product_category
- create a new product category.review_remove
- ask to remove the unfair review from customer.
Workflow
- Seller creates a request by specifying proposed entity payload. His request is saved in the database with
pending
status. - Marketplace administrator has a list of all requests. They can be filtered by their type or status. After reviewing the request payload, he has to make a decision if the request should be approved or rejected.
- If the administrator rejects the request, the entry changes status to
rejected
. Admin can also provide a note for the request submitter explaining his decision. Seller can be notified via email about the status change. - If the administrator approves the request, the entry changes status to
approved
, and appropiate resource will be created using payload provided by the submitter. Seller can be notified via email about the status change.
Example
- Seller wants to create a request for new
product_category
. He performs following request:
A following response is returned by server:
- Administrator lists pending requests by performing request:
- Administrator wants to accept the request, so performs update request with
accepted
status.
- The product category is created, and admin gets a following response from the server:
- If notifications are set up, Seller can be sent a message about the status update.
Seller registration request
If the seller wants to sign up for the platform, he has to create a registration request. The flow is very similar to other types of requests.
Workflow
- User creates a seller sign up request.
- Marketplace administrator has a list of all requests. They can be filtered by their type or status. After reviewing the request payload, he has to make a decision if the request should be approved or rejected.
- If the administrator rejects the sign up request, the entry changes status to
rejected
. Admin can also provide a note for the request submitter explaining his decision. Submitter can be notified via email about the status change. - If the administrator approves the sign up request, the entry changes status to
approved
, and seller is created. Submitter can be notified via email about the status change.
Order return requests
Marketplace customers, who want to return the order, partially or as a whole, can create OrderReturnRequest
. Inside this object the customer provides array of the tuples line_item_id
and quantity
, as well as the customer_note
(return reason).
Workflow
- Customer creates order return request, the status is
pending
- Seller reviews the return request. The review can have one of the following outcomes:
refunded
,withdrawn
orescalated
. - If the seller accepts the return, sets the status to
refunded
, and proceeds with the return and refund. - If the request does not meet the return criteria, seller sets the status to
withdrawn
, and provides the reason. - If the seller disagrees with the return reason, sets the status to
escalated
. - Requests with the
escalated
status are reviewed by the marketplace admin who makes the final decision. The decision can be eitherrefunded
orcanceled
. Admin can also provide the reason behind his decision.
Requests events reference
Requests activity is tracked in order to send notifications. Subscribers can be found in apps/backend/src/subscribers
. There you can customize the actions that are performed in response to each event.
Seller Registration Events
requests.seller.created
- Triggered when a new seller registration request is createdrequests.seller.accepted
- Triggered when a seller registration request is approved by adminrequests.seller.rejected
- Triggered when a seller registration request is rejected by admin
Product Category Events
requests.product_category.accepted
- Triggered when a product category creation request is approvedrequests.product_category.rejected
- Triggered when a product category creation request is rejected
Product Collection Events
requests.product_collection.accepted
- Triggered when a product collection creation request is approvedrequests.product_collection.rejected
- Triggered when a product collection creation request is rejected
Product Events
requests.product.created
- Triggered when a new product creation request is submittedrequests.product.accepted
- Triggered when a product creation request is approvedrequests.product.rejected
- Triggered when a product creation request is rejected
Product Type Events
requests.product_type.accepted
- Triggered when a product type creation request is approvedrequests.product_type.rejected
- Triggered when a product type creation request is rejected
Product Tag Events
requests.product_tag.accepted
- Triggered when a product tag creation request is approvedrequests.product_tag.rejected
- Triggered when a product tag creation request is rejected
Generic Event
requests.*.created
- A generic event triggered when any type of request is created