Category

Shipping

Version

1.5.6

Last updated

Jun 17, 2024, 19:34:10 PM6 months ago

medusa-plugin-printful

A MedusaJS Plugin to integrate Printful.

Report Bug. Request Feature

Important

This plugin is not being actively developed or maintained due to my current time constraints and capacity. There is a possibility that I may resume development in the future. If you are interested in contributing to or maintaining this project, please feel free to fork the repository and continue its development! Thank you for your understanding and support.

Table Of Contents

About The Project

Medusa-Plugin-Printful is a plugin for the Medusa e-commerce platform that integrates with the Printful fulfillment service. This plugin simplifies the management of Printful products and orders through the Medusa dashboard, streamlining workflows and saving time.

What The Plugin Does

  • Syncs product details between Printful and Medusa.
  • Automatically updates product information based on Printful webhook events.
  • Handles order fulfillment automatically via webhooks.
Note: As of now, the plugin supports events from Printful to Medusa but not the reverse, except for order cancelation. This feature is a work in progress and already under development on the Copy to clipboardrefactor/services branch!

Built With

  • MedusaJS
  • Node.js
  • Typescript

Getting Started

Prerequisites

  • Fully working Medusa server with Redis and Postgres.
  • Printful Account and Store (ID)

Installation

  1. Install the package in your Medusa Server root: Copy to clipboardyarn add medusa-plugin-printful
  2. Configure the plugin in Copy to clipboardmedusa-config.js.
  3. Start your server and verify the plugin's functionality:

Usage

For using this plugin, follow the installation steps and make sure to configure the plugin properly in Copy to clipboardmedusa-config.js. Once the setup is done, the plugin will automatically handle syncing and order fulfillment as per the functionalities listed under "What The Plugin Does".

Options

Configuration Options

Here are the options you can use to configure the plugin within your Copy to clipboardmedusa-config.js file:
  • Copy to clipboardprintfulAccessToken: Access token for the Printful API.
  • Copy to clipboardstoreId: Store ID for Printful.
  • Copy to clipboardbackendUrl: Base URL for the Medusa server (without trailing slash).
  • Copy to clipboardenableWebhooks: Enable or disable Printful webhook listener.
  • Copy to clipboardenableSync: Enable or disable product synchronization between Printful and Medusa. (Note: will be deprecated in future versions)
  • Copy to clipboardbatchSize: Number of jobs added to the queue at once for better load management. (Note: will be deprecated in future versions)
  • Copy to clipboardproductTags: Enable or disable the creation and updating of product tags in Medusa.
  • Copy to clipboardproductCategories: Enable or disable the creation and updating of product categories in Medusa.
  • Copy to clipboardconfirmOrder: Enable or disable automatic order confirmation when sending it to Printful.

Sample Configuration

Here's how to set up your Copy to clipboardmedusa-config.js file:
{
resolve: "medusa-plugin-printful",
options: {
printfulAccessToken: process.env.PRINTFUL_ACCESS_TOKEN,
storeId: process.env.PRINTFUL_STORE_ID,
backendUrl: process.env.BACKEND_URL,
enableWebhooks: true,
enableSync: true,
batchSize: 3,
productTags: true,
productCategories: true,
confirmOrder: false
}
}

Roadmap

The upcoming roadmap includes several key features and improvements:

Short Term Goals

  • Refactoring services to use v2 of the Printful API - this will be a continuous process as the API is still in beta.
  • Biliteral product synchronization: Full two-way sync between Medusa and Printful platforms.
  • Admin UI Integration: A user-friendly dashboard interface for easy management of Printful products and orders within Medusa.

Long Term Goals

  • Eventual More Features: As the plugin matures, more functionalities will be introduced based on community feedback and requirements.
Feel free to contribute by opening issues or pull requests to help achieve these milestones.

Contributing

Contributions are welcome. Please feel free to open pull requests or issues for enhancements or bug reports.

License

MIT License.

Authors

Acknowledgements

A big thank you to the MedusaJS team for creating a robust e-commerce platform that enabled the development of this plugin. Special thanks to those who have contributed to the project or provided valuable feedback.

Build your own plugins

Develop your own plugins with our API to speed up your processes.

Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.