Configuring Siebel Open UI > Configuring Siebel Open UI to Interact with Other Applications > Displaying Data from External Applications in Siebel Open UI >

Displaying Data from External Applications in Siebel Views


The example in this topic describes how to configure Siebel Open UI to get connection details from LinkedIn, find matching mutual contacts in Affiliation views, and then display the matching records in a Siebel view.

To display data from external applications in Siebel views

  1. Set up the data:
    1. Log in to LinkedIn, and then identify two connections that include profile pictures and that allow you to reference them in your configuration.
    2. Write down the case-sensitive first name and last name for each LinkedIn profile.
    3. Log in to Siebel Call Center, navigate to the contacts Screen, and then the Contact List view.
    4. Click New, and then enter the First Name and Last Name values for one of the profiles that you noted in Step b.

      The values you enter must match exactly. Make sure uppercase and lowercase usage is the same.

    5. Click New, and then enter the First Name and Last Name values for the other profile you noted in Step b.
    6. Navigate to the Opportunity screen, and then the Opportunity List view.
    7. Click New to create a new opportunity, and then add the contact that you created in Step d to this new opportunity.
    8. Click New to create another new opportunity, and then add the contact that you created in Step e to this new opportunity.
    9. Log in to the Siebel application using the sample database, and then repeat Step b through Step e.
    10. Navigate to the Contact Screen, and then the Contact List view.
    11. Drill down on the first contact, and then navigate to the third level Affiliations view.
    12. Click New, and then add the contact that you created in Step d.
    13. Click New, and then add the contact that you created in Step e.
  2. Download the sociallyawarepmodel.js file into the following folder:

    INSTALL_DIR\applicationcontainer\webapps\siebel\language_code\files\custom

    To get a copy of this file, see Article ID 1494998.1 on My Oracle Support. This code already contains the configuration that Siebel Open UI requires to authenticate the user with LinkedIn and to get the connections for this user from LinkedIn. For more information about the language_code, see Languages That Siebel Open UI Supports.

  3. Use a JavaScript editor to open the sociallyawarepmodel.js file that you downloaded in Step 2.
  4. Locate the following code:

    SociallyAwarePM.prototype.Init = function(){

    SiebelAppFacade.SociallyAwarePM.superclass.Init.call(this);

  5. Add the following code immediately under the code you located in Step 4:

    this.AddProperty("linkedINRecordSet", []);

    this.AddProperty("linkedINMarker", 0);

    where:

    • linkedINRecordSet stores the connection details of the current user from LinkedIn.
    • linkedINMarker marks the position in the connection details record set for querying purposes in the Siebel Database.
  6. Add the following code immediately after the code you added in Step 5:

    this.AddMethod("QueryForRelatedContacts", QueryForRelatedContacts);

    this.AddMethod("GetConnectionByName", GetConnectionByName);

    This code allows the presentation model to call the GetConnectionByName method and the QueryForRelatedContacts method that you add in Step 7.

  7. Add the following code immediately after the FetchConnectionFromLinkein method:

    function GetConnectionByName(fName, lName){

    var connection = null;

    if(fName && lName){

    var linkedInRecSet = this.Get("linkedINRecordSet");

    for(var i = 0; i < linkedInRecSet.length; i++){

    var current = linkedInRecSet[i];

    if(current.firstName === fName && current.lastName === lName)

    {connection = current;break;}}

    }

    return connection;

    }

    function QueryForRelatedContacts(){

    var currentMark = this.Get("linkedINMarker");

    var recordSet = this.Get("linkedINRecordSet");

    var firstName = "";

    var lastName = "";

    for(var i = currentMark; i < currentMark + 5; i++){

    var current = recordSet[i];

    firstName = firstName + current["firstName"];

    lastName = lastName + current["lastName"];

    if(i < (currentMark + 4))

    {firstName = firstName + " OR ";

    lastName = lastName + " OR ";

    } }

    if(firstName !== "" || lastName !== ""){

    SiebelApp.S_App.GetActiveView().ExecuteFrame(

    this.Get("GetName"),

    [

    {field : "Last Name" , value : lastName},

    {field : "First Name", value : firstName}]);

    }

    }

    where:

    • GetConnectionByName uses the first name and last name to get the connection information stored on the client. Siebel Open UI gets this information from LinkedIn.
    • QueryForRelatedContacts is the presentation model method that uses the subset of the LinkedIn connection record that Siebel Open UI sets to query the Siebel Server for matching records. The notification causes Siebel Open UI to call the BindData method of the physical renderer as part of the reply processing. The BindData method updates the user interface with the matching set of records from server. For more information, see Notifications That Siebel Open UI Supports and GetActiveView Method.
  8. Add the following code immediately after the AddProperty methods you added in Step 5:

    this.AddMethod("QueryForRelatedContacts", QueryForRelatedContacts);

    this.AddMethod("GetConnectionByName", GetConnectionByName);

    These AddMethod calls add the QueryForRelatedContacts method and the GetConnectionByName method so that Siebel Open UI can call them from the presentation model.

  9. Configure the manifest:
    1. Log in to a Siebel client with administrative privileges.

      For more information about the screens that you use in this step, see Configuring Manifests.

    2. Navigate to the Administration - Application screen, and then the Manifest Files view.
    3. In the Files list, add the following file.
      Field
      Value

      Name

      siebel/custom/sociallyawarepmodel.js

    4. Navigate to the Administration - Application screen, and then the Manifest Administration view.
    5. In the UI Objects list, specify the following applet.
      Field
      Value

      Type

      Applet

      Usage Type

      Presentation Model

      Name

      Enter any value.

    6. In the Object Expression list, add the following expression. Siebel Open UI uses this expression to render the applet on a desktop platform.
      Field
      Value

      Expression

      Desktop

      Level

      1

    7. In the Files list, add the following file:

    siebel/custom/sociallyawarepmodel.js

  10. Test your modifications.
Configuring Siebel Open UI Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.