<?xml version="1.0" encoding="UTF-8"?>
<Workflow xmlns="http://soap.sforce.com/2006/04/metadata">
    <alerts>
        <fullName>CustomerPassEmail</fullName>
        <description>客户通过邮件</description>
        <protected>false</protected>
        <recipients>
            <field>SubmitUser__c</field>
            <type>userLookup</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>Account/SSBGCustomerPass_New</template>
    </alerts>
    <alerts>
        <fullName>CustomerPassEmailQC</fullName>
        <description>客户通过邮件QC</description>
        <protected>false</protected>
        <recipients>
            <recipient>changyi_li@ssbg.com</recipient>
            <type>user</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>unfiled$public/SSBGCustomerPass_QC</template>
    </alerts>
    <alerts>
        <fullName>CustomerPassEmail_Change</fullName>
        <description>客户通过邮件(修改)</description>
        <protected>false</protected>
        <recipients>
            <field>SubmitUser__c</field>
            <type>userLookup</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>Account/SSBGCustomerPass_New</template>
    </alerts>
    <alerts>
        <fullName>CustomerRejectEmail</fullName>
        <description>客户驳回邮件</description>
        <protected>false</protected>
        <recipients>
            <field>SubmitUser__c</field>
            <type>userLookup</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>Account/SSBGCustomerReject_New</template>
    </alerts>
    <alerts>
        <fullName>CustomerRejectEmailQC</fullName>
        <description>客户驳回邮件QC</description>
        <protected>false</protected>
        <recipients>
            <recipient>changyi_li@ssbg.com</recipient>
            <type>user</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>unfiled$public/SSBGCustomerReject_QC</template>
    </alerts>
    <alerts>
        <fullName>CustomerRejectEmail_Change</fullName>
        <description>客户驳回邮件(修改)</description>
        <protected>false</protected>
        <recipients>
            <field>SubmitUser__c</field>
            <type>userLookup</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>Account/SSBGCustomerReject_New</template>
    </alerts>
    <alerts>
        <fullName>ProhibitionAccount</fullName>
        <ccEmails>xinhonglu@prec-tech.com</ccEmails>
        <description>代理商禁用</description>
        <protected>false</protected>
        <recipients>
            <recipient>bin1_zhao@ssbg.com</recipient>
            <type>user</type>
        </recipients>
        <senderType>CurrentUser</senderType>
        <template>unfiled$public/ProhibitionAccount</template>
    </alerts>
    <fieldUpdates>
        <fullName>ANI_RECORDTYPE_Change</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_ANI_Approval</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>ANI_RECORDTYPE_Change</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>ANI_RECORDTYPE_Return</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_ANI</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>ANI_RECORDTYPE_Return</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>AreaForIEApprove</fullName>
        <field>AreaForIEApproveText__c</field>
        <formula>AreaForIEApprove__c</formula>
        <name>地区(IE审批)</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>BS_RECORDTYPE_Change</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_BS_Approval</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>BS_RECORDTYPE_Change</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>BS_RECORDTYPE_Return</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_BS</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>BS_RECORDTYPE_Return</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>CustomerApprove</fullName>
        <field>stautesD__c</field>
        <literalValue>Pass</literalValue>
        <name>更新客户状态-批准</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>CustomerChange</fullName>
        <field>stautesD__c</field>
        <literalValue>Submit</literalValue>
        <name>更新客户状态-已提交</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>CustomerInitial</fullName>
        <field>stautesD__c</field>
        <literalValue>Draft</literalValue>
        <name>更新客户状态-草案中</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>CustomerReject</fullName>
        <field>stautesD__c</field>
        <literalValue>Reject</literalValue>
        <name>更新客户状态-驳回</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>FiledsUpdate</fullName>
        <field>stautesD__c</field>
        <literalValue>Pass</literalValue>
        <name>审批状态</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>true</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>IE_RECORDTYPE_Change</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_IE_Approval</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>IE_RECORDTYPE_Change</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>IE_RECORDTYPE_Return</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_IE</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>IE_RECORDTYPE_Return</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>NDT_RECORDTYPE_Change</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_NDT_Approval</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>NDT_RECORDTYPE_Change</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>NDT_RECORDTYPE_Return</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_NDT</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>NDT_RECORDTYPE_Return</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>ProvinceStr</fullName>
        <field>ProvinceStr__c</field>
        <formula>TEXT( Province__c )</formula>
        <name>省份文本赋值</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>RVI_RECORDTYPE_Change</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_RVI_Approval</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>RVI_RECORDTYPE_Change</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>RVI_RECORDTYPE_Return</fullName>
        <field>RecordTypeId</field>
        <lookupValue>Customer_RVI</lookupValue>
        <lookupValueType>RecordType</lookupValueType>
        <name>RVI_RECORDTYPE_Return</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>LookupValue</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>TechnicalServiceCreated</fullName>
        <field>TechnicalServiceCreated__c</field>
        <literalValue>1</literalValue>
        <name>技术服务部创建</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>accountpass</fullName>
        <field>stautesD__c</field>
        <literalValue>Pass</literalValue>
        <name>客户批准</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>true</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>create_true</fullName>
        <field>MarketingStrategyCreated__c</field>
        <literalValue>1</literalValue>
        <name>市场战略部创建-真</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
        <reevaluateOnChange>true</reevaluateOnChange>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>isServiceCreate</fullName>
        <field>serviceCreate__c</field>
        <literalValue>1</literalValue>
        <name>是否服务部创建</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>setIs_New</fullName>
        <field>IsNew__c</field>
        <literalValue>0</literalValue>
        <name>setIs_New</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Literal</operation>
        <protected>false</protected>
    </fieldUpdates>
    <fieldUpdates>
        <fullName>updateAccountName</fullName>
        <field>Name</field>
        <formula>IF(FacilityName__c &lt;&gt; &apos;&apos;,FacilityName__c &amp; IF(DivisionName__c=&apos;无&apos;,&apos;&apos;,DivisionName__c) 
&amp; IF(OR(DepartmentName__c=&apos;无&apos;, IsBlank(DepartmentName__c)),&apos;&apos;, 
&apos; &apos; &amp; DepartmentName__c 
),FacilityNameD__c &amp; IF(DivisionName_D__c=&apos;无&apos;,&apos;&apos;,DivisionName_D__c) 
&amp; IF(OR(DepartmentNameD__c=&apos;无&apos;, IsBlank(DepartmentNameD__c)),&apos;&apos;, 
&apos; &apos; &amp; DepartmentNameD__c))</formula>
        <name>updateAccountName</name>
        <notifyAssignee>false</notifyAssignee>
        <operation>Formula</operation>
        <protected>false</protected>
    </fieldUpdates>
    <rules>
        <fullName>SetAccountName</fullName>
        <actions>
            <name>updateAccountName</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>RecordTypeId &lt;&gt; &apos;0120K000000Opa6&apos; &amp;&amp; RecordTypeId &lt;&gt; &apos;012280000005gnE&apos; &amp;&amp; RecordTypeId &lt;&gt; &apos;01228000000TF3Q&apos; &amp;&amp; RecordTypeId &lt;&gt; &apos;01228000000TGun&apos; &amp;&amp;(ISNEW()  || ISCHANGED(FacilityName__c)  || ISCHANGED(DivisionName__c)  || ISCHANGED(DepartmentName__c)  || ISCHANGED(Name) )</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>代理商禁用邮件通知01</fullName>
        <actions>
            <name>ProhibitionAccount</name>
            <type>Alert</type>
        </actions>
        <active>true</active>
        <formula>AND(ProhibitionAccount__c, ISCHANGED(ProhibitionAccount__c),  ISBLANK(ParentId))</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>地区%28IE审批%29</fullName>
        <actions>
            <name>AreaForIEApprove</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>true</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>市场战略部创建</fullName>
        <actions>
            <name>create_true</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <formula>$Profile.Id = &apos;00e28000000YQMs&apos; || $Profile.Id = &apos;00e0K000002NxHr&apos;</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
    <rules>
        <fullName>市场战略部创建_NEW</fullName>
        <actions>
            <name>create_true</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>CONTAINS($Label.MarketingDepartment,LEFT($User.Id,15))</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
    <rules>
        <fullName>市场部创建客户</fullName>
        <actions>
            <name>accountpass</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>setIs_New</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <formula>$Profile.Id = &apos;00e28000000YQMs&apos; || $Profile.Id = &apos;00e0K000002NxHr&apos;</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>市场部创建客户_NEW</fullName>
        <actions>
            <name>accountpass</name>
            <type>FieldUpdate</type>
        </actions>
        <actions>
            <name>setIs_New</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>CONTAINS($Label.MarketingDepartment,LEFT($User.Id,15))</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>技术服务部创建客户标记</fullName>
        <actions>
            <name>TechnicalServiceCreated</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <formula>OR($Profile.Id = &apos;00e28000001sZE6&apos;,$Profile.Id = &apos;00e28000000YQMx&apos;, CreatedBy.Id = &apos;00528000000YWE7&apos;, CreatedBy.Id =&apos;00528000000YVGg&apos;, CreatedBy.Id = &apos;0050K000009U4II&apos;, CreatedBy.Id = &apos;0050K000009U4ID&apos;, CreatedBy.Id = &apos;00528000000YWC6&apos;)</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
    <rules>
        <fullName>技术服务部创建客户标记_NEW</fullName>
        <actions>
            <name>TechnicalServiceCreated</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>OR(CONTAINS($Label.TechnicalService,LEFT($User.Id,15)) , CreatedBy.Id = &apos;00528000000YWE7&apos;, CreatedBy.Id =&apos;00528000000YVGg&apos;, CreatedBy.Id = &apos;0050K000009U4II&apos;, CreatedBy.Id = &apos;0050K000009U4ID&apos;, CreatedBy.Id = &apos;00528000000YWC6&apos;)</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
    <rules>
        <fullName>是否服务部创建</fullName>
        <actions>
            <name>isServiceCreate</name>
            <type>FieldUpdate</type>
        </actions>
        <active>false</active>
        <formula>OR(CreatedById = &apos;00528000000YWC6&apos;,CreatedById = &apos;00528000000YWE7&apos;, $Profile.Id = &apos;00e28000000YQMx&apos;, $Profile.Id = &apos;00e28000001sZE6&apos;)</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
    <rules>
        <fullName>是否服务部创建_NEW</fullName>
        <actions>
            <name>isServiceCreate</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <formula>OR(CreatedById = &apos;00528000000YWC6&apos;,CreatedById = &apos;00528000000YWE7&apos;, CONTAINS($Label.TechnicalService,LEFT($User.Id,15)))</formula>
        <triggerType>onCreateOnly</triggerType>
    </rules>
    <rules>
        <fullName>服务部创建客户BS%2FNDT%2FANI不需要审批</fullName>
        <actions>
            <name>FiledsUpdate</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <description>服务部创建客户BS/NDT/ANI不需要审批</description>
        <formula>AND(serviceCreate__c = true,OR(text(ProductSegment__c) = &apos;BS&apos;,text(ProductSegment__c) = &apos;NDT&apos;,text(ProductSegment__c) = &apos;ANI&apos;))</formula>
        <triggerType>onAllChanges</triggerType>
    </rules>
    <rules>
        <fullName>省份文本赋值</fullName>
        <actions>
            <name>ProvinceStr</name>
            <type>FieldUpdate</type>
        </actions>
        <active>true</active>
        <criteriaItems>
            <field>Account.Province__c</field>
            <operation>equals</operation>
            <value>内蒙古,河北,山西,山东,北京,天津,上海,江苏,浙江,安徽,江西,新疆,西藏,青海,甘肃,宁夏,陕西,云南,贵州,重庆,四川,河南,湖北,湖南,广东,广西,福建,海南,辽宁,吉林,黑龙江</value>
        </criteriaItems>
        <triggerType>onAllChanges</triggerType>
    </rules>
</Workflow>
