Pages

Showing posts with label Account. Show all posts
Showing posts with label Account. Show all posts

Monday, January 17, 2022

Salesforce: Default Account Team (2)

Six months ago, I wrote Salesforce: Default Account Team, and this blog will discuss more on Default Account Team again. 

Account Team defines additional users that are involved in an Account, in addition to the Account Owner.  One user can be added only once to the Account Team, adding the existing user will overwrite the current team role and access.

Where to access Account Team (and Opportunity Team)?

Account Team related list

Opportunity Team related list

In Account Team:
- Add Default Team = add members from default Account teams of the Account owner
- Add Team Members = manually select users to be part of the Account Team
- Team Members Access = to show each team member role and access to Account, Contact, Opportunity, and Case
- Remove All Members = remove all members added

In Opportunity Team:
- Add Default Team = add members from default Opportunity teams of the Opportunity owner
- Add Account Team = adding existing team members from Account Team to Opportunity Team
- Add Opportunity Team Members = manually select users to be part of the Opportunity Team
- Team Members Access = to show each team member role and access to Opportunity

Who can add the Account Team?

  • The account owner or users in the above role hierarchy of account owner

  • Users with "Read/Write" access on the account record, but not above the account owner in the role hierarchy, will be able to add users to Account Team, but NOT to edit and delete users from Account Team (just add). These users also can't select the level of access for the new team member, only Private for the Account record, and not the related Contact, Opportunity, and Case.


Who can add and edit the Opportunity Team?

  • The opportunity owner or users in the above role hierarchy of account owner
  • User with Modify All permission on the Opportunity object

  • Users with "Read/Write" access to the opportunity but not above the opportunity owner in the role hierarchy will NOT be able to add, edit, and delete Opportunity Team.


What is Default Account Team (and Opportunity Team)?

  • A list of users defined in the User (Account Owner or Opportunity Owner) setting

Who can add the Default Account Team (and Default Opportunity Team)?

  • In the user setting, the account owner or users in the above role hierarchy of account owner

Will the Default Account Team automatically be added to Account Team for ALL accounts owned by a user with Default Account Team?

  • It depends on "Automatically add my default account team to accounts that I create or accounts that are transferred to me" is selected when adding or editing existing Account Team

Will adding/editing a new user in Default Account Team automatically be added to ALL Account Team for accounts owned by a user?

  • It depends on "Update account teams with these members"  is selected when adding or editing existing Account Team

Issues with Default Account Team

  • The user may not aware that someone added a list of users as the default account team and set it to be auto-added to ALL Accounts or Opportunities own

  • The users added as default team may have changed role, where those users should not have extra access anymore on the Accounts or Opportunities owned by a user

SOQL

SELECT Id,OwnerId,CreatedById,CreatedBy.Name,CreatedDate,OpportunityAccessLevel,TeamMemberRole,UserId,User.Name,User.Profile.Name FROM UserTeamMember

SELECT Id,OwnerId,CreatedById,CreatedBy.Name,CreatedDate,AccountAccessLevel,ContactAccessLevel,OpportunityAccessLevel,CaseAccessLevel,TeamMemberRole,UserId,User.Name,User.Profile.Name FROM UserAccountTeamMember 

OwnerId = the account or opportunity owner, usually is the rep
CreatedById = the one who add user to default team members
UserId = user added as default team member

Unfortunately, we can't have the relationship query for OwnerId, so need to manually lookup to data from the User object.



Thursday, November 11, 2021

Salesforce: Account Team List View and Opportunity Team List View

Many years back, we wrote a blog on options in reports to show the account team and in the opportunity team, the similar options are available in List View too, let's check out:

In the Account report type, we have the option to show:
  1. All accounts
  2. My accounts
  3. My accounts team's accounts
  4. My accounts team and my accounts
  5. My team's accounts

In Account list view:
  1. All accounts
  2. My accounts
  3. My accounts teams
The first two options are clear, show all accounts or my accounts.
"My accounts teams", is similar to "My accounts team's accounts" in the report type, where the result ONLY accounts where you are in the Account Team.


The same applies in the Opportunity Team list view too, in the Opportunity report type, we have:
  1. All opportunities
  2. My opportunities
  3. My team-selling opportunities
  4. My team-selling and my opportunities 
  5. My team's opportunities
  6. My team-selling and their opportunities


In the Opportunity List view:
  1. All opportunities
  2. My opportunities
  3. My opportunities teams
  4. My team's opportunities
The first two options are clear, show all accounts or my accounts.
"My opportunities teams" -- all opportunities where you are in the Opportunity Team, this is similar to "My team-selling opportunities" in the report.

"My team's opportunities" -- all opportunities owned by me and owned by users below my role hierarchy, including all that report to my direct reports.


Reference:


Wednesday, July 7, 2021

Salesforce: Default Opportunity Team

In the previous post, we discussed Default Account Team, this post would be on Default Opportunity Team. Opportunity Team defines additional users that are involved when working in an Opportunity, with or without giving extra access to the team members to that Opportunity.

Opportunity Team is pretty similar to Account Team, but there is a difference in some areas, let's see as below.


What the same?

1. Both are defined in the user detail

2. Both can add or not add extra access to users added with a team role as team members

3. Both have a list of Team Roles and share the same values

4. Both have a Default team for a user

5. Both can be set up automatically add the default team to accounts or open opportunities when the user own Account or Opportunity

6. Both can add users as the default team on existing accounts or open opportunities

7. Both can manually Add Default Team from the Account Team or Opportunity Team related list

8. One user can be added only once to the Account team and to the Opportunity team


What difference?

1. In the Account team, the user can give access to Account, Contact, Opportunity, and Case, while in the Opportunity team, only can give access to the Opportunity.

Default Account Team


Default Opportunity Team


2. You can add account team members as opportunity teams from Opportunity Team related list.

Manual add user to Account Team


Manual add user to Opportunity Team



Tuesday, July 6, 2021

Salesforce: Default Account Team

We have discussed Account Team and Opportunity Team quite a lot in this blog simplysfdc.com, here is the summary: 

  • Account Team Report: multiple report results by selecting different options in Show Me using Account with Account Teams report type, also the difference with Account report type.

So what is Account Team in short? Account Team defines additional users that are involved in an Account, in addition to the Account Owner. The additional users added as the Account Team can have extra access permission or without extra permission Account and on the related Contact, Opportunity, and Case

In this blog, we will discuss using Default Account Team, the keyword here is Default. One user can only have one default account team (and one default opportunity team). The default account team is defined at the user detail, which is the Account Owner. This setting can be performed by the Account owner or users above the owner in the role hierarchy and having Read access on the account object.



Automatically add my default account team to accounts that I create or accounts that are transferred to me
The Default Account Team can be configured to be automatic, which means when the user owns an Account or Opportunity, the default team will be added automatically. To automate this, make sure "Automatically add my default account team to accounts that I create or accounts that are transferred to me" is selected. This setting applies to ALL users added as Account Team.

Similar to Account Team, you need to set access of Account, Contact, Opportunity, Case access, and Team Role when adding each user into for Default Account Team.

Default Account Team


If the checkbox "Automatically add..." is not selected, the Default Account Team will only be added when the user clicks the "Add Default Team" button from the Account Team related list.

Manually add Account Team


Update account teams with these members
To add the new members added to the default team for all existing accounts owned by the user, select Update account teams with these members when adding the users. You also can add an existing user who has been added as Account Team by editing the user in the Account team and selecting Update the account teams of my existing accounts.



Automatically add my default account team to accounts that I create or accounts that are transferred to me -- this applies to all users for an account owner.

Update account teams with these members -- apply only to selected users in the account team, this will only add users to the Account team. 

However, a user can be added to the Account Team only once, even with a different Team Role, so adding the same user to the Account Team will overwrite the existing user in the Account Team. The overwritten behavior applies to manually adding the default Account Team from the "Add Default Team" button.



Reference:





Sunday, August 9, 2020

Salesforce Lookup Filter

Lookup is a very simple feature in Salesforce, but also powerful, with just a few clicks you can relate an object to another object easily as a parent-child relationship.

However, in some business needs, the system should NOT look up ALL parent records, here is the scenario between Account (parent) and Case (child):

  • Case External --> Account Type = Customer
  • Case Internal --> Account Type = any

External and Internal is Case record type, and Type is the standard Account field. Of course, we can use validation rule to block Case creation for record type = External, but validation rule does not offer the best experience, as users will not easily know if an Account is a Customer or not.

Good that Salesforce offers Lookup Filter criteria and even better you can define the logic. For the above requirement, here my lookup filters. 

Make sure to enable the lookup filter.


Reference:











Wednesday, April 11, 2018

Salesforce: Account accessibility

As we mentioned in this blog Contact, Opportunity, Case access, Role Hierarchy play a part in giving Account owner accessibility (view or edit) of Contact, Opportunity, and Case tagged to the Accounts owned by the user.



However, how is the other way round, if the Opportunity (including Contact and Case) is not the same with the Account owner, can the Opportunity owner able to access Account where the user supposed not able to access that account?

The answer is yes, this is called implicit sharing. Salesforce provides implicit sharing between accounts and child records (opportunities, cases, and contacts), and for various groups of portal users.
  • Access to a parent account — If you have access to an account’s child record, you have implicit Read Only access to that account.
  • Access to child records — If you have access to a parent account, you have access to the associated child records. The account owner's role determines the level of access to child records, read this blog Contact, Opportunity, Case access.

However, this does not apply to lookup relationship for custom objects.

If you are still in Classic, you can check the sharing reason, read this blog Sharing Button URL. This implicit sharing will be shown with reason as "Associated record owner or sharing", if you click that link, it will show which records that associated and give the user access to the parent record.



Click "Associated record owner or sharing" link, in this sample, I click "Allison Wheeler".




Reference:

Thursday, March 1, 2018

Salesforce: Account Logo

Salesforce offers Account Logo for the US-based company in Salesforce mobile app and Lightning Experience since Summer 16 (beta) and becomes GA in Winter 17 release.



This feature needs to be enabled from Setup menu, looks for Account Settings, then select Enable Account Logos.

Users will be able to remove the default logo or provide feedback on the logo. If you remove the logo, other users will no longer see it, but you can’t undo this action, so remove with care.



One more thing to note, if you already use Salesforce for sometimes before enable Account Logo feature, all existing Accounts will not have Logo, only the one created after feature action may have a logo, Salesforce support mentioned this is working as per design.

However, there is no more enhancement of this feature since Winter 17 till now, there are many things can be enhanced, such as:
- Allow user to re-add logo removed
- Allow user to replace the logo on their own
- Allow user to upload logo to any Account and Lead
- Allow system to scan all existing accounts and add the logo

If your company looking into this, I think building custom Lightning component is the option for now, and you can vote this idea Customize Account Logo and this idea Allow custom contact photos and account logos not just social profile photos.


Reference:
- Get the Complete Picture with Account Logos (Generally Available)
- Enable Account Logos


Thursday, October 13, 2016

Salesforce: Contact Sharing Setting

When Account sharing rule is Private, options for Contact sharing will be: Private or Controlled by Parent only.

Use case with following sharing setting:
- Account: Private
- Contact: Controlled by Parent

For Account that user suppose do not have access to, but if any Contacts that user owned are linked to the Account. Contact Owner will be able to access the Account (read-only). But, this does NOT apply for indirect contact linked to Account via Related Contact to Multiple Account relationship.

Sample: screenshot below is all accounts visible to user:



and this is all contacts visible to user:



When user received a contact link to the account that user has no access "Google", in this sample "Mann, Saman", user will be able to see that contact. Furthermore, if the Account have multiple Contacts, user will be able to see all Contacts for that Account, in sample below "Li. Linda", even user does not own the contact:



Because now user own a contact Mann, Saman which is linked to Google account, user will be able to read Google account, furthermore user will also able to access Li, Linda although not owned by the user, because user have read access to the Account.




Notes:
1. Contact Owner will NOT able to link his/her Contact to an Account if the user do not have read access. The same also applicable for Related Contact to Multiple Account feature.

2. If your Organization-Wide Default for Contact is set to Controlled by Parent, you will not see Sharing button in Contact page layout.

3. All access to the contact is determined by the user's accessibility to the Account for that Contact.
But, since Contact is a special standard object with owner field (different with normal M-D relationship), contact have Owner. Even Contact sharing setting is set to Controlled by Parent, contact owner will be able to edit contact, and this would not related to the user accessibility to the Account.


Side notes related to Opportunity:
If Account is Private, this will cause Opportunity become Private.
The same with Contact, Opportunity Owner will be able to access (read-only) Account because Opportunity is linked to Account.


Reference:


Wednesday, October 12, 2016

Salesforce: Relate Contact with Multiple Accounts

In Summer 16 release, Salesforce introduces a feature to relate Contact with Multiple Accounts. The good thing is this feature is applicable for both Classic and Lightning UI, and in Salesforce1 as well. In Winter' 17 this feature even gets better, see this release notes.
  • Compact Layouts are now supported
  • Validation Rules are now supported
  • Triggers are now supported
  • Account-contact relationships can now be viewed


When you enable this feature, all of your existing relation between Contact and Account will not change, and they would become "Direct" relation - Account directly lookup from Contact will be called Direct. There will be a new related list called Related Contacts for Account Page layout, and Related Accounts for Contact Page layout.

You can see the Direct information from the new "Related Contacts" related list in Account Page layout, or "Related Accounts" related list in Contact Page layout. Personally, I would remove existing Contacts related list in Account, so users do not confuse with two almost similar related lists. You should modify Related Contacts related list to add all existing fields from Contacts and add Direct.


Setup
  • Navigate to Setup | Accounts | Account Settings
  • Enable "Allow users to relate a contact to multiple accounts"
Once enabled, you can define following actions:



Related Contacts related list from Apple Soft account page layout:



Related Accounts related list from a Contact page layout name Kim Bon:


You can add Custom field and Field Dependency for Account Contact Relationship from Setup | Customize | AccountsAccount Contact Relationship | Fields


Security Model

Add Relationship
All user (with read access to the Account) able to Add Relationship.
Click "Add Relationship" button from Related Contacts (in Account) or Related Accounts (in Contact), then fill in the account-contact relationship information.

Edit Relationship
Only user able to edit contact will be able to Edit Relationship.
Click View Rel (in Salesforce Classic) or View Relationship (in Lightning Experience) link. Then click "Edit Relationship" button.

Remove Relationship
Only user able to edit contact will be able to Remove Relationship.
Click Remove link and OK button to confirm.


Object
The object name for this is "AccountContactRelation", this is different with the old "AccountContactRole", which no longer supported in Lightning.


Reference:



Friday, March 18, 2016

Salesforce: My Account Teams List View

In the previous blog, we discussed options on the Account Team and Opportunity Team when generating reports. The other option for users to know if they are part of the Account Team or Opportunity Team is from List View.

In a custom list view, you can filter account lists by the account teams in which you are a member.
When creating or editing a custom list view for accounts, select the My Account Teams filter, the same in Opportunity List view you can filter by owner My Opportunity Teams.


My Account Teams :
  • I am a member of the Account Team, no matter who is the Account owner.
  • This will not include of my subordinates who is member of Account Team

My Opportunity Teams:
  • I am a member of the Opportunity Team, no matter who is the Opportunity owner.
  • This will not include of my subordinates who is member of Opportunity Team


Tuesday, March 1, 2016

Salesforce: Account Team Report

If you would like to report on Account Team in Salesforce, there is a report type provided by Salesforce, use the Account with Account Teams


The difference with the standard Account report type, this report type has information of Account Team Name (which is user name) and Team Role, but it must have Account Team, otherwise, the Account will be not in the report generated.

Account Team is a child object of Account, so if there are multiple Account Team for an Account, it will show as multiple rows for each Account Team in Tabular report.

In the Account report type, there are 4 options (not including All), while for the Account Team report type, there are 5 options to show (not including All).

Account report type:

Account Team report type:


We'll discuss the result for each option, but before that let's use the following org chart in this blog:



Here are the users in the role hierarchy and we'll log in as Maria Ann:
  • Jack Bob - CEO
  • Maria Ann - General Manager
  • Linda Yie - Supervisor 1
  • Free Man - Staff 1
  • Song Lee - Staff 4

My accounts: ONLY accounts you OWNED.

For Account report type

For Account Team report type

** My Inc is the only account owned by Maria Ann with Account Team, it is shown as 3 rows because there is 3 Account Team 
(user) for that Account.


My accounts team's accounts: ONLY accounts where you are in the Account Team.

For Account report type
** Maria Ann is the Account Team in these 2 accounts.

For Account Team report type
** This is exactly the same Accounts, it is just Firing Air has 2 users in the Account Team


My accounts team and my accounts: Accounts you OWNED & accounts where you are in the Account Team.

For Account report type
** This is a combination of My accounts + My accounts team's accounts for Account report type

For Account Team report type
** This is a combination of My accounts + My accounts team's accounts for Account Team report type


My team's accounts: Accounts you OWNED & accounts owned by all of your subordinates in the role hierarchy.

For Account report type
** This is all accounts owned by Maria Ann and her subordinates.

For Account Team report type
** This is all accounts owned by Maria Ann and her subordinates with Account Team

Compare the same Account Team report type run by Jack Bob - the CEO
** Account owned by Jack Bob not in the report when run by Maria Ann


Additional for the Account Team report type, there is an option called My team's accounts team and their accounts:
- Accounts you OWNED & accounts owned by all of your subordinates in the role hierarchy, plus
- Accounts where you or your subordinates in the role hierarchy are on the Account Team

** This report will skip Account with Account Team, where the Account owner is in the higher role hierarchy of running user, or all Account Team are in the higher role hierarchy of running user

Compare to the same report run by Free Man - Staff 1
** Big Corp and Firing Air is not here because neither the owner and the Account Team are owned by Free Man (and his subordinates - none in this case). My Inc will show 3x although only 1 Free Man there, this looks from My Inc perspective with the Account Team. 


Notes: when Territory Management is enabled, for report type = Account, you will have an additional option to show:
- My territories' accounts
- My territories' team accounts




Reference

Monday, January 18, 2016

Salesforce: Duplicate Management

More than a year ago, I blogged about using DupeCatcher as duplicate management tool in Salesforce. DupeCatcher was a good tool, but with many new enhancements around Salesforce recently, such as: Salesforce1, Salesforce for Outlook, and Salesforce themselves build something similar as out of the box feature called Duplicate Management (under Data.com setup menu). Also, recent poll in Success - Premier Central, standard Duplicate Management has been used by 45% of community.

After play sometimes with Duplicate Management, I foresee this tool able to replace aging DupeCatcher which has been not updated for quite sometimes. What I like from standard Duplicate Management compare with DupeCatcher:
  1. Work well with Salesforce1 app
  2. Work with Salesforce for Outlook
  3. Better duplicate reporting
  4. Respect duplicate management rules for mass data load

To setup Duplicate Management, navigate to SetupData.com AdministrationDuplicate Management.

1. Matching Rules
Matching rule compares field values to determine whether a record is similar enough to existing records to be considered a duplicate. For example, a matching rule can specify that if the Email and Phone values of two records match exactly, the records might be duplicates.

Matching rules would be the 1st step you need to setup to configure duplicate management, by default Salesforce provide 3 matching rules for Account, Contact and Lead, but they are inactive. In many cases, you need to create your own matching rules based on how your company / organization defined matching rules. See reference links below to understand standard matching rule for Account, Contact and Lead.

To create your own rules, from Matching Rules page click New button.
  • Step 1. select an object: Account, Contact, Lead or custom object
  • Step 2. enter rule name, description, select fields to compare as matching criteria, you also can add filter logic if it is not always AND. Depend on the selected field type, matching method can be Exact or Fuzzy.
  • Step 3. activate the rule, once the rule activated, you will get email that the matching rule has been activated and ready to use.


2. Duplicate Rules
Duplicate rules work together with matching rules to prevent users from creating duplicate records. A matching rule determines whether the record a user is creating or updating is similar enough to other records to be considered a duplicate, whereas a duplicate rule tells Salesforce what action to take when duplicates are identified. For example, a duplicate rule can block users from saving records that have been identified as possible duplicates, or simply alert users that they may be creating a duplicate, but allow them to save the record anyway.

To create duplicate rules, from Duplicate Rules page click New Rule button and select the same object of Matching Rule created earlier, for this blog I'll be using Account. Next page, you need to specify:
  • Rule Name and Description
  • Select "Record-Level Security", I'll select "Bypass sharing rules" for this blog, this mean matching rule will compare to the whole database regardless user accessibility
  • Action on Create and Edit: allow or block
  • Alert Text
  • Select matching rule created
  • Optionally you can add conditions

Once duplicate rule created, you need to activate it.


When duplicate rule is activated and user enter duplicate data, since we allow user to create or edit with alert, user will get option to Cancel or Save (Ignore Alert), it also shown existing record consider as duplicate with the one user trying to create or edit.


By default, it will show fields used in the matching rules, at this moment we are not able to configure it. Thanks to Francis Pindar for his workaround to have fake matching rule to display fields as needed.


Duplicate Record Reports
As I said earlier, we can report on duplicate record easily, you need to create custom report type by each object (Account, Contact and Lead, or  All Duplicates), read this document Create Custom Report Types for Duplicate Record Reports for the steps.


Reference:


Friday, December 18, 2015

Salesforce: Lead Source fields

When adding new Contact or Lead to a CRM system, you would like to note how you get know to that person? That's why by default Salesforce provide standard field or Lead Source is 4 main objects below, and they are picklist fields. You can customize the values based on your organization business model.
  1. Lead - Lead Source
  2. Account - Account Source
  3. Contact - Lead Source
  4. Opportunity - Lead Source
Over the time, you may modify the lead source values accordingly, but to note that: the values of 4 fields above in 4 objects above are in sync, this mean, if you add a new Lead Source value in Lead, it will copy to other objects, the same when you edit, delete and re-order values.

When you convert a Lead to Account, Contact and Opportunity, the conversion value of Lead Source from Lead will bring to Contact and Opportunity Lead Source.


Reference:


Saturday, August 29, 2015

Salesforce: Track converted Account or Opportunity from Lead

When a Lead in converted into Account, Contact and Opportunity in Salesforce, you can easily track what is the Account and Contact created (or attach to existing Account and Contact), included Opportunity created (if any). By opening the converted Lead in Salesforce, it will show you the Account, Contact and Opportunity name and link, although you will no longer see the Lead detail, except using "Leads with converted information" report.


But, looking from Account, Contact and Opportunity perspective, it is not easy to identify which of them are converted from Lead. However, if you have field history tracking enabled, looking at the object history related list will tell you if the record is created by Lead conversion or not.

Account History

Opportunity Field History

This will be not ideal if you would like to run a report of Account or Opportunity with Lead conversion information, because that information relationship only available in report with type Leads with converted lead information.

Workaround: we can built a simple solution (without code), in this scenario, we would like to report if the Opportunity is created from Lead conversion, and if yes, from which Lead.

1. Create Custom Text Field at Opportunity
Create a custom text field in Opportunity, and make sure with 15 or more characters length.

2. Create a Custom Formula Field at Lead
This formula will return in Text format. The formula would be just a simple Id that will return 15 characters length of the Lead Id, or CASESAFEID(id) to return 18 characters length of the Lead Id.

3. Map Lead Field
From Lead field setup, map custom formula field at Lead to custom text field at Opportunity, this is fields we just created above.

4. Done
Pretty easy, isn't it? From now on, we will be able to tell by running an opportunity report, if the Lead Id is not blank, the Opportunity is created from Lead conversion, otherwise it is not created from Lead conversion.


How to handle if user Clone the Opportunity?
A classic issue that we thought that the Lead Id will be bring over to the new Opportunity cloned, so the Lead Id information is no longer correct. This is only true if we add Lead Id custom text field in to Opportunity page layout.

This mean, Clone function will only clone fields that show in the page layout. By remove that field in the page layout, it will not clone Lead Id. See sample below:



As a double protection to make sure the Lead Id will never be cloned to the new opportunity:
1. Set the text field in Opportunity to 18 characters (for case insensitive Id)
2. Set the text field in Opportunity as Unique and not Case Sensitive
3. Set the formula field in Lead to CASESAFEID(id)

This will protect if in the future, someone build a custom clone functionality, system will throw error by not allowing duplicate Lead Id in Opportunity.



Page-level ad