OmniStudio ：　エラーのまとめ

[OmniStudioのまとめページに戻る](https://qiita.com/Keiji_otsubo/items/c1e3b177c56e87ff41f7)

--------------
+ [activating a deployed Omniscript](https://qiita.com/Keiji_otsubo/items/563398546c5d5b06b253)





+ [OmniStudio インストールエラー](https://qiita.com/Keiji_otsubo/items/c7c49195414cf7ad1801)
+ [Error Handling in Integration Procedures](https://help.salesforce.com/s/articleView?id=sf.os_error_handling_in_integration_procedures_55179.htm&type=5)

+ [【未解決】An unknown error stopped us from finishing your OmniStudio data migration for organization ID 00D8dXXXXXXXXXX. Contact Salesforce Customer Support for help.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000NF4rn)
+ [OmniStudio and Custom Lightning Web Components](https://qiita.com/Keiji_otsubo/items/456393edb490ddee4161)

+ [Has anyone encountered an error on omniscript related to step?](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000JeFMY)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/a5558efe-cdec-e0cc-c679-68e03df75e87.png)

Yours might be the same issue I was seeing with the OmniScript designer starting this week. This is what support told me:

To fix the OS designer Issue, perform below:  
1. Setup -> Session Settings --> disable LWS or Lightning Web Security  
1. 2. Make sure you do a hard refresh (clear browser cache)   It still uses legacy locker for security.


+ [omn​​iscript ステップでフィールドが整列されていません](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000K1dLN)

何がしたかったのかは、正直なところさっぱり理解できません。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/b580f69d-22ce-c4d1-7995-4c7fbac54bd0.png)

+ [Flexcard テキスト要素のプロパティが読み込まれない?](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000JeNtA)

:::note
私も同じ問題を抱えていました。この記事の手順に従ってみてください。私の組織ではうまくいきました。  https://help.salesforce.com/s/articleView?id=000393105&type=1
:::

+ [Omnistudio でのテキスト要素のプロパティ タブの読み込みに関する問題。](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000JeOtL)

:::note
Basically, there appears to be a conflict with a feature in settings called "Use Lightning Web Security for Lightning web components" . Disabling this feature, then clearing browser cache made everything work like a charm.

基本的に、「 Lightning Web コンポーネントに Lightning Web セキュリティを使用する 」という設定の機能と競合しているようです。この機能を無効にしてからブラウザのキャッシュをクリアすると、すべてがうまく機能します。
:::

+ [Hello everyone, I would like your help, I'm trying to call a FlexCard into an Omniscript and I'm getting this error](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000O5m9N)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/87dc2e6b-5df2-de0a-3327-e390d2e2e1f6.png)

:::note
 however the solution to my problem was just to enable omniscript support, I forgot to enable it. Now it's working.

 ただし、私の問題の解決策はオムニスクリプトのサポートを有効にするだけでした。有効にするのを忘れていました。今は機能しています
:::

+ [(This Page has an error. You might just need to refresh it. [PromiseRejection: toIndex=401])](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000JgCfw)

同じ原因かと思ったが違うとのこと。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/d345a0cb-7033-2b9f-c779-856d92006176.png)

+ [Omni-channel Supervisor Tab Not Visible](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A93MM)

:::note
In the Set Up the Service Console module, in the Set Up Web Chats for Your Console unit,   under the  Get an Inside View with Omni Supervisor missing from the instructions is the profile edit.

1. Click the App Launcher and select Ursa Major Solar Service Console.
2. Click the dropdown next to the object (Accounts, Cases, etc.) at the top of the console, and click Edit.
3. Click Add More Items.
4. Click the plus next to Omni Supervisor, and click the Add 1 Nav Item button.
5. Click Save.
6. Choose Omni Supervisor from the Navigation Items dropdown in the Console.
7. Note all the features available to managers when viewing Omni-Channel support information, divided up into three tabs: Agents, Queues Backlog, and Assigned Work.

The Omni Supervisor will not appear on the navigation bar unless you edit your system admin profile tabs to Default On from Tab Hidden for Omni Supervisor.  
:::

+ [OmniStudio Permissions for Non-Admin Users?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V0000797uPD)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/9e5d8f0c-eca5-9317-84e1-0d990325d8c6.png)

+ [Omniscript on Community Page Issue](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007CrrO5)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/afd7239e-92bc-b360-0d79-746295655604.png)

:::note
found the answer, 

+ We need to create a sharing rule for omni process, 
+ All omni and vlocity sharing settings should be read only minimum not private,
+ Guest user profile we have to assign all custom classes and omni-related visual pages and apex classes.
+ Sharing Rule has to be created for your guest user profile 
+ System permission should be given in the profile
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/dfb715e3-7049-4632-3d7c-e157a9a4a497.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/406c2695-ef4b-7b1b-4dd9-dfe9f015f39a.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/2eee2359-ee56-3980-bfdb-6357ac122dfa.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/362bd016-9eba-fd9d-8e6d-f228cd0a54df.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/4e1e32f9-eaa9-96d5-71a6-b3e4395f826e.png)
:::

+ [Peculiar behaviour installing Summer 23 Omnistudio installed package](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Dv2GX)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/ea2bebe4-ecfc-7c8d-5cda-ddc007bcb42f.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/42af6dc9-8c32-21f4-955a-b0124fa6d7f9.png)

:::note
Setup > Session settings :

Disable "Lock sessions to the IP address from which they originated" 
:::

+ [The object type you specified OmniUiCard is invalid.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Al0FK)

:::note
Please check this article.

Install OmniStudio Package in Salesforce Enterprise Edition Q/A
https://help.salesforce.com/s/articleView?id=000393036&type=1
:::



+ [Omni Studio - Integration Procedures - "Error in executing IP Rest Action"](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000R9cI7SAJ)

:::note
Can you add this rollback setting, if you haven't already

1. From your Salesforce org, click Setup and go to Omni Interaction > Configuration.
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/7df18308-9c38-d582-233d-c5f2c8cef25e.png)

Enable RollbackIPChanges.

+ From the list, edit RollbackIPChanges. (create new if not listed)
+ Change the value to true, and save.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/4d917c65-bccf-06f2-4194-ad627a7b647e.png)
:::

+ [オムニスクリプト > アクション ブロック: Apex クラスをロードできませんでした](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007PvcUp)
+ [Omni channel deploy flow error](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T5bIy)


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/147f019a-1683-6f25-953d-0b3170d3f811.png)

:::note
Looks like Ant setup issue. Update the Lib path update.

Ant のセットアップの問題のようです。 Lib パスの更新を更新します。
:::

+ [フローのデバッグでは機能しますが、アクティブ化すると、フローは実際にはレコード内に関連するものを何も表示しません。](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007ZBsWO)

:::note
 where is the Omni flow being invoked from? Omni-flows do not just run when omni-channel is being used. They need to be specified in the configuration in setup or called as a subflow from a record triggered flow. Have you specified this flow in any configuration?

For Example in my playground under messaging I can specify an Omni-flow for routing the messaging sessions, but without specifying it here an omni-flow won't run.

オムニフローはどこから呼び出されますか?オムニフローは、オムニチャネルが使用されている場合にのみ実行されるわけではありません。これらはセットアップの設定で指定するか、レコードによってトリガーされたフローからサブフローとして呼び出す必要があります。何らかの構成でこのフローを指定しましたか?

たとえば、メッセージングの下のプレイグラウンドでは、メッセージング セッションをルーティングするためのオムニフローを指定できますが、ここで指定しないとオムニフローは実行されません。
:::


+ [Omni Supervisor Error -## Omni-Channel: error while retrieve supervisor skills](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Ut7d4)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/28f5cdef-25d3-03bb-2d82-034b58c58f0d.png)

:::note
I just discovered that I don't get the error when Skills-based routing is turned on, even though we are not using Skills-based routing. I suppose it doesn't hurt to have it turned on even if it won't be used but it is an odd work-around. 

スキルベースのルーティングを使用していないにもかかわらず、スキルベースのルーティングがオンになっているとエラーが発生しないことに今気づきました。使用しない場合でもオンにしておくのは問題ないと思いますが、これは奇妙な回避策です。
:::

+ [Omni-channel Max Capacity Exceeded](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UvLKl)


# Omniscript Step Select 要素に動的オプションを入力できません

+ [Unable to populate Omniscript Step Select element with dynamic options](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000JdTnI)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/147868dc-137d-55ea-b79a-4c11948f3a6b.png)

:::note
I have no idea what was wrong. It seemed to need a reset of some sort? I decided to change the capacity from 5 to 4, just to test if it would adhere to a lower number, and it did. And then I changed it back to 5 and it worked. 

何が間違っていたのか分かりません。何らかのリセットが必要なようでしょうか？より低い数値に従うかどうかをテストするために、容量を 5 から 4 に変更することにしました。そして、その通りになりました。そして、それを 5 に戻しましたが、うまくいきました。
:::

:::note
If you have any namespace in the org you need to call the class like Namespace.ClassName 
:::

:::note
Answer: To populate the dynamic Select options using Apex and input map is a known issue to the Product Team. In order to populate the dynamic Select options, we need to use the custom lwc.


回答: Apex と入力マップを使用して動的選択オプションを設定することは、製品チームの既知の問題です。動的な選択オプションを設定するには、カスタム lwc を使用する必要があります。
:::

# Update failed. First exception on row 0 with id 00PHv000000Lt9KMAS; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []

+ [未解決Saved omniscript access issue](https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000JfCwb)


# SyntaxError: Unexpected token '<', "!DOCTYPE"...is not a valid JSON at JSON.parse in community portal

+ [SyntaxError: Unexpected token '<', "!DOCTYPE"...is not a valid JSON at JSON.parse in community portal](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000LGWXM)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/79be303d-2d99-84ff-9df0-25db071d96af.png)


:::note
No I was not. It seems to be an issue from vlocity to omnistudio upgrade but it works for me during runtime after publishing the experience cloud.

いいえ、そうではありませんでした。これはvlocityからomnistudioへのアップグレードに問題があるようですが、エクスペリエンスクラウドを公開した後のランタイム中には問題なく動作します。
:::

# error 500

+ [How to resolve error when executing Omniscript for partner user?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007KXXaWSAX)

:::note alert
Error {"status":500,"body":{"exceptionType":"System.ListException","isUserDefinedException":false,"message":"List index out of bounds: 0","stackTrace":"(System Code)"},"headers":{},"ok":false,"statusText":"Server Error","errorType":"fetchResponse"} Please contact your Salesforce Administrator.
:::

:::note
We managed to resolve it through sharing settings. Changing internal and external user permissions to "Public Read Only" on the following objects:

Omni DataPack, Omni Data Transformation, Omni Electronic Signature Template, Omni Process, Omni Process Transient Data, OmniScript Saved Session,  Omni UI Card. 

共有設定で解決できました。次のオブジェクトに対する内部および外部のユーザー権限を「パブリック読み取り専用」に変更します。

Omni DataPack、Omni Data Transformation、Omni 電子署名テンプレート、Omni Process、Omni Process Transient Data、OmniScript 保存済みセッション、Omni UI カード。
:::

+ [【未解決】We couldn't save the response. Add your form to the Omni Assessment Task record page and try again.","stackTrace](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V000076C1Af)

:::note alert
{"status":500,"body":{"exceptionType":"System.UnexpectedException","isUserDefinedException":false,"message":"We couldn't save the response. Add your form to the Omni Assessment Task record page and try again.","stackTrace":"(System Code)"},"headers":{},"ok":false,"statusText":"Server Error","errorType":"fetchResponse"}
:::

# {"status":500,"body":{"exceptionType":"System.ListException","isUserDefinedException":false,"message":"List index out of bounds: 0","stackTrace":"(System Code)"},"headers":{},"ok":false,"statusText":"Server Error","errorType":"fetchResponse"}

+ [Error when clicking TEST TEMPLATE button in Vlocity Document Template Page](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000PkbiB)

:::note
 I observed the omniscript behind the button was inactive.

 ボタンの背後にあるオムニスクリプトが非アクティブであることがわかりました。
:::


# 関数

+ [SPLIT Formula in Omniscript.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Fzb6GSAR)

```
STRING(SPLIT(%FirstName%, '*',1))
```

# トレイルヘッド

+ [Omni Supervisorがみつからない](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Tsorq)