> For the complete documentation index, see [llms.txt](https://docs-embed.anyflow.jp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-embed.anyflow.jp/recipe/crm/salesforcenodtawosuru.md).

# Salesforceの取引先データを登録する

{% hint style="success" %}

### このレシピについて

このレシピは、[Account | Salesforce プラットフォームのオブジェクトリファレンス | Salesforce Developers](https://developer.salesforce.com/docs/atlas.ja-jp.object_reference.meta/object_reference/sforce_api_objects_account.htm) を参考に記述されています。
{% endhint %}

## **Salesforceの「取引先データ」とは**

Salesforce 上で管理される、個々の取引先（顧客、競合会社、およびパートナーなどのビジネスに関係する組織や個人）のデータです。

データ構造の詳細は、[Account | Salesforce プラットフォームのオブジェクトリファレンス | Salesforce Developers](https://developer.salesforce.com/docs/atlas.ja-jp.object_reference.meta/object_reference/sforce_api_objects_account.htm) で確認可能です。

## **Anyflow Embedで登録する**

Anyflow Embed で Salesforce の取引先データを登録する（書き込みする）手順を紹介します。

スプレッドシートにある取引先のデータを**Salesforce の取引先オブジェクトに登録する**というシンプルなソリューションを作成し、スプレッドシートに入力された取引先データを定期的に確認し、Salesforce の取引先オブジェクトして登録する方法を理解します。

<figure><img src="https://files.readme.io/93d2e3b-CleanShot_2024-06-15_at_11.57.042x.png" alt=""><figcaption></figcaption></figure>

### **1.Google Sheets トリガーを設定する**

Google Sheets トリガーをコネクタを追加します。

<figure><img src="https://files.readme.io/96e8c80-image.png" alt="" width="563"><figcaption></figcaption></figure>

「シートに新しい行が追加された際に実行」を選択します。

<figure><img src="https://files.readme.io/4d11acd-CleanShot_2024-06-15_at_13.39.332x.png" alt="" width="563"><figcaption></figcaption></figure>

以下の通りに設定を行います。「取得開始位置（行番号）」には、スプレッドシートの1行目には列名を記載するため、次の行である `2` を入力します。「ポーリング間隔」は任意の値を設定可能ですが、動作確認を容易にするために最も短い間隔である「5分」を選択します。

| 設定項目名       | 設定値           |
| ----------- | ------------- |
| スプレッドシートID  | 任意のスプレッドシートID |
| シートID       | 任意のシートID      |
| 取得開始位置（行番号） | `2`           |
| ポーリング間隔     | 5分            |
| トリガー条件      | ※ 設定不要        |

<figure><img src="https://files.readme.io/677257c-_2024-02-26_17.45.08.png" alt=""><figcaption></figcaption></figure>

「ヘッダーの列名（改行区切り）」には以下の内容を設定します。

```
名前
電話番号
ウェブサイト
```

### **2.Salesforceの「レコードを作成」アクションを設定する**

Salesforceコネクタを追加します。

<figure><img src="https://files.readme.io/7915c2e-.png" alt=""><figcaption></figcaption></figure>

「レコードを作成」アクションを選択します。

<figure><img src="https://files.readme.io/1181ec3-CleanShot_2024-06-15_at_13.53.402x.png" alt="" width="563"><figcaption></figcaption></figure>

「オブジェクト」には `Account`と入力します。Account はSalesforceにおいて取引先を表すオブジェクトです。

<figure><img src="https://files.readme.io/edda45c-CleanShot_2024-06-15_at_13.54.572x.png" alt="" width="563"><figcaption></figcaption></figure>

フィールドを以下のように設定します。

&#x20;&#x20;

<figure><img src="https://files.readme.io/81e3c05-CleanShot_2024-06-15_at_14.20.392x.png" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://files.readme.io/7653ebb-CleanShot_2024-06-15_at_14.20.032x.png" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://files.readme.io/fe3e133-CleanShot_2024-06-15_at_13.57.292x.png" alt="" width="563"><figcaption></figcaption></figure>

### **3.スプレッドシートに取引先データを入力する**

スプレッドシートを開き、1行目には列名を、2行目からは実際にSalesforceに登録する取引先データを入力します。

<figure><img src="https://files.readme.io/a3c3ac9-image.png" alt="" width="563"><figcaption></figcaption></figure>

### **4.ウィザードを設定する**

必要な認証をウィザードに追加します。

### **5.テストを行う**

テストを実行します。しばらく時間が経つと、スプレッドシートに入力したデータが処理され、Salesforceに取引先データが登録されていることがわかります。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs-embed.anyflow.jp/recipe/crm/salesforcenodtawosuru.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
