Over and above the API (Server to Server Communication), XpressDox also offers Interivew Integration. (3rd Party Server to Browser to XpressDox Server Communication).
Integration Information
The XpressDox Server provides code snippets to make integration of interviews really easy for you. To access these snippets:
- Sign in to your XpressDox Cloud or Server account
- Click to view any interview
- Click the
Include Interview in your Page
link on the left hand side of the page - Set your preferences and click the
Show Me How
button - JavaScript and iFrame code snippets (including explanatory comments) you need to integrate the template interview with your page will be generated automatically for you
Certain applications, such as SalesForce, restrict you to iFrame use. However where possible, we recommend you use the JavaScript integration so that you have more control over the interview in your page. We supply the following JavaScript methods once the interview is loaded:
xdInterview.mask(message);
This adds the loading overlay to the interview with the custommessage
textxdInterview.unmask();
This removes the loading overlayxdInterview.getInterviewData();
This method returns the interview data in xml formatxdInterview.getInterviewDataBase64();
This method returns the interview data in base64 formatxdInterview.navigatetoURL(navigateURL);
This method redirects the page, without the “leaving page message”, to the provided URL
We supply the following JavaScript event/hooks once the interview is loaded:
function xdox_OnCustomClick() { }
XpressDox will call this method when the custom button is clicked. Used with this command: SetWebCustomButtonfunction xdox_OnTabShown(totalNumberOfTabs, currentTabIndex) { }
XpressDox will call this method when a tab is clicked. Please note currentTabIndex is 1 based.function xdox_OnAssembleClick() { }
XpressDox will call this method when the Assemble button is clicked. If your implementation returns false, the XpressDox code will no longer assemble the document and redirect to another page.
An example of these methods being implemented is as follows: function xdox_OnCustomClick() {console.log("The user clicked the custom web button"); }