Configure Siebel Home page Using Microsite VBC

Siebel has so many built in functionalities, it is hard to find in any other CRM (On Premise/Cloud). Have you seen customized home page in Siebel, mainly in Partner Portal application? Here is the screenshot what we have customized for Siebel Partner Portal Home Page. 

Configure Siebel Home page Using Microsite


Is it difficult to configure!! To meet such requirement, we have to modify HTML script which is responsible to build user interface. In any CRM, except Siebel or Open UI, first we have to find out the HTML/CSS file which is responsible to display message on Home page, then change HTML script, test it. If anything is not in proper place, then again modify the template and test it. 
Lot of work, isn’t!! Now see, how easily we can meet such requirement in Siebel or Open UI.
In Siebel, customized home page is derived from Microsite. Siebel provides specialized business component ‘ERM Microsite Section Body VBC’ to display data from Microsite. Throughout this article, we will use Partner Portal Home page to describe configuration steps. So our applet name is ‘ePortal Cat Splash Applet’ which is based upon ‘ERM Microsite Section Body VBC’ business component and view is ‘Home Page View (SCW)’.

This is two step configuration. First configure Microsite VBC in Siebel Tools and then Administration-Microsite in Siebel Client.

Step 1:
–  Select the business component ‘ERM Microsite Section Body VBC’ in Siebel tools and expand   
   BusComp User Properties in OBLE
–  Check user property ‘MicrositeSection’ is already present or not. If not, then create an user property    with name ‘MicrositeSection’ and Value ‘Body’
–  Compile all changes

Step 2:
–  Go to Administration-Content Center > Content Sets and add new content. If you have the content      file ready, then upload it by clicking on ‘Add Content’ button otherwise create new content.
–  Here we will create a new content ‘eChannel Home Screen Content’, so click on New button and    
   give the content name and title.

Step 3:
–  Below in ‘Asset’ tab, click on New to upload asset which will be displayed on home page
–  If you don’t have any file to upload for home page, then just build one blank file with .DOC or    
   .HTML extension. We will modify it once the file is uploaded.
–  Give the asset Name, title and browse the file on popup applet. File format could be anything
   (example .JPG, .DOCX, .HTML), then click on ‘OK’ button to upload. There are few advanced        
   properties as well, like Language Code, Private, Data Length. We could leave these as it is.
–  To modify the file, click on ‘Check Out’ button if it is not grayed out already and then ‘Edit HTML’.    Don’t worry! no need to write any HTML script here. It will open one popup applet just like word      document. We could build our custom template within few minutes. Once template is ready, save it 
   and do check in.

Step 4:
–  Go to Administration – Microsite > Page Administration, create a new page and click on Publish
   For partner portal home page, we have used below specification.
                      Page Title: eChannel Home Screen
                      View : Home Page View (SCW)
                      Content Set : eChannel Home Screen content


Step 5:
–  Now navigate to Portal Screen Administration to check the Screen is already listed or not. In our   
   example, screen name is ‘eChannel Home Screen’ which contains the view ‘Home Page View   
   (SCW)’
–  If not present, create a new portal screen. This portal screen name must be same as the screen       
   name used in Siebel tools.

That’s all, Open the eChannel application and verify siebel partner portal home page. See how we can build our custom home page without any HTML script! Siebel is fun, Isn’t it!!

If you have any doubt or question, feel free to comment here. To get more updates on recent activities, follow ‘TechOneStop on Facebook/Twitter/LinkedIn or join our website as followers.  

How to Call PL/SQL or Batch file from siebel escript

Calling PL/SQL or Batch file from Siebel is always fun, it gives end users added flexibility to generate report by themself. Here we will see how to use Clib function in Siebel escript to call PL/SQL or batch file.
Suppose, we have to fetch Opportunities which start with Opportunity Name like ‘Test’ and write it in to a file. So our first task is to write one batch file which will have SQL statement with spooling option to fetch opportunities and next step, call batch file from siebel browser script.

Step 1:
Write all sql statements into a file, including the query “SELECT A.ROW_ID, A.NAME FROM SIEBEL.S_OPTY A WHERE A.NAME LIKE ‘Test%’; ” and save the file with .sql extension. We have saved it as opty.sql. The SELECT SQL statement will fetch all opportinities where name starts with ‘Test’ and spool it in opty.txt. Our opty.sql file looks like below.

Set heading off
Set echo off
Set feedback off
Set pagesize 0
Set inlinesize 256
Set serveroutput off

Spool “D:Runsqlopty.txt”
SELECT A.ROW_ID, A.NAME FROM SIEBEL.S_OPTY A WHERE A.NAME LIKE ‘Test%’;
Spool off

Step 2:
As we can not call SQL statement directly from Siebel script, we will put it in one batch file. So we have created one batch file opty.bat which will be used in script. Batch file should look like below:
Absolute path of Sqlplus.exe Database_UserName/Password@dbname @absolute path of the sql file

Step 3:
Now write one client side business service which will call opty.bat. Go to Administration – Business Service and create a new BS ‘Generate Report’ with method name as ‘Generate Report’.
In PreInvokeMethod, use Clib function to call the bat file.

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
        Clib.system(“D:\Runsql\opty.bat”); //give the absolute path of the file location.
        retunr (CancelOperation);
}

Now verify the bisuness service, go to Administration – Business Service > Simulator and create a record with Service name and Method name and click on Run. It will create an output file ‘opty.txt’ with opportunity details where Opportunity name starts with ‘Test’.

If you have any doubt or question, feel free to comment here. To get more updates on recent activities, follow ‘TechOneStop on Facebook/Twitter/LinkedIn or join our website as followers.

How to enable or disable a button conditionally in Siebel Open UI

Enabling or disabling a button conditionally is pretty common requirement in Siebel configuration. There are many ways to do so, you can choose any of these based upon your requirement but as you know, it is always advisable to get rid of scripting as much as possible.

1) Script in PreCanInvoke Event
2) Named Method
3) EventMethod
4) ‘CanInvokeMethod’: Applet User Property
5) Javascript (only in Siebel Open UI)

1) Script in PreCanInvoke Event
– This is the scripting way to enable or disable a button conditionally in Siebel
– Select the applet, do right click and script in ‘Webapplet_PreCanInvoke’ event
Suppose on Contact List Applet, ‘Create Quote’ button should be enable only when contact status is ‘Active’.
To meet this requirement, we could add script in PreCanInvoke event of Contact List Applet. In script, first check the value of Contact Status field, if it is ‘Active’, then CanInvoke = TRUE else FALSE.

Sample Script:
function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
{
  if ( MethodName == “CreareQuote” )
// Method name
   {
       CanInvoke = “TRUE”;
       return( CancelOperation );      
   }
}
return (ContinueOperation);

2) Named Method
– It is scriptless way to enable a button conditionally
– Can be used in Applet level or BC level
Syntax
   Name: Named Method n: Method Name
   Value: ‘INVOKE’, ‘method name’

3) EventMethod
– Just prefix ‘EventMethod’ with the name of ‘Method Invoked’ (Control level property)
Syntax
   Method Invoked = EventMethodCreareQuote
– No need to script in PreCanInvoke event
– Button will be always active if method name is prefixed with EventMethod, it does not allow to add any condition

4) ‘CanInvokeMethod’: Applet User Property
– Can enable or disable a button conditionally in Siebel
– Applet level user property, supported by Siebel 8.0 or higher version
Syntax
   Name = CanInvokeMethod: CreareQuote
   Value = TRUE

5) Javascript
– This is the new way to enable or disable a button conditionally but applicable only in Sieble Open UI
– Complete repository independent and can be modified anytime as per requirement
– Will be covered in details in Siebel Open UI training articles

Note:
– Avoid scripting in ‘PreCanInvoke’ event as much as possible and use ‘CanInvokeMethod’ user property as an alternative

Need any help!! Please feel free to comment here.
To know more, follow ‘TechOneStop on Facebook / Twitter / LinkedIn / Goolge+.