* initialized next.js project * finished markdown sections * added operation schema component * change page metadata * eslint fixes * fixes related to deployment * added response schema * resolve max stack issue * support for different property types * added support for property types * added loading for components * added more loading * type fixes * added oneOf type * removed console * fix replace with push * refactored everything * use static content for description * fixes and improvements * added code examples section * fix path name * optimizations * fixed tag navigation * add support for admin and store references * general enhancements * optimizations and fixes * fixes and enhancements * added search bar * loading enhancements * added loading * added code blocks * added margin top * add empty response text * fixed oneOf parameters * added path and query parameters * general fixes * added base path env variable * small fix for arrays * enhancements * design enhancements * general enhancements * fix isRequired * added enum values * enhancements * general fixes * general fixes * changed oas generation script * additions to the introduction section * added copy button for code + other enhancements * fix response code block * fix metadata * formatted store introduction * move sidebar logic to Tags component * added test env variables * fix code block bug * added loading animation * added expand param + loading * enhance operation loading * made responsive + improvements * added loading provider * fixed loading * adjustments for small devices * added sidebar label for endpoints * added feedback component * fixed analytics * general fixes * listen to scroll for other headings * added sample env file * update api ref files + support new fields * fix for external docs link * added new sections * fix last item in sidebar not showing * move docs content to www/docs * change redirect url * revert change * resolve build errors * configure rewrites * changed to environment variable url * revert changing environment variable name * add environment variable for API path * fix links * fix tailwind settings * remove vercel file * reconfigured api route * move api page under api * fix page metadata * fix external link in navigation bar * update api spec * updated api specs * fixed google lint error * add max-height on request samples * add padding before loading * fix for one of name * fix undefined types * general fixes * remove response schema example * redesigned navigation bar * redesigned sidebar * fixed up paddings * added feedback component + report issue * fixed up typography, padding, and general styling * redesigned code blocks * optimization * added error timeout * fixes * added indexing with algolia + fixes * fix errors with algolia script * redesign operation sections * fix heading scroll * design fixes * fix padding * fix padding + scroll issues * fix scroll issues * improve scroll performance * fixes for safari * optimization and fixes * fixes to docs + details animation * padding fixes for code block * added tab animation * fixed incorrect link * added selection styling * fix lint errors * redesigned details component * added detailed feedback form * api reference fixes * fix tabs * upgrade + fixes * updated documentation links * optimizations to sidebar items * fix spacing in sidebar item * optimizations and fixes * fix endpoint path styling * remove margin * final fixes * change margin on small devices * generated OAS * fixes for mobile * added feedback modal * optimize dark mode button * fixed color mode useeffect * minimize dom size * use new style system * radius and spacing design system * design fixes * fix eslint errors * added meta files * change cron schedule * fix docusaurus configurations * added operating system to feedback data * change content directory name * fixes to contribution guidelines * revert renaming content * added api-reference to documentation workflow * fixes for search * added dark mode + fixes * oas fixes * handle bugs * added code examples for clients * changed tooltip text * change authentication to card * change page title based on selected section * redesigned mobile navbar * fix icon colors * fix key colors * fix medusa-js installation command * change external regex in algolia * change changeset * fix padding on mobile * fix hydration error * update depedencies
129 lines
6.8 KiB
Plaintext
129 lines
6.8 KiB
Plaintext
---
|
||
sidebar_position: 6
|
||
description: 'This user guide explains how to manage draft orders on the Medusa Admin. Learn how to create a draft order, view its details, edit a draft order, cancel a draft order, and more.'
|
||
addHowToData: true
|
||
---
|
||
|
||
import UiIcon from '@site/src/components/UiIcon';
|
||
|
||
# Manage Draft Orders
|
||
|
||
In this document, you’ll learn more about draft orders, how to create them, and more.
|
||
|
||
## Overview
|
||
|
||
Draft orders are orders created from the Medusa admin. Existing products or custom items can be added to the order as purchased items. You can also specify custom shipping amounts.
|
||
|
||
After a draft order is created and is marked as paid, an order will be created based on that draft order and it will appear as part of the Orders list.
|
||
|
||
---
|
||
|
||
## Create a Draft Order
|
||
|
||
To create a draft order:
|
||
|
||
1. Go to Orders → Drafts.
|
||
2. Click on “Create draft order” at the top right.
|
||
3. A new window then opens with six steps to go through to create the draft order:
|
||
1. In the first step, choose the region this draft order belongs to, then click the Next button.
|
||
2. In the second step, add items to the order. You must add at least one item. Once you’re done, click the Next button.
|
||
1. To add existing products:
|
||
1. Click on the Add Existing button.
|
||
2. Choose the products you want to add into the draft order by clicking the checkbox at the left of the product. You can choose more than one product.
|
||
3. Once done, click on the Add button.
|
||
2. To add a custom item:
|
||
1. Click on the Add Custom button.
|
||
2. Enter the title, price, and quantity of the custom item.
|
||
3. Click on the Add button.
|
||
3. To remove an item you added, click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999273/Medusa%20Docs/UI%20Icons/7hztVhj_mj6mxu.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999290/Medusa%20Docs/UI%20Icons/1yp4PNt_vzwnhf.png" alt="trash" /> icon at the right of the item.
|
||
4. To change the quantity of any item, use the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999131/Medusa%20Docs/UI%20Icons/1hL8NiW_lqmjcq.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999150/Medusa%20Docs/UI%20Icons/8LtkPqW_jyqz5i.png" alt="plus" /> and <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999351/Medusa%20Docs/UI%20Icons/EGk9uYD_a7rwhs.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999366/Medusa%20Docs/UI%20Icons/XvkBK8p_dzhzfx.png" alt="minus" /> icons under the Quantity column.
|
||
5. Once you’re done, click the Next button.
|
||
3. In the third step, choose a shipping method then click the Next button.
|
||
1. If you want to change the default price of the shipping method, click on the “Set custom price” button and enter the price you want to use.
|
||
2. If you want to remove the custom price, you can click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999273/Medusa%20Docs/UI%20Icons/7hztVhj_mj6mxu.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999290/Medusa%20Docs/UI%20Icons/1yp4PNt_vzwnhf.png" alt="trash" /> icon.
|
||
4. In the fourth step, enter the customer’s details and shipping address.
|
||
1. If the customer already exists, you can choose it from the first input. You can search the list of customers by name or email. This fills out the fields under the General section as well.
|
||
2. If this is a new customer, in the first field, enter the email of the customer to add. Then, fill out the customer’s first name, last name, and phone number in the General section.
|
||
3. In the Shipping Address section, enter the customer’s address details such as the Address line, postal code, and more.
|
||
4. Once you’re done, click on the Next button.
|
||
5. In the fifth step, specify the billing address details.
|
||
1. If the billing address is the same as the shipping address, you can just check the “Use same as shipping” checkbox.
|
||
2. If the billing address is different than the shipping address, fill out the information under the General and Billing Address as instructed in the previous step.
|
||
3. Once done, click the Next button.
|
||
6. In the last step, confirm that all the information is correct.
|
||
1. If you want to add a discount, click on the Add Discount button and enter the discount code.
|
||
2. If you want to edit any of the draft order’s info, click on the Edit link next to any of the sections. This will take you back to the step associated with that section.
|
||
4. Once you’re done following all the six steps, click on the Submit button.
|
||
|
||
---
|
||
|
||
## Open Draft Order’s Details
|
||
|
||
To open a draft order’s details page:
|
||
|
||
1. Go to Orders → Drafts.
|
||
2. Select the draft order you want to view.
|
||
|
||
---
|
||
|
||
## Edit Draft Order Info
|
||
|
||
### Edit Shipping Address
|
||
|
||
To edit the shipping address of a draft order:
|
||
|
||
1. Open the draft order details page.
|
||
2. Scroll down to the customer section and click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon in that section.
|
||
3. Click on Edit Shipping Address in the dropdown.
|
||
4. This opens a new window to edit the shipping address’s info.
|
||
5. Once you’re done click on the Save button.
|
||
|
||
---
|
||
|
||
## Cancel Draft Order
|
||
|
||
:::warning
|
||
|
||
Canceling a draft order cannot be undone and the draft order will be removed from the list of draft orders.
|
||
|
||
:::
|
||
|
||
To cancel a draft order:
|
||
|
||
1. Open the draft order details page.
|
||
2. Click on the <UiIcon lightIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999308/Medusa%20Docs/UI%20Icons/1ordBC6_ssysel.png" darkIcon="https://res.cloudinary.com/dza7lstvk/image/upload/v1667999326/Medusa%20Docs/UI%20Icons/dSwWYBH_stzgoi.png" alt="three dots" /> icon at the top right.
|
||
3. Click on Cancel Draft Order in the dropdown.
|
||
4. Confirm canceling the draft order by clicking the “Yes, remove” button in the pop-up.
|
||
|
||
---
|
||
|
||
## Mark Draft Order as Paid
|
||
|
||
:::caution
|
||
|
||
When you mark a draft order as paid, a new order is created and associated with this draft order. This can’t be undone, but the new order created can be canceled.
|
||
|
||
:::
|
||
|
||
To mark a draft order as paid:
|
||
|
||
1. Open the draft order details page.
|
||
2. Scroll down to the Payment section.
|
||
3. Click on the “Mark as paid” button.
|
||
|
||
You should see a new order in the Orders list now.
|
||
|
||
---
|
||
|
||
## Go to Associated Order
|
||
|
||
:::info
|
||
|
||
This is only available after a draft order is marked as paid.
|
||
|
||
:::
|
||
|
||
To go to the order associated with the draft order.
|
||
|
||
1. Open the draft order details page.
|
||
2. Click on the “Go to Order” button at the top right. |