Data Cloud in Flows


Data Cloud と Flow Builder の機能を組み合わせて、外部データを使用したプロセスを自動化します。

https://trailhead.salesforce.com/content/learn/modules/data-cloud-in-flows?trailmix_creator_id=teamtrailhead&trailmix_slug=quest-get-started-with-data-cloud-dec24-jan25

# Set Up a Custom Data Cloud Playground

```
epic.1ae21737002940242@orgfarm.th
```

この状態でフローのレコードの取得を見てみる
確かにデフォルトもない

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/fc142fab-5133-99ed-d6f2-71379ed9511a.png)


--------------

+ [Im not able to get default picklist option while doing Access Data Cloud from Flows in Data cloud in flow quest](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000KfNBI)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/8dfe30aa-2324-d928-499a-6fe7f7052f91.png)

----------------

### Data Streamsを作成する

7\. Click the DataCloudFlows Custom Data Bundle.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/6aae2182-00dd-55d7-3a11-9302fb890e56.png)

結構時間が掛かります

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/bdbdf1ed-c2af-ebf7-68f1-db6a1678f785.png)


作成した後は表示できました

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/37c539fc-9697-11e7-95de-1edf4d7153be.png)


### Create a Calculated Insight

5\. Click Activate.

:::note alert
The schedule is expired. You can remove or modify the schedule, but you can't add any new executions to the queue.

スケジュールの有効期限が切れています。スケジュールを削除または変更することはできますが、キューに新しい実行を追加することはできません。
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/9fbb1b07-6cde-a005-7d8d-1a53050f9a6c.png)

6\. For Schedule, select Not Scheduled, and click Enable.

:::note alert
If a scheduled publish doesn't complete before the next publish starts, the scheduled publish is skipped.

スケジュールされた公開が次の公開が開始される前に完了しない場合、スケジュールされた公開はスキップされます。
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/60913efa-97f0-f0f0-8cb9-8f28122e2fcf.png)

公開したけどLast Run StatusはPendingだけど...

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/ddffabac-035e-ccaa-645b-41051b2ae90c.png)

ビューを表示したらProcessingに変わった

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/a52f942e-bf13-35cf-3aa3-ac1a247484a6.png)

# Access Data Cloud from Flows

何もしないで検証ボタンをクリックする

:::note alert
We can’t find a record-triggered flow named 'Bad Review from High Loyalty Guest'. Make sure you saved the flow with 'Bad_Review_from_High_Loyalty_Guest' as the API name.
:::


アクテブ化してないけど、フローを作った後に検証ボタンを押す

:::note alert
In the TaskBody text template, we can’t find the guest’s name. Make sure you include a name field from the stored contact record.
:::

ここの設定が今一つ意味が分からん

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/e9406d6d-75ee-ccb7-c10c-ed1b913ec1b7.png)

本文: 任意のテキスト。ただし、次の内容を含める必要があります。
ゲストの名前
ゲストのロイヤルティレベル
体験の名前
レビューの評価
レビューのコメント

理解ができないので、そのままコピペしたけどエラーですね

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/8a8029d8-0a41-c019-bc8d-6dcb975be552.png)


:::note alert
In the TaskBody text template, we can’t find the guest’s name. Make sure you include a name field from the stored contact record.
:::

これみたい

+ [In the TaskBody text template, we can’t find the guest’s name. Make sure you include a name field from the stored contact record.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007iftQpSAI)

:::note
Review this solution, it solved for me

```
{!$Record.Comments__c}
{!$Record.Rating__c}
{!$Record.Experience_Name__c}
{!GuestLoyaltyLevel}
{!Get_Contact.Name}
```
:::

しかし、違うエラーですね。

:::note alert
In the Create Task element, we can’t find a field value that sets 'OwnerId' to 'Experience from Get_Experience > OwnerId'.

タスクの作成要素で、「OwnerId」を「Experience from Get_Experience > OwnerId」に設定するフィールド値が見つかりません。

:::

ああ、ここも英語が理解できんかった

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/74956cf5-4db7-8602-320f-1e68d5ff5d68.png)

Assigned To ID: Experience from Get Experience > Owner ID (not Owner ID (User) or Owner ID (Group))



![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/319f25f9-9c79-364c-0f61-50ac4e13df25.png)

普通にownerIdで良かったみたい

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/01ea8f6c-e963-f722-4707-79f181b2cecc.png)

# Trigger Flows from Data Cloud

お約束の何もしないで検証ボタンをクリック

:::note alert
We can’t find a Data Cloud-triggered flow named 'Reservation Canceled - Cancel Bookings'. Make sure you saved the flow with 'Reservation_Canceled_Cancel_Bookings' as the API name.
:::


Enable the Recipient ID field, and select Contact from Get Contact > Contact ID.

入力できｎ

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/4f21b874-867b-a053-2a4a-c89ec57e57b1.png)

このアクションを削除して再度作成する必要があった

指示にしたがってフローを２つ作ったあとに検証ボタンをクリック。
このかんじだとこの部分は関係ないみたい

>Prework
If you haven’t completed unit 1, do that now. Otherwise, you won't be able to complete this challenge.

って書いてあるけど

:::note alert
We can’t find a Data Cloud-triggered flow named 'Reservation Canceled - Cancel Bookings'. Make sure you saved the flow with 'Reservation_Canceled_Cancel_Bookings' as the API name.
:::



有効化せずに検証ボタンをクリック

:::note alert
In the Get Bookings element, we can’t find a condition requirement for 'Date__c Greater Than or Equal $Record > Check_in_Date_c__c'.


Get Bookings 要素で、「Date__c Greater Than or Equal $Record > Check_in_Date_c__c」の条件要件が見つかりません。
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/11e06581-24af-c61f-4130-b8fd9f1c8cfd.png)

あああ　等しいになっている

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/91739d29-bdf3-00b2-1911-5621e7dd332a.png)

:::note alert
We can’t find the 'Cancel_Bookings' element on the After Last path.
:::

うん？　ああ場所が違うな

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/4b65272b-cec8-1c63-86f9-657fffe80996.png)

ループの外ですね

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/45ed0930-a515-834a-a8a8-753f16d4378a.png)

-------------------

# In the start element of the Reservation Canceled - Cancel Bookings flow, we can’t find a condition requirement that Reservation_Status_c__c is Equal to Canceled

+ [am stuck on Trigger Flows from Data Cloud and getting a error and trying to fix it](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000MXHJe0AP)

:::note
i had help fixing it and found out it was due to a Field value   (There was an extra space). 
:::

# it couldn't find any matching resources 

+ [Enhance Agentforce to Act on Data with Conversational Language](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000KBmw3)

:::note
I missed editing Reservation 1 element due to which Activate button was disabled. Post updating Reservation 1 followed by Event Summary element fixed the issue for me.
:::