# Click and Collect Setup

This tutorial walks you through setting up, activating, and managing the **Click and Collect (C\&C)** feature end-to-end. The process covers everything from the moment a customer places an order online to the point they pick it up in-store.

{% hint style="danger" %}
The ERP Code you define must be **identical** across Commerce, Omnitron, and OMS. Keep this value consistent throughout every step below.
{% endhint %}

***

## <mark style="color:$primary;">1. Define the Shipping Option</mark>

1. Navigate to **Sales Channels > Sales Cahnnel Settings >** **Shipping Options** in Omnitron.
2. Add a new delivery method for Click and Collect.
3. Enter the **ERP Code** (use the same value you will enter in Omnitron and OMS).
4. Set the shipping rule as follows:

```json
{
  "name": "Retail Store Rule",
  "slug": "retail-store-rule"
}
```

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FYQxDCilnWa2H1M2s2jgP%2Fimage.png?alt=media&#x26;token=d717fc56-fa3b-4281-af54-4e86a6171b5d" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:$primary;">Define the Shipping Company</mark>

#### Create the Shipping Company

1. Go to **Settings > Shipping Companies** in Omnitron.
2. Create a new shipping definition for in-store delivery.
3. Fill in:
   * **Name:** Your shipping option name
   * **ERP Code:** Same value used in Commerce and OMS

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FJBz1Z3aoN8uYQzbtU9EL%2Fimage.png?alt=media&#x26;token=51957510-9e65-4410-aca0-68c138456130" alt=""><figcaption></figcaption></figure>

#### Enable Delivery from Store

1. Go to **Store Management > Stores**.
2. Open the detail page of each store you want to enable for C\&C.
3. Set **Delivery from Store** to `true`.

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FjIbdbvOGTH1a6xRXu5Qy%2Fimage.png?alt=media&#x26;token=c755f1bb-b651-40da-aa28-0026d20db63a" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:$primary;">Configure OMS</mark>

#### Create the Shipping Definition

1. Go to Akinon OMS > Settings > Shipping Management in OMS.
2. Create a new shipping definition for in-store delivery.
3. Fill in:
   * **Name:** Your shipping option name
   * **ERP Code:** Same value used in Commerce and Omnitron

<figure><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FlPjdnB0XtqdL0WKu8X3L%2Fimage.png?alt=media&#x26;token=270d2c8e-70a8-415a-8ebb-9236edfbdf76" alt=""><figcaption></figcaption></figure>

#### Set Up Scenarios

You need to choose one of the following C\&C models based on your operational needs.

**Option A — C\&C Without Transfer**

Use this model when the order is fulfilled directly from the store's own stock. If the product is not available at the C\&C store, the package will be created with an **out-of-stock (OOS)** status.

* When defining the scenario rule, add all selling stores under **Stock Location Conditions** to ensure stock is checked correctly.

**Option B — C\&C With Transfer**

Use this model when another store or warehouse provides the stock via a transfer order.

* The source store/warehouse must be included in the **Stock Location Conditions** within the transfer scenario.

#### Define Status Transitions

Set up the following status transition commands in order:

<table><thead><tr><th width="78.91015625">Step</th><th width="353.1171875">Command</th><th>What Happens</th></tr></thead><tbody><tr><td>1</td><td><code>COMPLETE_PACKAGING_WITHOUT_SHIPMENT</code></td><td>Items in "Waiting" status are picked and packaged without creating a shipment record.</td></tr><tr><td>2</td><td><code>READY_FOR_PICKUP</code></td><td>The package is marked as ready. The order item status in Omnitron updates to <code>ready_for_customer_pickup</code>, triggering a notification (email/SMS) to the customer.</td></tr><tr><td>3</td><td><code>SELF_SERVICE_PACKAGE_DELIVERY_COMMAND</code></td><td>Executed when the customer picks up the product in-store. The package is marked as delivered.<br><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FREkktLVRi49N9JbSZans%2Fimage.png?alt=media&#x26;token=322dd4cb-9cab-45aa-87b3-acfaa06c34a3" alt=""></td></tr></tbody></table>

{% hint style="info" %}
When defining these transitions, add the **"Only Click And Collect Orders"** condition to prevent these commands from being applied to regular (non-C\&C) orders.

![](https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FrLpoCBoUJ8iNxy8tpDgW%2Fimage.png?alt=media\&token=b35294dd-ccac-4873-8033-265e865338d5)
{% endhint %}

***

## <mark style="color:$primary;">Pre-Packaged C\&C (Optional)</mark>

Use this model when neither the store's own stock nor a transfer order is used. Instead, the package is shipped pre-packed to the pickup store via a carrier, arriving ready for customer pickup.

#### Enable the Required Settings

* In **OMS**, set the `PRE_PACKAGE_CLICK_AND_COLLECT` ApplicationSetting to `true`.
* In **Instore**, set the `config_has_cc_order_filter` UISetting to `true`.

#### Status Transition Flow

<table><thead><tr><th width="82.88671875">Step</th><th width="339.9765625">Command</th><th>What Happens</th></tr></thead><tbody><tr><td>1</td><td><code>COMPLETE_PACKAGING</code></td><td>Items in "Waiting" status are picked, packaged, and a shipment record is created.</td></tr><tr><td>2</td><td><code>SHIP_THE_PACKAGE</code></td><td>The package is handed off to the carrier for delivery to the pickup store.</td></tr><tr><td>3</td><td><em>(Automatic)</em></td><td>Carrier tracking tasks update the package status to <strong>Ready For Customer Pickup</strong> once it arrives at the destination store. The customer is notified.</td></tr><tr><td>4</td><td><code>SELF_SERVICE_PACKAGE_DELIVERY_COMMAND</code></td><td>Executed when the customer picks up the product in-store. The package is marked as delivered.<br><img src="https://3333414532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIbwGN7KwvYi0iLbjtnXz%2Fuploads%2FconBWHxHMmdJx75RtTdY%2Fimage3.png?alt=media&#x26;token=48448abd-2ac0-4989-ac7c-91e8b45066b3" alt=""></td></tr></tbody></table>
