您位於此處:
如何啟動 Omniscript
透過下列三種方式之一,讓啟用的 Omniscript 可供啟動:作為 Lightning 網頁中的獨立 Lightning Web 元件或 URL。
this[NavigationMixin.Navigate] 開頭的程式碼範例不適用於 Omnistudio Omniscript。已內嵌
如果您在 Lightning Web Runtime (LWR) Experience Cloud 網站上參照 Omniscript,則必須使用包含您要在執行階段載入之 Omniscript 名稱的包裝元件,如下所示。type、subtype 和 language 屬性是必要的。依預設會新增 Lightning 主題。不過,如果您想要改用 Newport 主題,請也新增主題屬性。
<namespace-omnistudio-standard-runtime-wrapper type={type}
subtype={subtype}
language={language}
theme={theme}
inline={inline}
inlinevariant={inlinevariant}
inlinelabel={inlinelabel}
direction={direction}
record-id={recordId}
prefill={prefill} >
</namespace-omnistudio-standard-runtime-wrapper>
若要將 Omniscript 內嵌在 Aura 頁面上的 LWC 中,請使用此格式。
<namespace:omnistudioStandardRuntimeWrapper
type="type"
subtype="subtype"
language="language">
</omnistudio:omnistudioStandardRuntimeWrapper>
URL
Newport URL 範例
https://myorg.lightning.force.com/lightning/page/omnistudio/omniscript?omniscript__type=Type&omniscript__subType=SubType&omniscript__language=English&omniscript__theme=newport&omniscript__tabIcon=custom:custom_tab_icon&omniscript__tabLabel=custom_tab_label
Lightning URL 範例
https://myorg.lightning.force.com/lightning/page/omnistudio/omniscript?omniscript__type=Type&omniscript__subType=SubType&omniscript__language=English&omniscript__theme=lightning&omniscript__tabIcon=custom:custom_tab_icon&omniscript__tabLabel=custom_tab_label