Schedule Calls with Clients Where the Birthday Is Not in the Current Week and Is Within Six Months
This workflow rule is triggered when a producer updates the Call Frequency field on the contact (client) record to 1-2 Times/Year. If the birthday of the client is not within the current week and is not more than six months from now, the workflow rule creates a birthday call task to call the client a week before the birthday.
Workflow Rule Details
This topic describes the details of the workflow rule.
Record Type
The record type is a Contact record.
Trigger Event
The trigger event is When Modified Record Saved.
Rule Condition
The Workflow Rule Condition field contains the workflow rule condition.
Enter the following expression in the Workflow Rule Condition field:
[<CallFrequency>] <> IfNull(PRE('<CallFrequency>'),"Invalid") AND [<CallFrequency>]=LookupValue
('PROF_CALL_CLASS','1-2 Times/Year') AND [<DateofBirth>] IS NOT NULL AND (JulianDay(IIf
(JulianDay(Mid([<DateofBirth>], 1, 6) + ToChar(Today(), 'YYYY')) < JulianDay(Today()), Mid(
[<DateofBirth>], 1, 6) + ToChar(Today()+Duration("P1Y"),'YYYY'),Mid([<DateofBirth>],1, 6)
+ ToChar(Today(), 'YYYY'))) <= JulianDay(Today()+Duration("P6M"))) AND (JulianDay(IIf(JulianDay
(Mid([<DateofBirth>], 1, 6) + ToChar(Today(), 'YYYY')) < JulianDay(Today()), Mid([<DateofBirth>],
1, 6) + ToChar(Today()+Duration("P1Y"),'YYYY'),Mid([<DateofBirth>],1, 6) + ToChar(Today(),
'YYYY'))) > JulianDay(Today()+7))
Workflow Action Details
This topic describes the details of the workflow action.
Action Type
The action type is Create Task.
Task Type
The task type is a Birthday Call.
Due Date
The Due Date field contains a numeric value that is calculated by adding the value in this field to the date on which the task is created.
Enter the following expression in the Due Date field:
Today()+JulianDay(Mid([<DateofBirth>],1,6)+IIf(JulianDay(Mid([<DateofBirth>],1,6)+ToChar(Today(),
'YYYY')) < JulianDay(Today()),ToChar(Today()+Duration("P1Y"),'YYYY'),ToChar(Today(),'YYYY')))
-JulianDay(Today())-(IIf(IfNull(Mid(1.0*(JulianDay(Mid([<DateofBirth>],1,6)+IIf(JulianDay(Mid
([<DateofBirth>],1,6)+ToChar(Today(),'YYYY')) < JulianDay(Today()),ToChar(Today()+Duration
("P1Y"),'YYYY'),ToChar(Today(),'YYYY')))-7)/7,8,1),"0")>="7",(IIf(IfNull(Mid(1.0*(JulianDay(Mid
([<DateofBirth>],1,6)+IIf(JulianDay(Mid([<DateofBirth>],1,6)+ToChar(Today(),'YYYY')) < JulianDay
(Today()),ToChar(Today()+Duration("P1Y"),'YYYY'),ToChar(Today(),'YYYY')))-7)/7,8,1),"0")="7",5,6)),7))
Subject
The Subject field contains the subject line for the task. You can embed functions and field names in the text. Three percent signs (%%%) before and after an embedded function or field name indicate that it is to be converted to a string.
For more information about expressions, see Oracle CRM On Demand Online Help.
Enter the following expression in the Subject field:
%%%LookupValue("TODO_TYPE", "Birthday Call")%%%-%%%FieldValue('<ContactFullName>')%%%