# Shopify ⛭

## Instructions

We've provided a video, simulator, and written walkthrough of how to connect your Shopify Cart.

### Video instructions

{% embed url="<https://salesorder.wistia.com/medias/osgfs07ofi>" %}
Video walkthrough of how to connect your Shopify Cart.
{% endembed %}

### Simulator instructions

{% @storylane/embed subdomain="app" linkValue="enguhl0ppjbt" url="<https://app.storylane.io/share/enguhl0ppjbt>" fullWidth="true" %}

To view this demo in full screen, click [here](https://app.storylane.io/share/enguhl0ppjbt).&#x20;

### Written instructions

### 1. Log in to the Admin on your Shopify Cart

Go to https\://<mark style="color:orange;">YourCartName</mark>.shopify.com/admin and log in.

### **2. Create a new 'App' in Shopify**

Click on <mark style="color:orange;">Apps></mark>, notice the last option in the dropdown ' <mark style="color:orange;">Apps and sales channel settings</mark>', click on this.

<div align="center"><figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FEUfqGdwsPWeB9JTii5Ov%2Fimage.png?alt=media&#x26;token=096c5688-5661-43aa-9995-d6b41d9740ac" alt=""><figcaption></figcaption></figure></div>

You'll be presented with a screen like this.

<div align="center"><figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FNA2Tj03u6QUzZ7KHJRrh%2Fimage.png?alt=media&#x26;token=b1bac19b-0d36-4693-bd20-c214e18e1d3d" alt=""><figcaption></figcaption></figure></div>

In the top right-hand corner of the screen, click on <mark style="color:orange;">Develop Apps</mark>.

{% hint style="info" %}
Don't worry, you definitely don't have to be a developer (programmer) to do these next steps :-). You're just going to click on some checkboxes (phew).
{% endhint %}

You'll be taken to the screen below.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FRJ0bYJqQiVcb8fL3venq%2Fimage.png?alt=media&#x26;token=c5529929-3170-4382-863a-499cf3ee3cde" alt=""><figcaption></figcaption></figure>

Click on <mark style="color:orange;">Create an app</mark>

You'll be taken to this screen&#x20;

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2F7oMFOeS6sMkbcufVYTHF%2Fimage.png?alt=media&#x26;token=55f8779a-3464-4f28-8e22-d37df3bef07d" alt=""><figcaption></figcaption></figure>

Enter a memorable name in the '<mark style="color:orange;">App name</mark>' field, e.g. SOconnect. You'll enter this name later into a field in your Salesorder system. Write or record this somewhere safe.

Now click <mark style="color:orange;">Create app</mark>.

You'll be taken to this screen.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FW1HDprbFNOJ8XmYcE4CC%2Fimage.png?alt=media&#x26;token=037be5b3-8034-47e6-98ac-0b22585e2da7" alt=""><figcaption></figcaption></figure>

Now click on '<mark style="color:orange;">Configure Admin API scopes</mark>'.

### 3. Set the Admin API access scopes

Go to <mark style="color:orange;">Settings>Apps and Sales Channels</mark>

{% hint style="info" %}
Notice the Admin API access scopes is a scrollable window.
{% endhint %}

Set the Admin API access scopes as follows:

#### 3.1 Assigned fulfillment orders

Check the <mark style="color:orange;">boxes</mark> as shown below.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2F0GbqjS3FtEB5iPHHUBdh%2Fimage.png?alt=media&#x26;token=0b363076-6a7b-4d0b-ade1-8453246a9f07" alt=""><figcaption></figcaption></figure>

Scroll down the 'Admin API access scopes'.&#x20;

#### 3.2 Customers

Check the <mark style="color:orange;">boxes</mark> as shown below.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FvvmWFZ5KFiGEZaW1ZCx3%2Fimage.png?alt=media&#x26;token=5e6e3fcb-a84b-427a-96d0-d8fa577a4be7" alt=""><figcaption></figcaption></figure>

Scroll down the 'Admin API access scopes'.&#x20;

#### 3.3 Fulfillment services

Check the <mark style="color:orange;">boxes</mark> as shown below.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FzIifcvYlDo2M1g3OinGa%2Fimage.png?alt=media&#x26;token=9e4093c8-77e0-4934-80ef-2aae78a6f4d2" alt=""><figcaption></figcaption></figure>

Scroll down the 'Admin API access scopes'.&#x20;

#### 3.4 Inventory&#x20;

Check the <mark style="color:orange;">boxes</mark> as shown below.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FeqmwaVOv58j3aQwUJh3t%2Fimage.png?alt=media&#x26;token=a67f2ee2-c3d2-42c6-afe8-651b9e3b6bf9" alt=""><figcaption></figcaption></figure>

Scroll down the 'Admin API access scopes'.&#x20;

Check the <mark style="color:orange;">boxes</mark> as shown below.

#### 3.5 Orders

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2F83kyjNgUTjbj0V5bSC26%2Fimage.png?alt=media&#x26;token=5f22bed4-b746-4f3a-907b-0ee56b00db77" alt=""><figcaption></figcaption></figure>

Scroll down the 'Admin API access scopes'.&#x20;

Check the <mark style="color:orange;">boxes</mark> as shown below.

#### 3.6 Product Listings and Products

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FyKAJ1CLtthwvBM14Gjqp%2Fimage.png?alt=media&#x26;token=40ee7627-c569-4b6d-b3ab-4114fa0f5962" alt=""><figcaption></figcaption></figure>

#### 3.7 Save your Settings&#x20;

Notice, just below Admin API access scopes, you should have **10 settings selected**.

Top right-hand corner - <mark style="color:orange;">black Save button</mark>.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FE0KAKOhORojFh96MjyOL%2Fimage.png?alt=media&#x26;token=9b6c6b85-02bc-4f38-bd68-a132a1b6b496" alt=""><figcaption></figcaption></figure>

Shopify will display 'Configuration Saved'.&#x20;

### 4. Retrieve the API 'key' details from Shopify

Now click on '<mark style="color:orange;">API credentials'</mark> (underlined), and you'll see this screen.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FDwirJAZrCQmkH3JaxlyO%2Fimage.png?alt=media&#x26;token=fc4b6a9e-4f84-4e88-954f-153ef819cdc4" alt=""><figcaption></figcaption></figure>

Notice the '<mark style="color:orange;">Install App</mark>' button in the <mark style="color:orange;">Access Tokens</mark> area in the center of the above screen.

You'll see this screen.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FBFtN182iVEfKoK6Y0zgG%2Fimage.png?alt=media&#x26;token=d99103eb-2cde-4ff1-9f1e-b1344e43e79d" alt=""><figcaption></figcaption></figure>

Click the black '<mark style="color:orange;">Install</mark>' button.

You'll see this screen.

<figure><img src="https://2650739216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnVmamp3TnQON29mRg6Hg%2Fuploads%2FffP450jNqzfxJ924RbPZ%2Fimage.png?alt=media&#x26;token=9f308ef5-1535-4372-b2b8-47a5a1675a80" alt=""><figcaption></figcaption></figure>

Click <mark style="color:orange;">'Reveal token once'</mark>.&#x20;

{% hint style="danger" %}
**Be very careful here.** You will only see this 'Admin API access token' ONCE.&#x20;

Copy the token (Ctrl C) and paste it somewhere safe i.e. Notepad if you're using Windows. Save this file somewhere safe, i.e. SalesorderShopifyToken.txt. Alternatively, use the copy icon to the right of the Token.&#x20;

The token will look something like this.

shpat\_7099d9765590c8<mark style="color:orange;">XXXXX</mark>2c505157f2a7 (<mark style="color:orange;">XXXXX</mark> obscured for security reasons)

{% endhint %}

### 5. Create a new cart in Salesorder&#x20;

In Salesorder, go to:

&#x20;<mark style="color:orange;">Setup>Shopping Carts>Actions>New Shopify Cart</mark>

<table><thead><tr><th width="302">Field</th><th>Value</th></tr></thead><tbody><tr><td>Shopping Cart Type</td><td>Shopify</td></tr><tr><td>Cart name</td><td>Use the Shopify 'App Name' e.g. SOConnect</td></tr><tr><td>Cart Connect URL</td><td><p>Go to the address bar on your browser and copy the cart address, i.e. </p><p></p><p>https://<mark style="color:orange;">YourCartName</mark>.shopify.com/admin </p><p></p><p>adjust this to read: </p><p></p><p>https://<mark style="color:orange;">YourCartName</mark>.shopify.com/admin<mark style="color:orange;">/api/</mark></p></td></tr><tr><td>Order Prefix</td><td>Optional: Add a prefix to recognize orders in Salesorder are from Shopify. Optional</td></tr><tr><td>Item code for Shipping Costs</td><td>Optional: Create a non-stock item called 'Shipping'. When shipping costs are added on Shopify, these will be mapped over to Salesorder and will appear as 'Shipping' on the line item table. </td></tr><tr><td>Item code for Discount</td><td>Optional: Create a non-stock item called 'CartDiscount'. When discounts are added on Shopify, these will be mapped over to Salesorder and will appear as 'CartDiscount' on the line item table. </td></tr></tbody></table>

### 6. Auto sync settings <mark style="color:orange;">(for testing)</mark>

| Field                                            | Settings                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <mark style="color:orange;">**From Cart**</mark> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Status                                           | <p><mark style="color:orange;">For initial testing (now) this should be 'Stopped' (default).</mark></p><p></p><p><strong>Normal operation</strong></p><p></p><p>Either 'Stopped' or 'Running'.</p><p></p><p>When 'Running' this auto-synchronization automatically imports Orders and updates Customers and Items.</p><p> </p><p>Auto synchronization can be started when the Shopping Cart is in View or Edit mode. </p>                                                                                                            |
| **Orders**                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Import orders as                                 | <p><mark style="color:orange;">For initial testing (now) this should be set to 'Sales Orders'.</mark> </p><p></p><p>Select how Orders imported from the cart will be transformed (i.e. what Document in your Salesorder system). </p><p></p><p>Options are:</p><ul><li>Cash Sales</li><li>Sales Orders</li><li>Sales Invoices.</li></ul><p>Documents will be imported with a status of PENDING. </p><p></p><p>Cash Sales and Sales Invoices will not post to the Accounts or affect Stock until you change the Status.</p>           |
| Last order from                                  | <p><mark style="color:orange;">For initial testing (now) set this to a date in the future. You don't want to accidentally import any live orders until your integration is tested and working.</mark></p><p></p><p><mark style="color:red;">Read this:</mark> <a href="live-shopping-carts">⚠ Live Shopping Carts</a></p><p></p><p>Set the initial date/time from which you want to import Orders. Any Orders before this date will not be imported. </p><p></p><p>This value is automatically updated when Orders are imported.</p> |
| **Item**                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Enable automatic Item imports                    | <mark style="color:orange;">Leave unchecked for now.</mark>                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| <mark style="color:orange;">**To Cart**</mark>   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Items**                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Enable real time stock updates                   | <p><mark style="color:orange;">For initial testing (now), check this box.</mark></p><p></p><p>If checked, this will send real-time stock updates to Shopify i.e. if you receive Item Receipts or make adjustments in Salesorder, these changes will appear in Shopify.</p><p> </p><p><strong>Note:</strong> this function assumes there is only one location. If you have multiple locations, the updates will always apply to the stock on the first location. </p>                                                                 |
| **Shipments**                                    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Update Shipments in Cart                         | <p><mark style="color:orange;">For initial testing (now), check this box.</mark> </p><p></p><p>If checked, will update Shipment's tracking number and courier on Shopify when you ship.</p><p></p><p>See below for Cart and Salesorder order statuses.</p><p></p>                                                                                                                                                                                                                                                                    |
|                                                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

{% hint style="info" %}
**Cart and Salesorder order statuses**

&#x20;'Shipments' are 'Fulfillments'.&#x20;

* 'Fulfilled' in Shopify means 'Shipped',&#x20;
* 'Unfulfilled' means 'Not Shipped'.&#x20;
* Partial shipments are 'Fulfilled' followed by a number in brackets, e.g. if one item has been shipped the status would read as 'Fulfilled (1)'
  {% endhint %}

Save your settings.

### **7. Test cart connection**

Once you have filled in these fields, click 'Test Connection'. If successful, then you should get a message that reads:&#x20;

'TEST PASSED: SUCCESSFULLY CONNECTED TO CART!'.

### 8. Test Order Import - Add Items

{% hint style="warning" %}
You need matching Items in Shopify and Salesorder to test the Integration.
{% endhint %}

#### If your cart is a live store

You will have imported your Items into your Salesorder system when you completed the ASICS import tasks. We covered this in the Evaluation to [Launch workbook>Launch T -5.](https://helpwith.salesorder.com/shopping-carts-b2c/broken-reference)

Your Items (Stock and Non-Stock) will already exist in your Shopify cart.&#x20;

#### If your cart is a new cart with no Items

You'll need to upload some or all of your Items (Stock and Non-Stock) into your Shopify store.&#x20;

See Shopify Help [Adding and updating products](https://help.shopify.com/en/manual/products/add-update-products)

Make sure the Item you add in Shopify is added to your Item List in your Salesorder system.

See [Create](https://helpwith.salesorder.com/products-services/items-which-ones/stock-items-skus#creating-a-new-stock-item)[ a new Stock Item](https://helpwith.salesorder.com/products-services/items-which-ones/stock-items-skus#creating-a-new-stock-item).

OR

Import using the Items Import template:

<mark style="color:orange;">Setup>Import Data>Items</mark>

### 9. Enter a Test Order (Shopify)

{% hint style="info" %}
Shopify Help has a Test Orders article [here](https://help.shopify.com/en/manual/checkout-settings/test-orders). As you are testing an order, you will need to complete the order process with a payment card. The test payment details can be found in the Shopify Help article. &#x20;
{% endhint %}

{% hint style="warning" %}
Make sure your Auto-sync on the Salesorder cart settings page is set to 'Stopped'
{% endhint %}

#### 1. Create the order in your Shopify Cart

Enter an order in your shopping cart. Follow the order capture process to the conclusion. The process completes when you have entered the test payment details as described above, at the beginning of the '[Test Order - settings](#test-order-key-settings)' section.

#### 2. List and import the orders in Salesorder

Go to <mark style="color:orange;">Setup>Shopping Carts></mark>*<mark style="color:orange;">Your Shopify Cart</mark>*<mark style="color:orange;">> 'Orders (Cart)' tab.</mark>

Click '<mark style="color:orange;">List Orders</mark>'. Your order should appear in this list.

Select the order and click '<mark style="color:orange;">Import Selected Orders</mark>'.

#### Step 3 - Check the orders in Salesorder

Go to <mark style="color:orange;">Sales>Sales Orders</mark> and use the action 'List Pending Orders' to see your order.

If you have any questions or issues, contact <support@salesorder.com>.
