# Connect Shopify

> Install the NinjaBuy app, link your account, map your variants and let Shopify send us the orders for the products we ship.

Source: https://www.ninjabuy.com/business/docs/channels/shopify

Install the NinjaBuy app and NinjaBuy becomes a shipping location in your store. Shopify sends us the orders for the products we ship, from your storefront and from every marketplace you connect to Shopify, and we send the tracking back.

## How it works

NinjaBuy works in Shopify the way a fulfillment warehouse does. The app adds a location called **Fulfilled by NinjaBuy**. Products you set to ship from that location are ours to fulfil: when one sells, Shopify sends us a fulfillment request for those lines, and everything else on the order stays with you. The app only sees the work Shopify assigns to our location, never the rest of your orders.

Because Shopify is the hub, the same app also carries orders from eBay, Amazon, TikTok Shop and the other channels you connect to Shopify with their own apps. See selling elsewhere through Shopify.

## Before you start

- A Shopify store, and a staff account on it that may install apps.
- A NinjaBuy Business account. If you don't have one yet, [contact sales](https://www.ninjabuy.com/business#contact).
- Money in your NinjaBuy balance for the first orders. See [Add money to your balance](https://www.ninjabuy.com/business/docs/getting-started.md#balance).

## Install the app and link your account

1. Install NinjaBuy in your Shopify admin

   Shopify lists the permissions the app asks for and installs it once you approve. There is no separate sign-up page in between.

2. Open **Apps** → **Fulfilled by NinjaBuy**

   The app opens inside your Shopify admin. On the first visit it registers the **Fulfilled by NinjaBuy** location in your store.

3. Choose **Link account**

   A NinjaBuy page opens at `ninjabuy.com/connect/shopify` with a one-time code that is good for 30 minutes. Sign in to your NinjaBuy account there and confirm. If the code runs out, choose **Link account** again for a fresh one.

4. Back in Shopify, the app shows your store as linked

> One store, one NinjaBuy account
>
> Linking moves a store to the account that confirms the code, even if it was linked to another NinjaBuy account before: the code proves you run the store. The NinjaBuy page tells you when that will happen. Until a store is linked, we turn down every order Shopify sends and say why.

## Map your products

Each Shopify variant we ship needs to know which supplier listing to buy. There are two ways to set that up.

### New products: push them from the importer

Analyse a product link in the [importer](https://www.ninjabuy.com/business/docs/importer.md) and choose **Push to Shopify**. The product arrives as a draft, already mapped and already set to ship from **Fulfilled by NinjaBuy**. Check it and make it active.

### Products you already sell: map them in the app

1. Find the variant in the app's Products list

   Variants without a listing show **Not mapped**.

2. Paste the listing's link

   Any product link. We read the listing and its variants.

3. Pick the SKU it should buy

   Choose from the variants we read, such as the colour and size. A SKU we haven't read can't be mapped, so a typo never sends us shopping for the wrong thing.

4. Set **NinjaBuy units per item**

   How many of the seller's units make one of yours. A pack of 3 on your store, made of single cups from the seller, is 3.

5. In Shopify, set the product to ship from **Fulfilled by NinjaBuy**

   On the product, under inventory, stock it at the NinjaBuy location. Shopify only sends us orders for products stocked there.

## What happens to an order

1. Shopify sends us a fulfillment request

   For the lines stocked at **Fulfilled by NinjaBuy**. It appears in the app under **Orders sent to NinjaBuy**.

2. We accept it, or turn it down with a reason

   We accept a request when every line on it is mapped. If one isn't, we reject the request and the rejection names the lines, so you can map them and request fulfillment again.

3. We pay from your balance and buy

   The goods, the intake fee and the flat tax come out of your balance. See [Fees](https://www.ninjabuy.com/business/docs/fees.md).

4. We check it, pack it in your box and ship it

   The QC photos are on the order in your NinjaBuy account before it leaves. See [Packaging and QC](https://www.ninjabuy.com/business/docs/packaging-and-qc.md).

5. The tracking lands on the Shopify order

   We create the fulfillment in Shopify with the tracking number and link and ask Shopify to notify your customer, so they get your store's usual shipping confirmation email.

> Cancelling from Shopify
>
> If your customer cancels, cancel the fulfillment in Shopify as usual. We grant the cancellation as long as the order is not yet packed into a parcel, and refuse it once it is. What is refunded depends on how far the purchase got; see [cancellations](https://www.ninjabuy.com/business/docs/orders.md#cancellations).

## Selling elsewhere through Shopify

Connect a marketplace to Shopify with its own app, and its orders land in your Shopify admin like any other. The ones for NinjaBuy products then reach us through this app. Each guide covers the marketplace's own rules.

| Where you sell                                                                                          | The app that connects it to Shopify |
| ------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| [eBay](https://www.ninjabuy.com/business/docs/channels/ebay.md)                                         | Shopify Marketplace Connect         |
| [Amazon](https://www.ninjabuy.com/business/docs/channels/amazon.md)                                     | Shopify Marketplace Connect         |
| Walmart                                                                                                 | Shopify Marketplace Connect         |
| [TikTok Shop](https://www.ninjabuy.com/business/docs/channels/tiktok-shop.md)                           | TikTok for Shopify                  |
| [Facebook and Instagram shops](https://www.ninjabuy.com/business/docs/channels/facebook-marketplace.md) | Facebook & Instagram                |

## What syncs

| What          | Direction          | How                                                                                                                                         |
| ------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| Orders        | Shopify → NinjaBuy | A fulfillment request for the lines at our location, as soon as the order is placed.                                                        |
| Cancellations | Shopify → NinjaBuy | Granted until the order is packed into a parcel.                                                                                            |
| Tracking      | NinjaBuy → Shopify | A fulfillment with the tracking number and link; Shopify emails your customer.                                                              |
| Stock         | NinjaBuy → Shopify | The quantity at **Fulfilled by NinjaBuy** follows the seller's stock, by your [sync rules](https://www.ninjabuy.com/business/docs/sync.md). |
| Price         | NinjaBuy → Shopify | Repriced or paused when the cost moves, by your sync rules. Prices you set by hand stay until a rule changes them.                          |
| Products      | NinjaBuy → Shopify | Pushed from the importer as drafts. Titles, photos and descriptions are yours to edit afterwards.                                           |

## Your store, your rules

Your customer buys from you, not from us, so the store's promises are yours. A few weigh more when the goods ship internationally.

- State a delivery time you can keep

  In the US, the FTC expects a reasonable basis for any shipping time you state, and a way to cancel when you can't meet it. Count buying, checking and international shipping.

  [The FTC's mail order rule](https://www.ftc.gov/business-guidance/resources/business-guide-ftcs-mail-internet-or-telephone-order-merchandise-rule)

- Say who pays import duties

  Your customer's country may charge duties or taxes when the parcel arrives. Say so on your store, so nobody is surprised at the door.

- Write returns for international parcels

  An international return often costs more than the item. Decide what you refund and what you take back before you list. See [returns](https://www.ninjabuy.com/business/docs/orders.md#returns).

## Uninstalling and your customers' data

- Uninstalling the app ends our access to your store at once. We keep the link to your NinjaBuy account and your mappings, so a reinstall picks up where you left off.
- Orders we already accepted still ship. Without access we can't write their tracking to Shopify, so reinstall before they leave, or copy the numbers from your NinjaBuy account.
- When Shopify asks us to erase a store's or a customer's data, we delete the buyer addresses we hold for it.

## Troubleshooting

| What you see                                      | Why                                                                                                        | What to do                                                                                                                                                           |
| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Shopify shows the fulfillment request as rejected | A line on the order is not mapped to a NinjaBuy listing. The rejection names the lines.                    | Map those variants in the app, then request fulfillment again from the Shopify order.                                                                                |
| The order never reached NinjaBuy                  | The product ships from another location, so Shopify sent the order there instead.                          | In Shopify, set the product to ship from **Fulfilled by NinjaBuy**. Orders placed before the change stay where they were sent.                                       |
| The order shows as held                           | Your balance could not cover it. We never buy on credit.                                                   | Top up; held orders go ahead on their own. See [held orders](https://www.ninjabuy.com/business/docs/orders.md#held-orders).                                          |
| No tracking on the order yet                      | Tracking goes back only once the parcel has left our warehouse.                                            | Check the order's step in your NinjaBuy account. Once it shows Shipped, the number is on the Shopify fulfillment.                                                    |
| A cancellation was refused                        | We grant a cancellation until the order is packed into a parcel. After that, it is already on its way out. | Ask us from the order's conversation; a return is still possible in some cases. See [cancellations](https://www.ninjabuy.com/business/docs/orders.md#cancellations). |
| The app stopped answering after an uninstall      | Uninstalling drops the app's access to your store. The link to your NinjaBuy account is kept.              | Install it again and open it once. Your mappings and account link are still there.                                                                                   |
