0

I have done the setup listed here (https://help.salesforce.com/articleView?id=000004000&type=1) for round robin lead assignment, but 'd like to do a lead assignment based on two criteria: the lead's status (Appointment Set) and it's sub source- a custom field (Facebook).

My formula looks like this :

AND(
    TEXT(Status) = "Appt. Set",
    TEXT(Lead_Sub_Source__c) = "Facebook"), 
    MOD(VALUE(Lead_Number__c) ,2) + 1, 
    0
)

I'm planning on rotating leads with this specific status and sub source between just two owners.

I keep getting an error that I have an extra ',' or '(' and I've tried modifying the formula with &&, AND etc., but just can't make it work.

Any Ideas?

1

UPDATE

Based on the details in the comments and the knowledge article, you are getting this wrong. You will need to add the additional condition in the assignment rule and not while creating the Lead_Number__c field.So your assignment rule would look like something as:

(Lead: Status EQUALS Appt. Set) AND (Lead: Lead_Sub_Source__c EQUALS Facebook) AND (Lead_Number__c EQUALS 1)

The formula to compute the Lead_Number__c should align to what it is mentioned in the knowledge article.


You seem to have an extra parenthesis on this line:

TEXT(Lead_Sub_Source__c) = "Facebook"), 

Your formula should look like as below. Notice the ) has been removed after the text "Facebook" and the possibly you are trying to validate the MOD value, so that has been adjusted to make sure the formula is syntactically correct. You should review the exact implementation based on your use case.

AND(
    TEXT(Status) = "Appt. Set",
    TEXT(Lead_Sub_Source__c) = "Facebook", 
    (MOD(VALUE(Lead_Number__c) ,2) + 1) = 0
)
  • I get an error: Incorrect parameter type for function 'AND()'. Expected Boolean, received Number – Kinga Lesińska Feb 13 at 20:08
  • I had not validated it. But seems you are trying to verify the result of MOD to 0, so you will need to adjust it accordingly. I have updated the answer. – Jayant Das Feb 13 at 20:13
  • Error: Formula result is data type (Boolean), incompatible with expected data type (Number). – Kinga Lesińska Feb 13 at 20:19
  • That could be possibly because your formula return type is of type Number. Because you are using AND here, the formula has to have a return type as Checkbox. – Jayant Das Feb 13 at 20:22
  • The formula type needs to be a number since the idea is to generate a Round Robin ID- based on which the lead assignment rule is supposed to work. However, I need to generate the ID number only for leads that meet the two criteria ( status and sub source). I know it sounds confusing, but it's more clearly stated in the link help.salesforce.com/articleView?id=000004000&type=1 – Kinga Lesińska Feb 13 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.