ClickHome supports adding custom nodes to the navigation structure in ClickHome. This can be used to link to and open other online applications. Sometimes these applications need data from ClickHome. To support this, you can add nodes into the ClickHome navigation tree that include a security token, generated on the fly to encode details about the job the user is looking at. The other application can then pass this token back to the ClickHome API to request data in the form of a customised XML.

Setup the Node

Firstly, see instructions on setting up nodes here.

The major difference between the simple custom node, and setting up this push-pull data exchange is that the parameter structure must match specific values. To generate the encrypted token, the URL must contain a section which begins with #SEKTOK1# and ends with #SEKTOK2# - and in between, must contain 5 parameters in order, with comma separators as follows:

1. Userid
2. XSLT Type (1=Contract, 2= Task)
3. Primary Key (Contract id or Task id)
4. XSLT to be used (the name of the file only)
5. Expiry days (days until xml is active, minimum is 1 day)

Ex: #SEKTOK1# #USERID#,1,#CONTRACTID#,ExternalParty,7 #SEKTOK2#

This value has to be entered in tblAppCustomisations in the column sgParameters:

Any other parameters can be added to the URL, and the token can be assigned to a URL parameter such as:

http://myapp.server.local/grab_contract_data.aspx?securityKey=#SEKTOK1# #USERID#,1,#CONTRACTID#,ExternalParty,7 #SEKTOK2#

Getting Data Back

The other application should retrieve the encrypted token from the URL provided to it, and then pass that back to the ClickHome API to access whatever data is required.

The format of data can be customised with the XSLT file specified in the parameters above.

Make sure the ClickHome.XsltQuery.XsltPath is specified correctly and the XLST file is in that path and accessible to the Application Pool that runs the web services - it must go in Large Text

Setup the XsltPath... See

The API call is on the WebServices path /xml/{token} - it is a HTTP GET call.