Pages

Friday, June 28, 2013

Salesforce Customizeable Forecast Report

In previous blog, we discussed about Forecast Category, and now we would like to continue on how to create forecast report in this blog.

You can create forecast vs quota report the same as you usually create Salesforce report, just select report type 'Customizable Forecasting: Forecast Summary' or 'Customizable Forecasting: Forecast History'.













You will find the same forecast category as in Forecast tab: Quota (Rev), Closed (Rev), Commit (Rev), Best Case (Rev), Pipeline (Rev). With additional info Closed % of Quota (Rev) and Closed + Pipeline (Rev) which is actually total Amount of all Opportunity.









Do you realize the amount is exactly the same with amount in Forecast tab?

Issue: a Sales Director come to me and asked, why I can only see forecast for managers in my direct report, not for users underneath those managers?

After do some finding, issue found in Forecast Hierarchy. Go to Setup - Customize - Forecasts (Customizable) - Forecasts Hierarchy, make sure each role in Forecast Hierarchy have user enable, so user in higher role hierarchy can see forecast of user below.















Salesforce Forecast Category

In Salesforce, each value of Opportunity Stage is mapped to Type, Probability and Forecast Category. Changing the Stage of in Opportunity page layout will automatically change the Probability value and Forecast Category, although users can manually overwrite the default value of Probability and Forecast Category, if the fields are made available in the Opportunity page layout.



We can customize Forecast Category value from Forecast Category field in Opportunity object, but not the Status Category.


From the above screenshot, Forecast Category value has been modified from Best Case to Best Case OK, but the Status Category will remain as Best Case. There are 5 Forecast Category and we cannot add/delete it, although you can skip to use in from Stage assignment:
 - Pipeline
 - Best Case
 - Commit
 - Closed
 - Omitted


Customizable Forecast
When you click the Forecasts tab, you will find the 5 Forecast Category:
 - Quota
 - Closed
 - Commit
 - Best Case
 - Pipeline

The Forecast Category on the Opportunity record does NOT map directly on a one-to-one basis to the one on the Forecast tab. The amount in Closed, Commit, Best Case, Pipeline is NOT total from the same Forecast Category in  Opportunity Forecast Category. Click the Forecasts tab and notice that your forecast amounts are listed in different categories.

Forecasting Category value calculation:
Closed includes amounts for closed/won opportunities.
  Status Category = Closed
Commit includes amounts you are confident about closing and closed/won opportunity amounts.
  Status Category = Closed + Commit
Best Case includes amounts you are likely to close, closed/won opportunity amounts, and amounts in the Commit category.
  Status Category = Closed + Commit + Best Case
Pipeline includes amounts from all open opportunities.
  Status Category = Commit + Best Case + Pipeline



Sample of source data from Opportunity and relation with Forecast Category (bottom image):





Collaborative Forecast
This is the newer version of Forecast offer by Salesforce out of the box, you can have either Customize-able forecast or Collaborative Forecast in an org, not both.

When you click the Forecasts tab, you will find the 5 Forecast Category:
 - Quota (only when "Show quotas" are enabled from Forecast setting)
 - Closed
 - Commit
 - Best Case
 - Pipeline

cumulative forecast rollups are not enabled for this screenshot.


If you see above screenshot, Best Case is shown as Upside, this is changed in Forecast Category value.



If we enable cumulative forecast rollups, we can't change the header:

cumulative forecast rollups are enabled for this screenshot.


Here is the description for each category - we can't change the rollup setup:




Last update: 10 February 2018


ReferenceWorking with Forecast Categories (Customize-able Forecast)



Thursday, June 27, 2013

Salesforce: Workflow - Evaluation Criteria

Workflow is one of the feature used most in Salesforce, because of the simplicity and it is so powerful. With workflow, administrator can defined Immediate or Time-Dependent Workflow Actions to create new Task, send Email alert, field update and send Outbound Message without the need of a developer to write code.

You need to define Evaluation Criteria correctly to fit your business requirements:







created
This option is pretty clear, workflow will be evaluated only when user create a record.

created, and every time it’s edited
For this option, workflow will be evaluated when user create new record AND anytime user edit the record.

created, and any time it’s edited to subsequently meet criteria
For this option, workflow will be evaluated when user create new record AND anytime it hasn't trigger. Example:
- Workflow with rule criteria Execution Time equals null AND Request Time not equal to null
- User create new record with both Execution Time and Request Time is null, workflow will not be triggered as not meet rule criteria
- User update Request Time not to null --> workflow trigger
- User update other field, it still meet rule criteria, but workflow will be not evaluate again, because it has been evaluate when user update Request Time not to null.

So, how/when workflow will be evaluate again?
- User update back Request Time to null OR Execution Time not to null, here rule criteria broken.
- User update Request Time not to null OR Execution Time to null, workflow will be evaluate again.

Salesforce: Contact, Opportunity, Case access

We discussed Account sharing rule related to Contact, Opportunity, and Case in the previous blog.

Another area needs to take note related to this, is default Contact, Opportunity, Case Access setting in Role Hierarchy. Go to Setup - Manage Users - Roles and click on any role, you will see Contact, Opportunity, Case Access related to Account.

So, how this work and what is the difference with Account OWD sharing rule related to Contact, Opportunity, and Case?



In the Role Hierarchy access setup, we define user visibility and edit permission to all Contact, Opportunity, and Case access related to Account. If a user in the role owned an Account, can the user view or edit Contact, Opportunity, and Case tag to that account? So, this is not related to access permission to records under role-subordinates.

While in Account sharing rule, although it is almost similar, but sharing rule in Account is beyond default access, it is to share account from a role/group to other role/groups, including access (view or edit) Contact, Opportunity, Case related to Account.

Hope this explaining :)

Wednesday, June 26, 2013

Salesforce: Web-to-Lead validation

In previous blog, we discuss about adding record type as hidden field in Web-to-Lead, so when Lead created in Salesforce, it automatically assigned with a specific record type and Assignment Rules, it will be assigned to specific queue or user.

This blog will discuss about validation in Web-to-Lead. Can we have validation rule on data submit by user?
Out of the box, Salesforce do not provide any validation. For example: when user submit with invalid email address, it will be rejected by Salesforce by default. So, where the lead go? I'll be not created in Salesforce.

Salesforce will email to Default Lead Creator with subject Salesforce Could Not Create This Lead. And in the email body, it will capture all data enter by user with reason why it failed, for this case, it would be InvalidEmailValue

The same if you have validation rule in Lead, Default Lead Creator will get the same email with the reason as error message set in validation rule.

But, please note if you have required custom field, Salesforce will skip this one and create the Lead, so next time if you have Lead without required field, it may be created from Web-to-Lead.

So, back to the original question, can we add validation in Web-to-Lead form? Yes, you can, you need to learn a simple javascript. Sample:

<script type='text/javascript'>
    function ValidateForm() {
        var helperMsg = '';

        if (document.getElementById('first_name').value.length == 0) {
            helperMsg += "Please enter First Name \n\r";
        }
        if (document.getElementById('last_name').value.length == 0) {
            helperMsg += "Please enter Last Name \n\r";
        }
        if (document.getElementById('email').value.length == 0) {
            helperMsg += "Please enter valid Email Address \n\r";
        }     
        if (document.getElementById('phone').value.length == 0) {
            helperMsg += "Please enter Phone \n\r";
        }      
       
         if (helperMsg.length > 0) {
            alert(helperMsg);
            return false;
        }
        return true;
    }
</script>

Monday, June 24, 2013

Salesforce: Setting Record Type in Web-to-Lead

Web-to-Lead is a simple and good feature in Salesforce out-of-the box. It will create HTML code and you just need to put it into your website and lead will be create in your Salesforce. It is simple enough without need to hire a developer to build code, but if your business requirements are much more complex, such as: integration with other system, build a custom code using API web service is the option.

This blog is not telling about how to set up Web-to-Lead, you can find the information here.

OK, so now you have web-to-lead form and you want it be assigned to a specific lead record type based on criteria.

Use hidden fields
You can add following input into HTML script generated by Salesforce
<input type=hidden name="fieldname" id="fieldid" value="value">
example:
<input type=hidden name="lead_source" id="lead_source" value="Email">
<input type=hidden name="recordType" id="recordType" value="01250000000HkoV">










If you set record type in Lead, you need to set in record type setting to "Keep the existing record type".
In Setup - Customize - Leads - Settings change the record type settings to "Keep the Existing Record Type".  The other option is "Override the existing record type with the assignee's default record type" which as stated means it will constantly be overridden by the record type of whoever you assign the lead to.

You can get the RecordType Id by going to Setup - Customize - Lead - Record Types.

Make sure that the profile assigned to the owner of the leads has the particular record type you're trying to assign visible to that profile. You can check from: Setup - Manage Users - Profiles - Edit. Find record type settings click "Edit" next to leads and add / remove record types to that profile.

Use workflow with field update
You also can use workflow to update Field Update field based on some criteria you can set in workflow, this option will work when you want to set different record type based on some criteria.



Page-level ad