Process Automation Super Badge

Hi All,

 

Sharing through this blog post , Solutions for all the challenges of Process Automation Super Badge.

Challenge 1:

Validation rule on Lead

Rule Name : US_Validation_Rule
Active : Checked
Error Condition Formula :
OR(AND(LEN(State) > 2, NOT(CONTAINS(“AL:AK:AZ:AR:CA:CO:

CT:DE:DC:FL:GA:HI:ID:IL:IN:IA:KS:KY:LA:

ME:MD:MA:MI:MN:MS:MO:MT:NE:NV:NH:

NJ:NM:NY:NC:ND:OH:OK:OR:PA:RI:SC:SD:

TN:TX:UT:VT:VA:WA:WV:WI:WY”, State )) ),

NOT(OR(Country =”US”,Country =”USA”,Country =”United States”,

ISBLANK(Country) )) )

Error Message : You can’t create non USA located leads
Error Location : Country

 

Queues:

Queue Name: Rainbow Sales

1.JPG

Queue Name: Assembly System Sales

11.JPG

Assignment Rule:

Rule Name: Trailhead Assigment Rule

113.JPG

Challenge 2:

For this metric or field, Use this Field Name

✅#Field 1:

Label: Number of deals
API Name: Number_of_deals__c 
Data Type: Roll-Up Summary
Summary Type: COUNT
Summarized Object: Opportunity
Filter Criteria: None

#Field 2:

Label: Number of won deals 
API Name: Number_of_won_deals__c 
Data Type: Roll-Up Summary
Summary Type: COUNT
Summarized Object: Opportunity
Filter Criteria: Stage EQUALS Closed Won

#Field 3:

Label: Last won deal date 
API Name: Last_won_deal_date__c 
Data Type: Roll-Up Summary
Summary Type: MAX
Field to Aggregate: Opportunity: Close Date
Summarized Object: Opportunity
Filter Criteria: Stage EQUALS Closed Won

#Field 4:

Label: Deal win percent 
API Name: Deal_win_percent__c 
Data Type: Formula
Return Type: Percent
Decimal Places: 2
Formula:
(Number_of_won_deals__c / Number_of_deals__c)

#Field 5:

Label: Amount of won deals
API Name: Amount_of_won_deals__c 
Data Type: Roll-Up Summary
Summary Type: SUM
Field to Aggregate: Opportunity: Amount
Summarized Object: Opportunity
Filter Criteria: Stage EQUALS Closed Won

#Field 6:

Label: Call for Service
API Name: Call_for_Service__c 
Data Type: Formula
Return Type: Text
Formula: IF( DATE( YEAR(Last_won_deal_date__c)+2 , MONTH(Last_won_deal_date__c) ,

DAY(Last_won_deal_date__c) ) <= TODAY(), ‘Yes’, ‘No’)

👉VALIDATION RULES:-

Valdation Rule #1

Rule Name : US_Address_Validation

Error Condition Formula :

OR(
AND(
LEN(BillingState) > 2,
NOT(CONTAINS(“AL:AK:AZ:AR:CA:CO:CT:DE:

DC:FL:GA:HI:ID:IL:IN:IA:KS:KY:LA:ME:MD:MA:

MI:MN:MS:MO:MT:NE:NV:NH:NJ:NM:NY:NC:ND:

OH:OK:OR:PA:RI:SC:SD:TN:TX:UT:VT:VA:WA:WV:WI:WY”, BillingState ))
),

AND(
LEN(ShippingState) > 2, NOT(CONTAINS(“AL:AK:AZ:AR:CA:CO:CT:DE:DC:FL:GA:HI:ID:

IL:IN:IA:KS:KY:LA:ME:MD:MA:MI:MN:MS:MO:

MT:NE:NV:NH:NJ:NM:NY:NC:ND:OH:OK:OR:

PA:RI:SC:SD:TN:TX:UT:VT:VA:WA:WV:WI:WY”, ShippingState))
),
NOT(OR(BillingCountry =”US”,BillingCountry =”USA”,BillingCountry =”United States”, ISBLANK(BillingCountry))),
NOT(OR(ShippingCountry =”US”,ShippingCountry =”USA”,ShippingCountry =”United States”, ISBLANK(ShippingCountry)))
)

Error Message : You can not save a new account unless the shipping and billing state fields are valid US state abbreviations, and the country field is either blank or US, USA, or United States.

Error Location : Top Of Page

VALIDATION RULE #2

Rule Name : Name Change

Error Condition Formula :

IF(ISCHANGED(Name)&&(ISPICKVAL(Type,’Customer – Direct’)|| ISPICKVAL(Type,’Customer – Channel’)), True ,False)

Error Message : You can’t change the Account name for “Customer – Direct” or “Customer – Channel”

Error Location : Account Name

Challenge 3:

Custom Object Creation

3.JPG

Challenge 4:

Add Stage Value:

4.JPG

Add Custom Field:

Add Sales Process:

Add Recordtype

42.JPG

Validation Rule

43.JPG

Challenge 5:

Approval Process:

5.JPG

52.JPG

Note: Make sure you populate manager field on your user record with some valid user. In this case make your manager as Naushi(User you created in your org). If you wont select user manager you wont be able to submit for approval.

Email Alert

53.JPG

Note: Make sure you add a user in email alert

Process Builder:

Opportunity object with option created and updated.

Ω

1st and 2nd node end will be changed to evaluate next criteria.

1st Node Criteria

Opportunity Account Type = customer and opportunity.account id not equal to null

1st Node Action

2nd Node Criteria

Opportunity stage = prospecting and opportunity.account id not equal to null and opportunity account type = Prospect.

Note: there will be 2 actions 1 is email same as above and second is creating task.

2nd Node Action:

3rd Node Action:

Opportunity Stage = Negotiation/Review

3rd Node Action:

4th Node Criteria:

Opportunity Stage = Closed Won

4th Node Action:

2 actions are used in this node.

Challenge 6:

Flow:

  • Flow must be of type Flow.
  • Screen with 3 choices and store the result in screen choice fields : ProductType
  • Lookup to find records in product2 with contains ProductType and store them as variables (Id + name)
  • Screen to display variables
  • Activate the flow
  • Add the flow to the opportunity screen using app builder.

Lightning Page:

A record page on Opportunity object. 

Drag and drop flow component on it and save.

Activate page.

Challenge 7

  • Change field type of field “Day of the Week” on robot object to formula text and use below formula.
  • CASE( MOD( Date__c – DATE(1900,1,6),7) , 0, “Saturday”,1,”Sunday”,2,”Monday”,3,”Tuesday”,4,”Wednesday”,5,”Thursday”,6,”Friday”,””)
  • Go on Process builder created in step 5.(You have to clone this Process Builder in order to make changes)
  • Go on 4th Node of closed Won opportunity.
  • Go on action create setup record.
  • Change formula of date field from [Opportunity].CloseDate + 180..
  • to
  • CASE(MOD([Opportunity].CloseDate + 180 – DATE(1900, 1, 7),7), 0, [Opportunity].CloseDate + 181, 6, [Opportunity].CloseDate + 182, [Opportunity].CloseDate + 180)
  • Save and activate.

One thought on “Process Automation Super Badge

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s