Usage
The plug-in allows defining guided tours directly in the APEX application pages using dynamic actions and storing tours and steps data outside APEX using custom database tables. Both approaches have pros and cons and it's up to the developer to choose the approach that meets thier requirements better.
Keep in mind that dynamic action execution order is defined by the APEX dynamic action Execution Options \ Sequence attribute.
Dynamic Action Based
This approach requires defining at least one dynamic action to initialize a tour, tour steps, and launch a tour.
Display on Page Load
The usage guide instructions presented below create a new tour with a single step and automatic launch of a tour on the page load.
Create a new dynamic action
- Set Identification \ Name to Guided Tour
- Set When \ Event to Page Load
Delete default true action Show
Create a new true action (to initialize a tour)
- Set Identification \ Action to United Codes Guided Tour Pro [plug-in]
- Set Settings \ Action to Initialize Tour (Dynamic Action)
- Set Settings \ Tour Name to myFirstTour
- (Optional) Set Settings \ Tour Settings accordingly to your requirements
Create a new true action (to add a step)
- Set Identification \ Action to United Codes Guided Tour Pro [plug-in]
- Set Settings \ Action to Add Step
- (Optional) Set Settings \ Step Static Id
- Set Settings \ Step Title
- Set Settings \ Step Body
- (Optional) Set Settings \ Masking Padding
- (Optional) Set Settings \ Masking Radius
- Set Settings \ Step Settings
- Set Settings \ Placement
- (Optional) Set Advanced \ JavaScript Initialization Code
Create a new true action (to launch guided tour on the page load)
- Set Identification \ Action to United Codes Guided Tour Pro [plug-in]
- Set Settings \ Action to Run Tour (Name)
- Set Settings \ Tour Name to myFirstTour
Save and run the page
Display on Button Click
The usage guide steps below are describing defining a tour and step as in Display on Page Load but tour launch is done using a button and separate dynamic action.
Follow the steps from 1 to 4 from section Display on Page Load
Create a new button
Create a new dynamic action Launch Tour listening to the newly created button (by default on click event)
Delete default true action Show
Create a new true action
- Set Identification \ Action to United Codes Guided Tour Pro [plug-in]
- Set Settings \ Action to Run Tour (Name)
- Set Settings \ Tour Name to myFirstTour
Save and run the page
Table Based
Table based guided tours require storing tours and steps in custom tables. The plug-in exposes 2 actions that differ only by the source from which data is fetched. Initialize Tour (Table) uses a hard-coded SQL Query, while on the other hand, action Initialize Tour (Custom Tables) expects two SQL Queries to be defined. Using action Initialize Tour (Custom Tables) gives more control over fetched tours and steps because a developer can implement custom logic using SQL Query conditions.
Both actions require defining tours and steps data in the database tables and creating at least one dynamic action on the APEX global page.
The Plug-in Action Initialize Tour (Table)
This action is not shown as an example in the plug-in sample application, however, the implementation is very simple.
Go to the global APEX page
Create a new dynamic action
- Set Identification \ Name to Guided Tour from table
- Set When \ Event to Page Load
- Set Execution Options \ Sequence to 0
Delete default true action Show
Create a new true action (to initialize a tour)
- Set Identification \ Action to United Codes Guided Tour Pro [plug-in]
- Set Settings \ Action to Initialize Tour (Table)
Learn about tables in the section Sample Application \ Supporting Tables
Put tours and steps data into tables UC_GUIDEDTOUR_TOURS and UC_GUIDEDTOUR_STEPS
Save the page and run an application
When the plug-in dynamic action is executed it fetches tours using the SQL Query:
select
ugt.ID,
ugt.NAME,
ugt.OPTIONS,
ugt.INIT_JS,
ugt.FIRE_ON_PAGE_LOAD
from
UC_GUIDEDTOUR_TOURS ugt
where
APPLICATION_ID = :APP_ID
and PAGE_ID = :APP_PAGE_ID
and steps using the SQL Query:
select
ugs.ID,
ugs.TOUR_ID,
ugs.STEP_STATIC_ID,
ugs.TITLE,
ugs.BODY,
ugs.MASK_PADDING,
ugs.MASK_RADIUS,
ugs.PLACEMENT,
ugs.OPTIONS,
ugs.INIT_JS,
ugs.AFFECTED_ELEMENTS
from
UC_GUIDEDTOUR_STEPS ugs
join
UC_GUIDEDTOUR_TOURS ugt
on
ugt.id = ugs.tour_id
where
APPLICATION_ID = :APP_ID
and PAGE_ID = :PAGE_ID
order by
ugs.DISPLAY_SEQUENCE asc
;
The Plug-in Action Initialize Tour (Custom Tables)
This action is used by the plug-in sample application in examples Table based tour (page 2) and One-time tour \ Table based (page 7). Example Table based tour is handled by a dynamic action defined on the sample application global page, while example One-time tour \ Table based has its own dynamic action defined on page 7. These are two separate implementations because the One-time tour is using an additional table (in SQL Query condition) handling the end-user choice to display or not the example tour.
This usage guide describes the basic implementation without any additional custom logic. To learn more investigate the sample application examples.
Go to the global APEX page
Create a new dynamic action
- Set Identification \ Name to Guided Tour from custom tables
- Set When \ Event to Page Load
- Set Execution Options \ Sequence to 0
Delete default true action Show
Create a new true action (to initialize a tour)
Set Identification \ Action to United Codes Guided Tour Pro [plug-in]
Set Settings \ Action to Initialize Tour (Custom Tables)
Set Settings \ SQL Query Returning Tours to:
select
ID as ID,
APPLICATION_ID as APPLICATION_ID,
PAGE_ID as PAGE_ID,
NAME as NAME,
OPTIONS as OPTIONS,
INIT_JS as INIT_JS,
FIRE_ON_PAGE_LOAD as FIRE_ON_PAGE_LOAD
from
UC_GUIDEDTOUR_TOURS
where
APPLICATION_ID = :APP_ID
and PAGE_ID = :APP_PAGE_IDSet Settings \ SQL Query Returning Tour Steps to:
select
ID as ID,
TOUR_ID as TOUR_ID,
TITLE as TITLE,
BODY as BODY,
STATIC_ID as STEP_STATIC_ID,
MASK_PADDING as MASK_PADDING,
MASK_RADIUS as MASK_RADIUS,
OPTIONS as OPTIONS,
INIT_JS as INIT_JS,
AFFECTED_ELEMENTS as AFFECTED_ELEMENTS,
PLACEMENT as PLACEMENT,
DISPLAY_SEQUENCE as DISPLAY_SEQUENCE
from
UC_GUIDEDTOUR_STEPS
Learn about tables in the section Sample Application \ Supporting Tables
Put tours and steps data into tables UC_GUIDEDTOUR_TOURS and UC_GUIDEDTOUR_STEPS
Save the page and run an application