Saturday, 28 November 2015

Oracle Sales Cloud - GROOVY SCRIPT - Currency format

IMPLEMENTATION OF NUMBERFORMAT GROOVY SCRIPT:
Initially a temporary variable gets the value of the field that needs to be formatted. Assuming the current value is in the string format, the length of the value is calculated based on the decimal.
def tempValue = c_Value //e.g. $USD 9967644.09
def currentIndex = tempValue.indexOf('.')
def currencyValue
if(currentIndex<0)
currencyValue = tempValue
else
{
currencyValue =tempValue.substring(0,currentIndex)
}
def currencyLength = currencyValue.length()

After 3 digit formatting, the obtained values are added into a list.
def temp=0
def emptyList = []
if(currencyLength%3 !=0)
temp = currencyLength%3
if(temp!=0 && temp<=currencyLength ){
emptyList.add(currencyValue.substring(0,temp))
}
else
{
emptyList.add(currencyValue.substring(0,temp+3))
temp=temp+3
}
while(temp<currencyLength)
{
emptyList.add(currencyValue.substring(temp,temp+3))
temp=temp+3
}
  • Finally all the values in the list are concatenated as comma separated string and returned as desired US currency format.
String finalCurrency = ""
int i
for(i=0;i<emptyList.size();i++)
{
finalCurrency+=emptyList[i]+','
}
return "\$"+finalCurrency.substring(0,finalCurrency.length()-1) //e.g. $9,967,644
The above code is defined as a global function formatCurrency which could be referred in the text formula field as below,
def currencyValue = OptyRevenue_c
def tempValue = currencyValue.toString()
def finalCurrency=adf.util.formatCurrency(tempValue)//has the formatted value

Oracle Sales Cloud - Creating Appointment - Sample Code

scenario:
when an Opportunity is modified e.g Field “Next Contact Date”  An appointment is created to schedule a meetings:
if (isAttributeChanged(‘NextContactDate_c’))
{
//define variables
def voAppointment = newView(‘AppointmentVO’)
def createAppt = voAppointment.createRow()
def currentDateTime = now()
def apptName = ‘TestGroovyScript’ + currentDateTime
//set the required values to a variable
createAppt.setAttribute(‘ActivityName’, apptName)
createAppt.setAttribute(‘SourceObjectId’,OptyId )
createAppt.setAttribute(‘SourceObjectCd’,’OPPORTUNITY’)
//insert a record in Appointment
voAppointment.insertRow(createAppt)
}

Friday, 27 November 2015

Oracle Sales Cloud - Enable Notifications

The following steps are required to enable notifications in Oracle Sales Cloud R10:

Enable Administrator Profile Values:

All Tasks > Manage Administrator Profile Values 

ZMM_ACTIVITY_DISABLE_EMAIL_APPT_NOTIF = No 
ZMM_ACTIVITY_DISABLE_EMAIL_TASK_NOTIF = No 
ZMM_ACTIVITY_TASK_NOTIF_EMAIL= Yes 
ZMM_ACTIVITY_APPT_NOTIF_EMAIL = Yes 
ZMM_ACTIVITY_EXTERNAL_NOTIFICATION = Yes


Please follow the steps bellow to enable the notification reminders for a user: 

-In the UI click the user name (aka first user) in the right top corner 
-Click Set Preferences... 
-Click Calendar and Appointment Preferences 
-On the Task section 'Notify me if changes are made by others' select the desired options (for example enable 'When I am the owner') 
-On the Task section 'Notify me by' select the the option 'Notification list' 
-Save and logout 
-Login in with another user 
-Create activity and set the owner to the first user 
-Logout and login with the first user 
-Verify that you will have a notification 




Tuesday, 17 February 2015

UCM Survivorship Rules On Custom Extension Columns(X_) of Base Tables


Here is the process to do:

1. Add a new column(X_TEST) to the table S_CONTACT(or any base table).
2. Added the field in the respective BC and IO.
3. Compile objects in to srf.
4. Now restart the siebel server and log in to application.
5. UCM>SurvivorshipRules>Attributegroup>
For the field name picklist without any join "Test"(extension field) will be visible.
6. Now create a Survivorship rule as per your business requirement.
Eg: Attribute group contains: First Name, Last Name and Test
Contact Default: Recent
and in the Attribute group Comparison Rule:History

7. Now using "Person Service" webservice create person operation, insert a record with the following details:

soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://xmlns.oracle.com/apps/mdm/customer" xmlns:swip="http://www.siebel.com/xml/SwiPersonIO">
<soapenv:Header/>
<soapenv:Body>
<cus:createPerson_Input>
<cus:RealtimePubSub>False</cus:RealtimePubSub>
<cus:_sblesc_lstValue_grt></cus:_sblesc_lstValue_grt>
<swip:ListOfSwiPersonIO ExternalSystemId="ExtSys1">
<swip:Contact operation="Insert" searchspec="" status="">
<swip:Id>1-123</swip:Id> 
<swip:FirstName>X_Recent</swip:FirstName>
<swip:LastName>1stTime</swip:LastName>
<swip:Test>ExtensionColumn</swip:Test>
<swip:EmailAddress>abc@abc.com</swip:EmailAddress> 
</swip:Contact>
</swip:ListOfSwiPersonIO>
<cus:Error_spcCode>?</cus:Error_spcCode>
<cus:Error_spcMessage>?</cus:Error_spcMessage>
</cus:createPerson_Input>
</soapenv:Body>
</soapenv:Envelope>


8. Now modified the message and inserted as below:

soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cus="http://xmlns.oracle.com/apps/mdm/customer" xmlns:swip="http://www.siebel.com/xml/SwiPersonIO">
<soapenv:Header/>
<soapenv:Body>
<cus:createPerson_Input>
<cus:RealtimePubSub>False</cus:RealtimePubSub>
<cus:_sblesc_lstValue_grt></cus:_sblesc_lstValue_grt>
<swip:ListOfSwiPersonIO ExternalSystemId="ExtSys1">
<swip:Contact operation="Insert" searchspec="" status="">
<swip:Id>1-123</swip:Id> 
<swip:FirstName>X1_Recent123</swip:FirstName>
<swip:LastName>1stTime</swip:LastName>
<swip:Test>ExtensionColumn123</swip:Test>
<swip:EmailAddress>abc@def.com</swip:EmailAddress> 
</swip:Contact>
</swip:ListOfSwiPersonIO>
<cus:Error_spcCode>?</cus:Error_spcCode>
<cus:Error_spcMessage>?</cus:Error_spcMessage>
</cus:createPerson_Input>
</soapenv:Body>
</soapenv:Envelope>

9. As per survivorship rules even though first name and extension column are modified they are not disturbed in the base table whereas Email Address is changed to the recent one since email address is not present in the attribute group.

10. Hence it is confirmed that survivorship rules will execute on extension columns as well. 

                                                                                                                                               (Its is only for education /knowledge purpose)

Monday, 9 February 2015

EDQ Sequence Generator Processors


As per the requirement, I need to generate the Sequence in EDQ.

The following is the processor, which will generate the sequence.  

"Add Message Id "

Saturday, 7 February 2015

OCH (Siebel UCM) - OEDQ Real-Time Matching Process

- In real time, when a new record(driving record) come to UCM, Siebel calls EDQ web services to      generate cluster keys for the new record
- EDQ generate the cluster keys and its send back to Siebel
- Siebel stores these new keys and then looks up all records that share any key with the driving record- Once Siebel find a matching key, it submits driving and candidate records to the matching service
- Driver record and all candidate records are send back to EDQ, to be ranked by Match score
- Siebel then pop-up the Matching record with the match score and user can select 'pick' or 'ignore' to commit the record.
Cluster keys are stored in S_DQ_xxx_KEY tables; 


Accounts: S_DQ_ORG_KEY
Contact:    S_DQ_CON_KEY 

Prospects:  S_DQ_PRSP_KEY