=== Bosta Fulfillment ===
Contributors: bosta, bostafulfillment
Tags: woocommerce, fulfillment, bosta, inventory, shipping
Requires at least: 5.0
Tested up to: 7.0
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WooCommerce integration for Bosta Fulfillment Center — sync products, manage inventory, and send orders automatically.

== Description ==

Bosta Fulfillment connects your WooCommerce store to the Bosta Fulfillment Center. Once configured, it handles:

* **Product Sync** — Push your WooCommerce products (with Bosta SKU) to the Bosta Fulfillment Center.
* **Inventory Sync** — Pull real-time stock levels from Bosta and update WooCommerce automatically.
* **Order Fulfillment** — Send orders to Bosta manually (bulk action or single order) or automatically when an order reaches processing/completed status.
* **Webhook Updates** — Receive live order status updates from Bosta directly into your WooCommerce order meta.

= Requirements =

* WooCommerce 3.0 or higher
* A Bosta Fulfillment account with an API key
* PHP 7.4 or higher

== Installation ==

1. Upload the `bosta-fulfillment` folder to the `/wp-content/plugins/` directory, or install via the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **WooCommerce → Settings → Integrations → Bosta Fulfillment**.
4. Enter your Bosta API key and save.
5. Set the **SKU** field on each product you want to fulfill through Bosta (found in the product's Inventory tab). The standard WooCommerce SKU is used as the Bosta SKU.
6. Click **Sync Products** to push products to the Bosta Fulfillment Center.

== Frequently Asked Questions ==

= Where do I find my API key? =
Log in to your Bosta business account and navigate to Settings → API Keys.

= How does auto-sync work? =
When enabled, any order that reaches "processing" or "completed" status is automatically sent to Bosta Fulfillment. You can enable this under WooCommerce → Settings → Integrations → Bosta Fulfillment.

= What is a Bosta SKU? =
The Bosta SKU is the standard WooCommerce SKU field (Products → Edit → Inventory tab → SKU). Set it to the product code assigned by Bosta when your products are registered in their fulfillment system.

= Can I send orders manually? =
Yes. Go to WooCommerce → Orders, select orders, and choose "Send To Bosta Fulfillment" from the bulk actions dropdown. You can also send individual orders from the order edit page using the Order Actions dropdown.

= How does inventory sync work? =
Click "Sync Quantity from Bosta" in the plugin dashboard or settings page. The plugin fetches current stock levels from Bosta and updates your WooCommerce product stock quantities accordingly.

== Changelog ==

= 1.0.0 =
* Initial release.
* Product SKU field for simple and variable products.
* Product sync to Bosta Fulfillment Center.
* Paginated inventory sync from Bosta.
* Order sending via bulk action, single order action, and auto-sync.
* SKU availability check before sending orders.
* Inbound webhook for order status updates.
* Admin dashboard with order stats and order table.

== External Services ==

This plugin connects to the Bosta Fulfillment Center API to sync products, update inventory quantities, and send orders for fulfillment.

**What data is sent and when:**

* **Product sync** — product name, SKU, and stock quantity are sent to Bosta when you click "Sync Products".
* **Inventory sync** — the plugin fetches current stock levels from Bosta when you click "Sync Quantity"; no customer data is transmitted.
* **Order fulfillment** — when an order is sent (manually or via auto-sync), the following order data is transmitted: customer name, phone number, email address, shipping address, order total, product SKUs and quantities, and a webhook callback URL for status updates.


The Bosta Fulfillment API is operated by Bosta. Please review their policies before use:

* [Bosta Privacy Policy](https://bosta.co/privacy-policy)

== Upgrade Notice ==

= 1.0.0 =
Initial release.
