Exposing a Custom Key Structure to the Context Manager

To expose a custom key structure to Context Manager, at least one of the following two custom JavaScript objects must be created on the target application page:

  • PIA_KEYSTRUCT.

    Primary key structure object. This object is automatically created with no page modifications necessary.

  • PS_KEYSTRUCT.

    Secondary key structure object. Use this structure to get non-primary keys, such as alternate search keys.

Note: Both the PIA_KEYSTRUCT and the PS_KEYSTRUCT objects can be present on the same page. However, if both objects contain a value for the same key, the value set in PIA_KEYSTRUCT takes precedence.

The following is an example of exposing two alternate parameters as key values for the Context Manager: altkey1:altvalue1 and altkey2:altvalue2.

Using PeopleSoft Application Designer, add an HTML area to the page and link it to the DEMOFIELD field on the workrecord WORKREC. In the appropriate PeopleCode events, add the following:

WORKREC.DEMOFIELD.Value = "<SCRIPT Language='JavaScript'> var PS_KEYSTRUCT = 
{altkey1: 'altvalue1 ',altkey2: 'altvalue2 '};</SCRIPT> ";

Note: The example assumes that the target application and PeopleSoft Interaction Hub have been set up on the same internet domain and are configured. Specifically, it is a requirement that both have an internet address similar to http://xxx.company.com/ and that PeopleSoft Interaction Hub has its domain set to company.com.