Start Routing with Omni-Channel not working

よく分からないエラー。

#  Please reference ID: IISLGCYC. Error: Restforce::ErrorCode::InvalidType. Message: INVALID_TYPE: select id from agentwork where workitemid IN (select ^ ERROR at Row:1:Column:16 sObject type 'agentwork' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

+ [Start Routing with Omni-Channel](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000LGu4oSAD)

:::note
To access this object, [Omni-Channel](https://help.salesforce.com/s/articleView?id=sf.omnichannel_intro.htm&type=5) must be enabled.
:::

[AgentWork オブジェクト](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_agentwork.htm?_ga=2.227863192.400726015.1668574138-2077771738.1668499249)

# Could not find a properly routed case. Ensure that you've setup Omni-Channel correctly by following the requirements.

+ [start routing with omni-channel unit trailhead solution](https://developer.salesforce.com/forums/?id=9060G000000UZdTQAW)


+ [I am not able to get the "Start Routing with Omni-Channel" lab to work.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Lqrp8)

+ [Could not find a properly routed case. Ensure that you've setup Omni-Channel correctly by following the requirements.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007ZAmL7)
+ [I am unable to complete Start Routing with Omni-Channel](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000PZtCM0A1)

まずは、これが基本の回答

:::note
The issue got resolved for me after unchecking the 'Enable skill based and Direct route to agent routing' checkbox in Omni-channel settings. 

オムニチャネル設定で「スキルベースおよびエージェントルーティングへのダイレクトルートを有効にする」チェックボックスをオフにした後、この問題は解決しました。
:::

+ [Start Routing with Omni-Channel Challenge Help](https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000ITEwx)

:::note
I ran into same issue.  Have you tried unchecking the Use with Skills-Based Routing Rules within the Routing Configurations?  Routing Configurations > High-Priority Cases > Use with Skills-Based Routing Rules.  That did it for me.   Seems we had to check that box in previous module, but needs to be unchecked for this challenge.

**私は同じ問題に遭遇しました。ルーティング構成内のスキルベースのルーティング ルールで使用するのチェックを外してみましたか?ルーティング設定 > 優先度の高いケース > スキルベースのルーティング ルールで使用します。それは私のためにそれをしました。前のモジュールではそのボックスをオンにする必要があったようですが、このチャレンジではオフにする必要があります。**
:::


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/cae7296d-5052-dfa7-b9e5-b6609bf90323.png)

**解決**
+ [Problems with "Start Routing with Omni Channel" challenge](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000IPqj7)
+ [I have everything set up in Start Routing with Omni-Channel, but I do not get the notification when I change owners. Could someone help?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007BIMjx)
+ [Can not change owner of the case to a queue. Only option is to transfer to a user.](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000PX2CT)

:::note
Got the same issue here and solved by un-checking the box at: Routing Configurations > High-Priority Cases > Use with Skills-Based Routing Rules
:::

:::note
The correct answer is....

1-Under "Queue"=>"High-Priority Cases" => Ensure you have the routing configuration correctly set to: "H​igh-Priority Cases"
2-Save this setting.
3-Modify the Case to Owner = "YourName"
4-Set your status to "Available Cases" in omnichannel inbox (bottom left) - Green status is available
5-Modify the Case to  Queue= "High-Priority Cases"
6-You should receive the Case in your inbox
7-Click Accept and leave box open
8-Check your challenge to receive 500 points!
9-End
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/1acd63ef-acfb-3dd3-ad47-3c1f44b101e7.png)
https://developer.salesforce.com/forums/?id=9060G000000UUwaQAG
:::


+ ["Website is down" case won't route to me for Trailhead Challenge](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Utl8w)

:::note
For others, my solution was this:

Have only Enable Omni-Channel checked under Onmi-Channel Settings

Create new case

Change the owner to High-Priority Queue
:::



**解決できてない**
+ [Could not find a properly routed case. Ensure that you've setup Omni-Channel correctly by following the requirements.](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000IPqj7)
+ [Could not find a properly routed case. Ensure that you've setup Omni-Channel correctly by following the requirements.  ](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000ITEwx)


# エラーでなく途中の設定ができない？

+ [Start Routing with Omni-Channel - Queue won't appear on owner selection](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007bL1l4SAC)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/7599ce6e-02ad-84c0-5b67-d57cf5866a69.png)


[Not all queues displayed by default when you change Case Owner in Lightning](https://help.salesforce.com/s/articleView?id=000383730&type=1)

これは、Lightning Experience で想定される動作です。
また、これはケースの所有者をキューに変更するときに、Salesforce Classic ユーザインターフェースで見られる動作とは異なります。

+ Lightning Experience では、結果が利用可能になる前に検索語が最初に提供される必要があります。
+ 検索用語に一致する最近表示されたキューは、「インスタント結果」から選択するか、キューで完全ルックアップ検索を実行できます。

# Omni Queue

+ [Removing Active Chat Case from Omni Queue?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007YwcPC)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/f2573494-2a95-15df-3a6d-b409fc9319f6.png)

:::note
We found we needed to delete the PSR to prevent the Case from re-routing when the RT changed. 
:::