+ Start a Discussion
Elie.RodrigueElie.Rodrigue 

Process Automation Specialist Step 2

The call for service field description in the requirement is way different than what trailhead is actually validating.

User-added image
Suman KunduSuman Kundu
Hi Elie,

I am also having issue in this step, but the error message is different 
User-added image

As per the requirement, I have initially created following fields
Deal win % (Percent), Last won deal date (Date), Number of deals (Number), Number of won deals(Number), Total amount of won deals (Currency) and Call for Service (Formula) as below:
IF((Today() - Last_won_deal_date__c) / 365 > 2, 'YES', 'NO')
But on submit, I got the above error.
Then I have removed all the fields except Call for Service, and recreated all of them as their name defines, like below:
Number of deals (Roll-up summary): Count of related opportunities without criteria
Number of won deals (Roll-up summary): Count of related opportunities having Stage equals Closed Won
Deal win % (Formula): IF( Number_of_deals__c > 0, (Number_of_won_deals__c / Number_of_deals__c), 0)
Total amount of won deals (Roll-up summary): Sum of Amount of related opportunities having Stage equals Closed Won
Last won deal date (Roll-up summary): Max of Close Date in related opportunities having Stage equals Closed Won

I have manually tested everything, they are working fine.
But after doing all these changes, I got the exact same error message :). No Luck!!!
Atleast your error message looks a bit close to the solution, so can you please tell me what you have done from your end.
Medhanie Habte 37Medhanie Habte 37
I too am stuck.

My Call for Service is as follows
 
IF((Today() - Last_won_deal_date__c) / 365 > 2, 'Yes', 'No')

 
Nathan BruhnNathan Bruhn
I looked into the debug logs to see what assertions were failing....this lead me to write the following formula for Call for Service:
 
IF(OR(TODAY() - 730 > Last_Won_Deal_Date__c,TODAY() + 730 < Last_Won_Deal_Date__c) ,'Yes','No')

It's pretty ridiculous, but it got the job done. Looks like there are some major discrepancies between the requirements and the validations Trailhead is doing..
MedhanieHabteMedhanieHabte
Wow! Yes that did!
Suman KunduSuman Kundu
Hi all,
I have created a new SFDC org and created Account fields: Deal win % (Percent), Last won deal date (Date), Number of deals (Number), Number of won deals(Number), Total amount of won deals (Currency) and Call for Service (Formula) as below:
IF(OR(TODAY() - 730 > Last_Won_Deal_Date__c,TODAY() + 730 < Last_Won_Deal_Date__c) ,'Yes','No')
I have given the exact API names to the fields also as mentioned in the step2. But still getting below error:
User-added image
In the debug log, I found it executes an anonymous code, which also ran successfully.
Can anybody tell me, where I am doing wrong?
Dan_HuxtedDan_Huxted

Make sure your API names are correct as per the requirements:

 

Deal_win_percent__c
Amount_of_Won_Deals__c

Suman KunduSuman Kundu
Hi Dan,
Yes, I have created with exactly same API Names. Please find the below screen shot:
User-added image
Stevie Burt 7Stevie Burt 7
@Suman What are the Validation Rules you have? I was able to get around this by correcting mine and moving the error messages to the Fields as opposed to the top of the page. I also had to create all of my validation rules seperately to get them to work.
wcraigwcraig

It's not your formula, just used 

IF(OR(TODAY() - 730 > Last_Won_Deal_Date__c,TODAY() + 730 < Last_Won_Deal_Date__c) ,'Yes','No')

and passed through

Patrick McClellanPatrick McClellan
@Suman, this is a known issue that Trailhead is debugging now.
steve Fitzgerald 6steve Fitzgerald 6
Can anyone tell me if this is still a known issue? I'm having a hard time getting past the Step 2 of the Process Automation Superbadge.
User-added image
steve Fitzgerald 6steve Fitzgerald 6
And I've triple checked the API names. All testing I've done manually appears to work fine.
steve Fitzgerald 6steve Fitzgerald 6
Hi all. I figured out my problem. I added an extra field called 'Total Amount of Won Deals'. After deleting this field, I was able to pass the challenge. This is a bit of a surprise, because I dont think the challenge is even checking for that. @Suman, I noticed you had added a field of that name as well. Maybe try deleting that field and re-checking?  The Challenge only asks for 'Amount of won deals'. I added that as well, but for some reason, having the additional on was problematic. Maybe the challenge is checking on the amount of roll-up/summary fields?
Carlo VolpiCarlo Volpi
Hello @steve Fitzgerald 6 , I've found a way to pass throught the challenge, you will need to create all these fields as Rollup summaries of formula fields.

Number of deals   -> type rollup summary, you need to count the opportunities
Number of won deals -> type rollup summary, you need to count the opportunities which stage equals closed won
Last won deal date -> type rollup summary, you need get the max close date which stage equals closed won
Deal win percent -> type formula percent, just do number of deals won divided by the number of deals
Amount of won deals -> type rollup summary, the sum of the amount which stage equals closed won
Call for Service -> type formula text, IF(OR(TODAY() - 730 > Last_Won_Deal_Date__c,TODAY() + 730 < Last_Won_Deal_Date__c) ,'Yes','No')

Kind Regards
Pablo CabornoPablo Caborno
Guys, I passed this challenge after days of working this thing around again and again. The problem for me was the 
'Number of deals' and 'Number of won deals' fields, for these rollup summary fields you don´t have to apply the SUM operation, just select COUNT. I applied it to the Quantity field, that was wrong.
Radha LingutlaRadha Lingutla
IF(OR(TODAY() - 730 > Last_Won_Deal_Date__c,TODAY() + 730 < Last_Won_Deal_Date__c) ,'Yes','No')

when I use this formula I am getting following error.

Error: Incorrect parameter type for operator '>'. Expected Date, received Number

can anyone help on this?
 
Radha LingutlaRadha Lingutla
Hi,
I figured out my problem. I did mistake in creating the field "Last won deal date".I didn't do  Max close date.
Emily YostEmily Yost
The missing piece for me was Deal win percent--my formula was correct, but I had Formula Return Type as Number instead of Percent, and now I know that is an option!
Anusha KulshresthaAnusha Kulshrestha
@Carlo Volpi thank you. I finally past the error, for ' Amount of won deals' I was summing up Amount field without the stage filter. Once I added stage closed won I got rid of the error.
Josh Harris 14Josh Harris 14
I used this code for the "Call for Service" formula. It worked, and it's a bit tighter than some of the others posted here:
if(Last_won_deal_date__c < (today() - 730), "Yes", "No")

 
RODRIGO DOMINGUESRODRIGO DOMINGUES
According @Suman Kundu write
Number of deals (Roll-up summary): Count of related opportunities without criteria
Number of won deals (Roll-up summary): Count of related opportunities having Stage equals Closed Won
Deal win % (Formula): IF( Number_of_deals__c > 0, (Number_of_won_deals__c / Number_of_deals__c), 0)
Total amount of won deals (Roll-up summary): Sum of Amount of related opportunities having Stage equals Closed Won
Last won deal date (Roll-up summary): Max of Close Date in related opportunities having Stage equals Closed Won
Call for Service (Formula) as below:
IF((Today() - Last_won_deal_date__c) / 365 > 2, 'YES', 'NO')

my error in this challenge was, hather tan Call for service is a formula field . I Created it as checkbox and made a process builder for updated.
Kannan Srinivasan eVolvinKannan Srinivasan eVolvin
i am unable to unlock the challenge for https://trailhead.salesforce.com/en/content/learn/superbadges/superbadge_process_automation
PS i have completed the prerequisites of setting up the following steps to unlock the challenge

User creation
Step 1
User-added image

Step 2 - Approval Settings
User-added image

Step 3 - Install Package as mentioned in the superbadge
User-added image

Step 4 - Queues creation
Lead queues

Step 5 - Lead Assignment
User-added image

 
Kannan Srinivasan eVolvinKannan Srinivasan eVolvin
Step 6 - Assigning the respective queues to the rule entries

User-added image

Step 7 - Lead validation rules for state and country

User-added image

Step 8 - Country Validation
User-added image

Step 9 - State Validation
User-added image

 
Kannan Srinivasan eVolvinKannan Srinivasan eVolvin
despite the above i still see the following under the super badge pagee
User-added image
 
Adil ATIFAdil ATIF
That work's for me IF( ADDMONTHS( Last_won_deal_date__c ,24) < TODAY()  , "YES", "NO")
Shaher Cardona MahmudShaher Cardona Mahmud

I had the same issue and I followed all the recommendations from @Carlo Volpi

Thank you.

MPB SalesforceMPB Salesforce
Hi all if you have any query in this challenge 2 so please watch this video at least once i hope you will get your solution
https://www.youtube.com/watch?v=e-exf-MUWzU&list=PLQf_Kv-dMRBJNdXFH44hPImsHY47yaG12&index=5
Charles EnadCharles Enad
This is my problem all along: 
Amount of won deals, Amount_of_Won_Deals__c

the field name should be Total Amount of Won Deals and the API name should be Amount_of_Won_Deals__c

Trickey as it wasn't stated by trailhead.
fcathalafcathala
Use a Text (formula) field for Call_for_Service__c, NOT a checkbox...
Ravindra AdithiyanRavindra Adithiyan
Try deactivating the trigger in the org and try the below steps:
1.Create Validation Rules:
 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)))
,
AND(( ISPICKVAL( Type , "Customer - Channel")),ISCHANGED(Name)),
AND(( ISPICKVAL( Type , "Customer - Direct")), ISCHANGED(Name))
)

The above formula fulfills the State/Country validation and the Customer Type Validation.

2.Create the following Custom fields
     i.Number_of_deals__c
       type – rollupSummary
       count of all opportunities
     ii.Number_of_won_deals__c
        type – rollupSummary
        count the opportunities which are having the stage equals closed-won
     iii.Last_won_deal_date__c
         type – rollupSummary
         Max of opportunities closeddate which are having the stage equals closed-won
     iv.Deal_win_percent__c
         type -Formula (Percent)
         Number_of_won_deals__c / Number_of_deals__c
      v.Amount_of_Won_Deals__c
         type – rollupSummary
         the sum of all opportunities amount which is having the stage equals closed-won
      vi.Call_for_Service__c
          type -Formula (text)
          IF(DATE(YEAR(Last_won_deal_date__c)+2,MONTH(Last_won_deal_date__c),DAY(Last_won_deal_date__c))<= TODAY(),"Yes","No")

Note: (Last_won_deal_date__c)+2 inculded in the formula because the year can be leap/normal so doing total number number of days will not help.

Hope the above steps will help to clear the challenge 2.

 
Widson M MashamaiteWidson M Mashamaite
Thanks @Dan_Huxted, it was the API name trick
Marco Pollastri 1Marco Pollastri 1
Thanks, @CarloVolpi best answer!