binxie
2024-01-20 1d91be0be5220ce19ee64de5a5c9a8237b1c15b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?xml version="1.0" encoding="UTF-8"?>
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
    <alerts>
        <fullName>On_Call_unfollow_Alert</fullName>
        <description>【提醒】未跟进完毕的On-Call通知</description>
        <protected>false</protected>
        <recipients>
            <type>owner</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>Olympus_OCM/OnCall</template>
    </alerts>
    <fieldUpdates>
        <fullName>Account_Salesdepartment</fullName>
        <field>Account_Salesdepartment__c</field>
        <formula>segment__r.Salesdepartment_Dept__c</formula>
        <name>「科室-本部」設定</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>On_Call_FinalStatus_return</fullName>
        <field>FinalStatus__c</field>
        <name>On-Call跟进结果换到</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>On_Call_Update_FinalStatus</fullName>
        <field>FinalStatus__c</field>
        <literalValue>OnCall完毕</literalValue>
        <name>On-Call结束后更新跟进结果</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Update_Account_State</fullName>
        <field>Account_State__c</field>
        <formula>segment__r.State_Department__c</formula>
        <name>「科室-省」設定</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>Update_Creator_Job_Catetory</fullName>
        <field>Creator_Job_Category__c</field>
        <formula>text( CreatedBy.Job_Category__c )</formula>
        <name>「作成者-職種」設定</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
        <reevaluateOnChange>false</reevaluateOnChange>
    </fieldUpdates>
    <rules>
        <fullName>On-Call未跟进通知</fullName>
        <active>true</active>
        <criteriaItems>
            <field>On_Call__c.elapsed__c</field>
            <operation>greaterThan</operation>
            <value>72</value>
        </criteriaItems>
        <criteriaItems>
            <field>On_Call__c.Status_c__c</field>
            <operation>equals</operation>
            <value>跟进中</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
        <workflowTimeTriggers>
            <actions>
                <name>On_Call_unfollow_Alert</name>
                <type>Alert</type>
            </actions>
            <offsetFromField>On_Call__c.Taking_call_Time_c__c</offsetFromField>
            <timeLength>1</timeLength>
            <workflowTimeTriggerUnit>Hours</workflowTimeTriggerUnit>
        </workflowTimeTriggers>
    </rules>
    <rules>
        <fullName>On-Call毎回実行公式变成到文本</fullName>
        <actions>
            <name>Account_Salesdepartment</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>Update_Account_State</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>Update_Creator_Job_Catetory</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>true</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>On-Call状态</fullName>
        <actions>
            <name>On_Call_Update_FinalStatus</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <criteriaItems>
            <field>On_Call__c.Status_c__c</field>
            <operation>equals</operation>
            <value>完毕</value>
        </criteriaItems>
        <description>On-Call状态修改到完毕。ON-Call跟进结果自动变成到On-CALL跟进完毕</description>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
    </rules>
    <rules>
        <fullName>On-Call状态换到</fullName>
        <actions>
            <name>On_Call_FinalStatus_return</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <criteriaItems>
            <field>On_Call__c.Status_c__c</field>
            <operation>equals</operation>
            <value>跟进中</value>
        </criteriaItems>
        <triggerType>onCreateOrTriggeringUpdate</triggerType>
    </rules>
</Workflow>