Schedule Calls with Clients Where the Birthday Is Within Six Months and Is Not in the Current Week
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 more than six months from now and is not within the current week, the workflow rule creates a birthday call task to call the client one 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 New 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>]=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>')%%%