Users not entering Required fields correctly - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Kellie KnudtsonKellie Knudtson 

Users not entering Required fields correctly

So, we are struggling to encourage our salespeople to enter a Promo code on the Leads form. We have tried to make it required, but they enter things (like made up numbers) just to get out of it. It's creating a problem for us being able to track our campaigns successfully. Any ideas on how to get our people to properly fill out this field correctly? 

Not sure if a picklist is going to be an option.....
Steve MolisSteve Molis
I would think about using Campaigns, or maybe create a Custom "PromoCode" object  and maybe lock down who can create new Promo Code records to Admin and/or Marketing.  Then create a (required) custom field on the Lead object and select 

Datatype = Lookup 
Object = PromoCode

Another option would be a Validation Rule that uses a REGEX funtion but they can be kinda tricky
Jon TreskoJon Tresko
If you have < 10 or so Promo codes, a Picklist would be a good option.

If there are more than that, long picklists can be very frustrating for the users.

Keep it required to ensure users can't save the record without populating the field. To enforce proper behavior and data quality, you would use Validation Rules.

Or, to take tracking to the next level, you would use a custom object or Campaigns to track your promo codes... This could have additional reporting benefits. I'll include more details in a subsequent Answer/Post, but info on Validation rules below...

This could be tricky with Promo codes and may even require you to make changes to the way you are issuing promo codes so you can have the validation rule perform a REGEX or something to that effect to enforce proper syntax.

Another option with Validation rules would be to maintain your list of active promo codes within the Validation rule. This may be more difficult to maintain, but would ensure that the user is entering an Active and valid promo code.

This would be something to the effect of:


There would be several ways to do this.

About Validation Rules - Salesforce

Improve the quality of your data using validation rules. Validation rules verify that the data a user enters in a record meets the standards you specify before the user can save the record. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False”. Validation rules also include an error message to display to the user when the rule returns a value of “True” due to an invalid value.

After you have defined validation rules:
  1. The user chooses to create a new record or edit an existing record.
  2. The user clicks Save.
  3. All validation rules are verified.
    • If all data is valid, the record is saved.
    • If any data is invalid, the associated error message displays without saving the record.
  4. The user makes the necessary changes and clicks Save again.
You can specify the error message to display when a record fails validation and where to display it. For example, your error message can be “The close date must occur after today's date.” You can choose to display it near a field or at the top of the page. Like all other error messages, validation rule errors display in red text and are preceded by the word “Error”. Important
Validation rules apply to new and updated records for an object, even if the fields referenced in the validation rule are not included in a page layout or an API call. Validation rules don't apply if you create new records for an object with Quick Create. If your organization has multiple page layouts for the object on which you create a validation rule, verify that the validation rule functions as intended on each layout. If your organization has any integrations that use this object, verify that the validation rule functions as intended for each integration.
For Reference:

Kellie KnudtsonKellie Knudtson
Thanks for the suggestions, guys! I will try to see if we can use these options. I have a feeling there are more than 10 promo codes, which is why I didn't think a picklist would be the answer (that'd be too easy). But I will look into your other options here.


Jon TreskoJon Tresko
Haha @SteveMo, in the time I was writing my answer, you answered with the same ideas as me! Great minds I suppose... but I may have a tendency to be a little too detailed, so you beat me to the punch! Let's chalk this one up as teamwork.

The only thing different I mentioned was maintaining a list of promo codes within a validation rule to check against them.

The more I think about it, the more I'm leaning more towards using Campaigns or a custom object. Use Campaigns if you're not already using it. 

If campaigns are already being used, and there could be multiple promo codes within one campaign... You could use campaign heirarchy (i.e. Parent Campaign is E-mail, with child campaigns being e-mail creative variations)

Then, if there could be multiple promo codes within each e-mail creative, add additional campaigns as children to the e-mail creative variation parent.

Another alternative would be to have a custom object called 'Promo Codes' which could be related to Campaigns and Leads. This way, the user would click the lookup icon to pick a promo code from a list, or search and select the promo code. When setting up the promo codes, you could associate them with campaigns or campaign members, depending on whether or not the promo codes are unique to specific campaigns or valid across all campaigns.

There I go being a little too detailed again, but there are a lot of options here!

If you give us a little more info, SteveMo and I can help you find a killer solution...

Do you currently use campaigns? 
Are there any other complexities in a campaign heirarchy?
Are promo codes unique to specific campaigns or valid across ALL marketing channels?
What do promo codes track? Specific campaigns? Specials? Martketing channels? Referral? etc?
Do you use promo codes to track marketing, usse them to apply appropriate discounts in billing, or both?
Any other specifics on promo codes?

Kellie KnudtsonKellie Knudtson
Wow! You're both so helpful.... and so QUICK! So, I am only 3 weeks into this new company and still figuring things out... this is all new to me. But I do know that we Do use Campaigns. Not sure on the hierarchy . The promo codes Are unique to the specific campaigns (thus, why they are so important for us to track for our analytics) The promo codes are attached to a specific landing page, so we know where the leads came from. They are just for marketing purposes, I believe. There may also be another specific promo code that is used for those who just call in. Also, there is a default one '00000' for those who cannot find or remember the original promo code... this is a BIG area where we run into trouble since most sales people just enter 00000 to not have to do any actual searching for the proper code.

Hope this helps!
Jon TreskoJon Tresko
The way I would do it is sub-campaigns since the promo codes represent landing pages. Create an additional field on the campaign as a value in the sandard type picklist, new picklist or boolean to define it as a promo code/landing page. Then, when creating these promo code campaigns, select the Campaign Type (Web Channel/Landing Page) and parent campaign.

This unlocks a lot of great reporting to be able to see analytics for the individual promo code campaigns, as well as stats group to the parent campaign, so it's easy to see where the weak links are.

When setting up the web-to-lead post forms on landing pages, hard-code the SFDC CampaignID for landing page so the leads are automatically inserted as Campaign members for the appropriate landing page.

You can create an additional lookup relationship on the Lead to the campaigns object, but label the field "Promo Code" - The user then clicks the lookup icon to search for the 'promo code' campaign. I highly suggest creating lookup filters for this field as well:

To help the data quality issue with lazy sales reps (which is of course always an issue) you can create reporting for sales managers that shows stats by rep, with percentage of '00000' campaigns compared to the others. Create a dashboard component for this report on the Sales managers' dashboard, so they will be able to easily identify who has the highest ratio of 00000's

Establish the benchmarks, then dock sales commissions if the ratio goes above a certain threshhold.

I think that covers everything!?