# ecforce integration

> STEP 2-3

## 1. Issue an API authentication token in ecforce

1. Sign in to the ecforce admin

2. Go to Change settings > Members / permissions > Manage members and click **Configure**

3. Create a user for the API connection with the **Create** button

   ※For the role, choose one that has API access enabled, such as admin.

   ![The ecforce member creation screen. Choose a role with API access enabled.](images/02c_ecforce-member-create.png)

4. Go back to the member management screen and search for the user you created in step 3

5. Click **Details** for the API connection user in the search results

   ![The member management search results. Click Details for the API connection user.](images/02c_ecforce-member-detail.png)

6. On the details screen, click **Update** under **API authentication token**

   ![The API authentication token section of the details screen. Click the Update button.](images/02c_ecforce-token-update.png)

7. An API authentication token is issued. Copy the value.

◼️Reference: [How do I create a user for API connections and issue an authentication token (access token)? (ecforce support, in Japanese)](https://support.ec-force.com/hc/ja/articles/4411457389593)

## 2. Enter the keys in Recustomer

![The ecforce integration settings screen (authentication tab).](images/02c_ecforce-key-overview.png)

1. In Recustomer, go to Settings > External service integrations > Integrations > ecforce

   ![Clicking ecforce in the list of integrations.](images/02c_ecforce-service-click.png)

2. Enter the domain and the authentication token, then click **Authenticate**

   ![The ecforce integration settings. Enter the domain and authentication token, then click Authenticate.](images/02c_ecforce-auth-input.png)

   | Field | Value to enter |
   | --- | --- |
   | Domain | Enter your ecforce domain. It is part of the URL you see when signed in to the ecforce admin. Example: for https://sample.ec-force.com/admin, the domain is "sample.ec-force.com" |
   | Authentication token | Enter the API authentication token you copied in step 7 of section 1 |

3. The setup is complete when the status changes to **Authenticated**

   ![Setup is complete when ecforce shows the Authenticated status.](images/02c_ecforce-authenticated.png)

## 3. Order status mapping

1. Go to Store settings > External service integrations > select ecforce > Authentication > Order status mapping, and map Recustomer's order statuses to ecforce's handling statuses

   ![The order status mapping screen.](images/02c_ecforce-status-mapping.png)

   > **注意: Important**
   >
   > Recustomer cannot retrieve orders whose handling status is not registered here. Make sure every handling status is registered under one of Cancelled, Preparing for shipment, or Shipped.

   | Field | What to set |
   | --- | --- |
   | Cancelled | Enter the name (in single-byte alphanumerics) of the handling status that means "cancelled" in ecforce |
   | Preparing for shipment | Enter the handling status (in single-byte alphanumerics) that means "not yet shipped" in ecforce |
   | Shipped | Enter the handling status (in single-byte alphanumerics) that means "already shipped" in ecforce |

   ※Enter one handling status per line.

▼You can see the list of handling statuses in ecforce at Change settings > Orders / subscription orders > Manage handling statuses > Configure

![The list of handling statuses in ecforce.](images/02c_ecforce-status-list.png)

## 4. Carrier mapping

1. Go to Store settings > External service integrations > select ecforce > Authentication > Carrier mapping, and map ecforce's carrier IDs to Recustomer's carriers

   ![The carrier mapping screen. For each of Yamato Transport, Sagawa Express, and Japan Post, register the ecforce carrier IDs with Add row (for example, 1 for Yamato Transport, 2 for Sagawa Express, and 3 for Japan Post).](images/02c_ecforce-carrier-mapping.png)

   > **注意: Important**
   >
   > Specify the carrier ID, not the carrier code.

▼You can see the list of carrier IDs in ecforce at Change settings > Shipping / shipping fees > Manage carriers > Configure

![The carrier management screen in ecforce. Use the values in the leftmost ID column (not the carrier code).](images/02c_ecforce-carrier-id-list.png)

## 5. Integration settings (cancellation)

※This step is required **only if you also use Cancellation**. Skip it if you use Tracking only.

1. Go to Store settings > External service integrations > select ecforce > Integration settings > Cancellation, and configure what happens on the ecforce side when a cancellation occurs

   ![The Cancellation tab of the integration settings.](images/02c_ecforce-cancel-setting.png)

   | Field | What to set |
   | --- | --- |
   | Handling status on cancellation | The delivery status applied in ecforce when Recustomer cancels the order automatically |
   | Excluded handling statuses | Handling statuses you do **not** want to accept cancellations for. If a shopper requests a cancellation and the order has one of these statuses, the cancellation is **rejected**. |

▼You can see the list of handling statuses in ecforce at Change settings > Orders / subscription orders > Manage handling statuses > Configure

![The list of handling statuses in ecforce.](images/02c_ecforce-status-list.png)
