Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/aerele/medusa_integration/llms.txt

Use this file to discover all available pages before exploring further.

This quickstart walks you through installing the ERPNext Medusa Integration app on your Frappe bench, connecting it to a running Medusa backend, and triggering your first product sync by saving a Website Item in ERPNext.
1

Fetch the app with bench

Run the following command from your bench directory to download the app from GitHub:
bench get-app https://github.com/aerele/medusa_integration
This clones the medusa_integration repository into your bench’s apps/ directory and installs its Python dependencies.
2

Install the app on your site

Replace <your-site> with your ERPNext site name (for example, mysite.localhost):
bench --site <your-site> install-app medusa_integration
This registers the app with your site and creates any required database tables.
3

Run database migrations

Apply the app’s schema changes to your site’s database:
bench --site <your-site> migrate
If you are running ERPNext in production mode, restart the bench after migrating: bench restart.
4

Open Medusa Configuration in ERPNext

Log in to your ERPNext desk as a user with the System Manager role. Navigate to:Search bar → Medusa ConfigurationOr go to Medusa Integration → Medusa Configuration in the module menu.
5

Enable the integration and enter your Medusa URL

In the Medusa Configuration form:
  1. Check the Enable checkbox to activate the integration.
  2. Enter your Medusa backend URL in the Backend URL field (for example, https://your-medusa-backend.com).
  3. Enter the Admin Email and Admin Password for your Medusa admin user.
  4. Optionally enter your Frontend URL — the storefront base URL used in notification emails sent to customers.
  5. Click Save.
The integration automatically fetches and stores an access token using the credentials you provided. You do not need to set the Access Token field manually.
Make sure your ERPNext server can reach the Medusa backend URL over the network. Firewall rules or VPN configurations may block the connection.
6

Sync your first product

To push a product to Medusa, open any Website Item in ERPNext (or create a new one) and click Save.The website_item_validate hook fires on save and pushes the item to your Medusa product catalog. You can verify the sync by checking the product list in your Medusa admin dashboard.
Only items saved as Website Items (not plain Items) are pushed to Medusa. If no Website Item exists yet, go to E Commerce → Website Item → New and create one.

What happens next

Once the integration is running, it handles syncing automatically:
  • Product changes — Any subsequent save of a Website Item updates the corresponding Medusa product.
  • Price changes — Saving an Item Price record triggers a Medusa price list update.
  • Incoming orders — When a customer places an order in your Medusa storefront, the integration creates a Quotation and (after confirmation) a Sales Order in ERPNext.
  • Nightly bulk sync — At 01:00 every day, the scheduler exports all items, images, and missing prices to ensure Medusa stays fully up to date.

Configuration reference

See all available settings including coupon discount options and the Frontend URL.

Sync guides

Learn how each sync — products, orders, inventory, pricing — works in detail.

Build docs developers (and LLMs) love