# 將電商LINE OA帳號串接到BeSparks CRM

## 將Line帳號整合到BeSparks CRM

<mark style="color:orange;">**Step 1.**</mark> 前往您的SHOPLINE電商後台，於左側列表尋找「**擴充功能>我的擴充功能」**，並在擴充功能列表中找到BeSparks CRM，並點擊最右方的下拉箭頭，選擇「APP設定」。[*還沒安裝BeSparks CRM?請參考這裡安裝*](broken://pages/i4fuEiUt3zMn2GdXF6D7)

<figure><img src="/files/Zh10J0UdvPvZe7ifGvCU" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 2.**</mark> 請確認您的LINE webhook狀態為「已啟用」，確保BeSparks CRM能正常推播訊&#x606F;**（如下圖）**

<figure><img src="/files/cl4zPavTURDmKqeSOvDX" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 3.**</mark> 進入**LINE Offical Account Manager（**[**LINE OA後台**](https://manager.line.biz/)**）（如下圖）**

<figure><img src="/files/WaDizr3QK6MiFF3DwkmB" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 4.**</mark> 點擊主畫面右上角的「設定」，並點選左側選單中的「Messaging API」，接著在Messaging API的畫面中，點擊「啟用 Messaging API」

<figure><img src="/files/8dydYGQsoGkdv0DPJ6r0" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
點擊「啟用 Messaging API」之後，需要**選擇已經建立的服務提供者，或是建立新的服務提供者（Provider）。請注意，「服務提供者名稱」應輸入您的公司名稱，請不要輸入「BeSparks」。**
{% endhint %}

<mark style="color:orange;">**Step 5.**</mark> 完成Messaging API啟用後，就會出現以下畫面，並且狀態為「使用中」

<figure><img src="/files/BBCyg7trMlTq5fKYB2Pz" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 6.**</mark> 請點擊下方的「LINE Developers」，進入以下畫面。接著點擊右上角的三個點，選擇您的LINE帳號

<figure><img src="/files/j2VO0vrIbsDtMXNo2wf0" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 7.**</mark> 進入LINE Developer後：從左側的Admin選擇Provider（服務提供者），接著於主畫面點選Channel（官方帳號），進入設定頁面

<figure><img src="/files/BZmNLPsnBM1EXHScf1mf" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 8.**</mark> 點選畫面中的「Messaging API」，滑到頁面最下方可看到「Channel access token (long-lived)」，點選token後方的「⎗」鍵即可複製代碼。

<figure><img src="/files/vEWFmCfymMBA33OTAdGd" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/bhLEiiIvVTTgSgEzTUG5" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 9.**</mark> 登入BeSparks CRM，前往設定 > 應用串接，進入下圖頁面。

請將剛剛取得的Channel Access Token貼入紅框區域後，點選左上角的「串接帳號」

<figure><img src="/files/eYpjvlWVei765LEAu3Et" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 10.**</mark> 回到Line官方帳號後台，點選畫面中的「Line Login」，請將「Channel ID」、「Channel secret」複製。

<figure><img src="/files/1zsqOysoaE4khDIIHXAb" alt=""><figcaption></figcaption></figure>

<div><figure><img src="/files/N9efuGbJ02HhmbvIqbJf" alt="" width="325"><figcaption></figcaption></figure> <figure><img src="/files/JTSabTOh7FM6mIT51b60" alt=""><figcaption></figcaption></figure></div>

回到BeSparks CRM，將剛剛取得的Channel ID、Channel secret貼入紅框區域

<figure><img src="/files/rXXguGozTKb0kqO3YNkj" alt=""><figcaption></figcaption></figure>

<mark style="color:orange;">**Step 11.**</mark> 點選右上角的「串接帳號」當視窗上方出現「串接成功」，並確認Channel Name 與 Line官方帳號ID成功跑出，就代表串接成功囉！

<figure><img src="/files/OXMxcb9ALbTiNm2GIINV" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.besparks.co/~/changes/29/besparks-crm-gong-neng-mo-zu-shuo-ming/app-setup/app-setup-lineoa.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
