Friday, 28 June 2013

ADM: Adding Users to a new Responsibility + Handy SQL for Users/Views/Responsibilities

Using Application Deployment Manager to Deploy Responsibilities across Environments

Siebel Version: 8.1.1.9

I had a requirement recently to add thousands of Users to a particular view, I didn't have time to created a client side business service nor a .COM data loader so decided to use ADM. It turned out that ADM was the quickest and simplest way of meeting this requirement. 

I have added the steps taken:

STEP A - Generating the ADM XML from the Source Environment.


01. Create an Deployment Project
- Navigate to Site Map > Application Deployment Manager > Deployment Project
- Create a Record and for the Data Type Child Record select the Data Type 'Responsibility'.




02 Create a Deployment Session
- Navigate to Site Map > Application Deployment Manager > Deployment Session
- Create a record, pick in the Project Name you created in Step 1, select the Export to File flag.
- In the lower applet either select the Deployment Mode (Either Synchronise or Upsert).
- Provide a Deployment Filter to bring back the record you wish to export (e.g [Responsibility.Name] = 'Our Responsibility'), press the 'Validate Filter' button to ensure there are no Syntax Errors.



03 Generate and Export the XML.
- Click on the 'Deploy' Button to generate the ADM XML (Note: This will be exported to a folder on the Server)
- Supply folder to export the ADM XML too, this will be in the form of a network path. IMPORTANT: Ensure that this folder is accessible by the Siebel Application (i.e that that the folder is Shared).




STEP B - Manipulating the Generated XML.

So now Siebel will have generated three separate XML files, it is the second XML that we are interested in (as this is what we will manipulate and load back into Siebel (Target Environment).


          1-XXXXXX.ini
          1-XXXXXX_Responsibility.xml
          1-XXXXXX_Responsibility_des.xml


Changing the EAI Method
If you open up the XML up using Notepad++ we can actually change the EAI Method used against the Integration Object. If this is a new Responsibility with new Views/Users you most probably want 'Synchronize', in my case I needed to add a few thousand Users to an existing Responsibility so I used 'Upsert'.



Manipulating the XML Definition of Users

Siebel out the box will spit out the XML Definition of the User IC containing many fields that we simply don't need, in my case I had a thousands of Users to add with just their LOGIN ID's to identify them. So I needed to adjust the User XML definition so that I just needed to supply the LOGIN details and Siebel would still process the record.

So this is what I did:

          (a) Rip out all the XML bwtween <ListOfUser> and </ListOfUser>, thus there are no Users in the XML.
          Note: Incidentally if you want to remove all the Users against a Responsibility, just run a 
          Synchronize with no Users and this is a very quick way of disassociating a significant number of 
          users from a Responsibility.



           (b) Re-Format the XML for Users and add it back in
            We can use the following XML to define each User where the User Login is SIEBELUSER1:

<User><_sblesc_und_undPROPERTIES_und_und><Login_spcName>
SIEBELUSER1</Login_spcName><Login_spcDomain></Login_spcDomain></_sblesc_und_undPROPERTIES_und_und></User>


   
        One can regenerate the XML for thousand if Users by using Excel to concatenate the Left Hand side of the
        XML, followed by the User Login (taking case that there are no spaces caught up in the XML) and then the
        Right hand side of the XML.

        This re-generated XML excel can be pasted back into the original Responsibility XML.







     The full XML for each User record should show (once re-indented using Notepad++): 

        


STEP C - Loading the updated XML into the Target Environment.

To load the XML back into Siebel navigate back Site Map > Application Deployment Manager > Deployment Sessions. On the Deployment Sessions List Applet click on Menu Button > Deploy from Local File, pick the file that you generated in Step B.





SQL to help withs Users/Views/Responsibilities

SQL to list all Views that are associated to a Responsibility:

 select A.NAME,
 S_APP_VIEW.NAME
 from  SIEBEL.S_RESP A
 left outer join SIEBEL.S_APP_VIEW_RESP C
                  on A.ROW_ID = C.RESP_ID
 left outer join SIEBEL.S_APP_VIEW
                  on C.VIEW_ID = S_APP_VIEW.ROW_ID
 where A.NAME in ('Any Old Resp 1', 'Any Old Resp 2')


SQL to list all Responsibilities associated to a View/s:

 select A.NAME,
 S_RESP.NAME
 from  SIEBEL.S_APP_VIEW A
 left outer join SIEBEL.S_APP_VIEW_RESP C
                  on A.ROW_ID = C.VIEW_ID
 left outer join SIEBEL.S_RESP
                  on C.RESP_ID = S_RESP.ROW_ID
 where A.NAME in ('Any Old View 1''Any Old View 2')


SQL to list all  Responsibilities used by specified Users
(Where the Users ID are Supplied)

 select A.NAME,
 count(*)
 from
 SIEBEL.S_RESP A
 left outer join  SIEBEL.S_PER_RESP C
                 on  A.ROW_ID = C.RESP_ID
 left outer join  SIEBEL.S_USER
                 on  C.PER_ID = S_USER.ROW_ID
where S_USER.LOGIN  in ('User1', 'User2', 'User2', 'User3')
Group By A.NAME


select A.NAME
 from  SIEBEL.S_RESP A
 left outer join  SIEBEL.S_PER_RESP C
                 on  A.ROW_ID = C.RESP_ID
 left outer join  SIEBEL.S_USER
                 on  C.PER_ID = S_USER.ROW_ID
where S_USER.LOGIN  in ('User1')
ORDER BY NAME ASC

SQL to list the number of Users using a Responsibility
(Where the Users ID are Supplied)

 select A.NAME,
 count(*)
 from
 SIEBEL.S_RESP A
 left outer join  SIEBEL.S_PER_RESP C
                 on  A.ROW_ID = C.RESP_ID
 left outer join  SIEBEL.S_USER
                 on  C.PER_ID = S_USER.ROW_ID
where A.NAME  in ('Siebel Responsibility')

Group By A.NAME


SQL to list all Users by Login using a Responsibility
(Where the Users ID are Supplied)

 select
   A.NAME,
 
 S_USER.LOGIN from  SIEBEL.S_RESP A
 left outer join  SIEBEL.S_PER_RESP C
                 on  A.ROW_ID = C.RESP_ID
 left outer join  SIEBEL.S_USER
                 on  C.PER_ID = S_USER.ROW_ID
where A.NAME  in ('Siebel Responsibility')




Does a User have a Particular View

   select
   A.NAME,
   D.FST_NAME,
   D.LAST_NAME,
   JOB_TITLE,
  F.LOGIN from  SIEBEL.S_RESP A
 left outer join  SIEBEL.S_PER_RESP C
                 on  A.ROW_ID = C.RESP_ID
 left outer join  SIEBEL.S_USER F
                 on  C.PER_ID = F.ROW_ID
left outer join SIEBEL.S_CONTACT D
 on F.PAR_ROW_ID = D.ROW_ID
where A.NAME LIKE '%xyz%'


Wednesday, 5 June 2013

Siebel F9 Integration with Siebel 8.1.1.4 Onwards via Outlook 2007 / 2010
This information is originally provided with Oracle Document ID 1409093.1

This document outlines the instructions needed to integration Siebel’s F9 Email functionality with Microsoft Outlook 2007 and 2010, please follow all instructions and also check other referenced knowledge items in the parent knowledge document.

Without this configuration if you instigate an outlook email via the F9 functionality in Siebel, pick an email template and subsequently update the email Title/Body and the

Note: There is an accompanying bit of VBA Code that can be found along with Oracle Document ID 1409093.1 that is not included in this blog, the solution will not work without the code. You can find the code if you look up the Document ID on Oracle Supportweb.

1. After opening Outlook, Choose Tools -> Options -> [Mail Format] tab
   a. Choose RICH TEXT under ‘Compose in this message format’




2. Click “International Options
     a. Uncheck “Auto select encoding for outgoing messages”
     b. In Preferred encoding for outgoing messages, choose “Unicode (UTF-8)” (Optional)




3. Go to Tools -> Forms > Design a Form…
    a. Look in “Standard Forms Library” and choose Message, click Open



The newly created Message Form should appear like the following -





4. In the Forms Designer within the Developer tab, in the Form group, choose “View Code




5. Refer back to the Knowledge Article, and open attachment Form-Script.txt
    a. Copy and Paste the entire contents of the VBScript “Form-Script.txt” into the script editor
    b. Choose File -> Close
    [Note: I have not exposed the script that needs to be added]




6. Returning back to the Form Designed, choose the ‘All Fields’ tab.




7. Click on the ‘New’ button in the lower-left corner
a. Enter “Activity ID” for the Name





8. Repeat the steps from step 7.a to create the following user-defined fields and enter temp into their values. Please note that you MUST enter some temporary value




9. Now from the “Select From” dropdown list, choose “User-defined fields in this item” and THEN REMOVE the values for all the user-defined fields you’ve entered in the last step
(Remove the temporary value, such as ‘temp’ so that the Value is blank) 
(Note: The SiebelEmailFormat field is only applicable to versions greater than 7.5.3)




10. Click on the Properties tab
     a. Enter a version number in “Version”, such as 1.0
     b. Verify that “Send form definition with item” is Unchecked
     c. Proceed to “File -> Save As…” to save it as an Outlook Template
Publish Outlook Form using the Outlook Template









Publish Outlook Form using the Outlook Template


11. Within the Developer Tab in the Forms Designer, click Publish then Publish Form As
     a. Click Publish





12. If you see the following popup, select YES to over-write existing form




13. Close the Outlook window. If you see the following popup, CLICK NO as you DO NOT want to save this email draft.





Additional Information can be found in: How to Configure and Setup F9 [File > Send Email] Microsoft Outlook Integration (Doc ID 1140543.1)