Set up a Cross Domain/Cross App Guide
Cross-Domain
An application can have IFRAMES which are can be serviced from the same domain as the main page (also known as the top) or from a different domain. For security reasons, if an IFRAME is serviced from a different domain, the browser does not allow the OGL player to access it from the top window.
To create OGL solutions that can start from the top window and continue in the IFRAME, we need to create a communication channel for OGL between the top frame and the IFRAME.
To make this happen, the following prerequisite steps have to be carried out:
- Request the correct script for the main application (if applicable)
- Request the OGL script for the IFRAME (Ensure iridize.stateOnly=window != top ? true : undefined; is included in the JavaScript for the IFRAME and the main application)
- Embed/enable OGL in the top frame (the main application i.e. Fusion)
- Embed OGL in the IFRAME (Note: if there are several IFRAMEs being serviced from different domains, each of these IFRAMES need to have the OGL script embedded)
How to Set-up a Cross-Domain Guide
Let's say we have a process guide with 10 steps as an end-to-end process, with the first five steps being executed in the top frame, and the last five being executed in the IFRAME as illustrated below:

From the illustration, we see that we need to set up a Cross-Domain Guide Connection between steps 5 and 6 in the E2E Process. To enable this, we build the E2E process guide in parts:
- First, build part of the process to run on the 1st application as one guide (Steps
1-5).


- Then build the part of the process to run on the 2nd application (Steps
6-10).

Note:
Take a note of the apiName.
- Open the top frame part of the guide in the OGL Full Editor
- Select the last step in the guide (i.e. step 5 in our example)
- Select Step Settings
- Expand the Advanced Settings section
- Select Add next to Step Branches
- Select Add Branch

- Select Launch a Cross-Domain Guide from the dropdown.
- Enter the apiName of the iframe part of the guide
- Enter the Start from step
- Enter the selector for the IFRAME (See IFRAME Selector Guideline below)
- Select Done to save the branch.
- Save and close the guide
Once these steps have been completed, the user executes the guide (top frame part of the guide), the iframe part of the guide will be executed when the user moves past the step with the branch.
Key considerations
- Determine if the iframe part of the guide should be in the OGL Help Widget or not)
- Determine when and how the step with the branch advances (i.e. advance on click etc.)
- Determine how to track these guides in analytics
- Determine a clear documentation strategy for maintenance
- attr^=val : gets an attribute starting (^) with val.
- attr*=val : gets an attribute containing (*) val.
- attr$=val : gets an attribute ending ($) with val.
For example:
- iframe[src*="/servlet"] returns an iframe with src containing “/servlet” in any part of the string.
- iframe[src^="/5001"] returns an iframe with src starting with “/5001”
1. Do an inspect element on the iframe.
2. Find the iframe src attribute.
3. Use a subset of its value. For instance: The iframe “File Attachment” has the src“ /5001 F000002jdbq ?isdtp =vw&isWsVw=true&nonce=2014e000ccc4c41384944ea28a38fe591b2b936d9b48d5d99f2bdffda916bfd5&sfdcIFrameOrigin=https%3A%2F%2Fkphr--trn1.cs90.my. salesforce.com”
- The following three selectors can be use for the iframe above.
- iframe[src*="?isdtp"]
- iframe[src^="/5001"]
- iframe[src$="my.salesforce.com"]
Always pick the selector that looks more likely to identify a single iframe. For instance, by choosing 2 or 3 there is a higher chance of referring to more than one iframe, therefore the cross-domain call could fail.
In case of nested IFRAMES (iframe inside another iframe)
use '>>' as a separator eg: iframe[src*="AdfLoader"] >> iframe[src*="PageLoader"]
Cross-ApplicationAn application can start in one application (i.e. Fusion) and continue in another application (i.e. CPQ). Normally, this means a new browser tab will be opened when moving from the first application to the second. Similarly, we need to create a communication channel for OGL, we achieve this by embedding OGL in both applications.
The following prerequisite steps have to be carried out:
- Request the correct script for the main application (if applicable)
- Request a new appID and the OGL JavaScript for the 2nd application (Ensure iridize.crossAppIframe=true is included in the JavaScript)
- Embed/enable OGL in the first application ( i.e. Fusion)
- Embed OGL in the 2nd application
Similar to a cross-domain guide, a cross-application guide has to be built in parts. the key difference is that for cross-application, the parts cannot be in the same OGL APPID.
Let's say we have a process guide with 10 steps as an end-to-end process, with the first five steps being executed in the main (1st) application, and the last five being executed in the 2nd application as illustrated below:

From the illustration, we see that we need to set up a Cross-Application Guide Connection between steps 5 and 6 in the E2E Process. To enable this, we build the E2E process guide in parts:
- First, build the top-frame part of the process as one guide (Steps 1-5) in one
appID.


- Then build the iframe part of the process (Steps 6-10) in the second
appID.


- Go to the first part of the process guide
- Open the guide in the OGL Full Editor
- Select the last step in the guide (i.e. step 5 in our example)
- Select Step Settings
- Expand the Advanced Settingssection.
- Select Add next to Step Branches.
- Select Add Branch

- Select Launch a Cross App Guide from the dropdown
- Enter the appID of the 2nd application
- Enter the apiName of the guide in the 2nd application (this is the second part of the process guide)
- Enter the Start from step
- Select Done to save the branch
- Save and close the guide
Once these steps have been completed, the user executes the guide (in the first application), the second part of the guide will be executed when the user moves past the step with the branch.
Key considerations
- Determine if the iframe part of the guide should be in the OGL Help Widget or not)
- Determine when and how the step with the branch advances (i.e. advance on click etc.)
- Determine how to track these guides in analytics
- Determine a clear documentation strategy for maintenance
