0

I am new to Salesforce and i am trying to identify i way we can have a custom field on the Contact record to identify if someone is a "Single Purchaser" / "Multiple purchaser" or a "Non Purchaser".

We have an object called "Closings" once the status of this object reaches "Exchanged" then it is considered a sale. I would like to create a field that looks at the number of Exchanged closings the contact has, if the value is 0 then the field shows Non Purchaser, if the value is 1 it should show Single Purchaser and if the value is greater than 1 then it should show Multiple Purchaser.

Can anyone advise on how to achieve this ??

1
  • If Closings__c has a lookup relationship to Contact; use DLRS package to count the number of Closings that are "Exchanged". A no code solution
    – cropredy
    Sep 11 '20 at 22:36
0

To find the Number of Closing for one particular contact you can check the answer on this community thread https://developer.salesforce.com/forums/?id=906F0000000BYzFIAW where Parent Object will be Contact and child will be Closings.

Once you have the accurate counts on Contact suppose it is stored in a field named as Count_Of_Closings__c.

We can create another formula field which will evaluate based on the value in this Count field that we populated using the below formula. Return type of this will be Text

IF( Count_Of_Closings__c = 1, 'Single Purchaser', IF( Count_Of_Closings__c > 1, 'Multiple Purchaser', 'Non Purchaser' ) )

2
  • Thanks for the response user70147. Sep 10 '20 at 17:28
  • Looking at the link you have provided it will provide the count for the number of Closings but there is a second criteria. I only want to count the closings that have a status of "Exchanged". Do you have any ideas on how this could be incorporated ? Sep 10 '20 at 17:30
0

If the relationship is lookup between Closings and Contact:

If it is a master-detail relationship, use Rollup Summary Fields

In either use case, the count goes into a custom field on Contact: Contact.Sales_Count__c

then, use a formula field on Contact: Contact.Purchaser_Type__c that is:

CASE (Sales_Count__c,
      0,'Non Purchaser',
      1,'Single Purchaser',
      'Multiple Purchaser')  
2
  • Hello cropredy thank you for your response. This solution should help identify how many Closings the record has but i only want to count the Closings with a status of "Exchanged", is there any way to add that element in as well ?? Sep 13 '20 at 13:28
  • Both solutions allow you to filter the Closings by status = Exchanged.
    – cropredy
    Sep 13 '20 at 15:23

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.