Pages

Monday, November 23, 2020

Salesforce: Notification Builder

Salesforce offers an easy way to notify a user, such as a record owner, team members, etc. You do not need to wring a single line of code to build this (if you prefer), remember admin motto "click-not-code").

The notification will appear in Salesforce mobile app and Lightning experience (desktop web browser), but you can determine if you want the notification to appear in  Salesforce mobile app only or the Lightning experience only, or both environments.

Only a few step an admin need to build notification.

1. Create Custom Notifications

This is where we determine where the notification will show, mobile or desktop, or both.


2. Send Custom Notification from Process Builder

In addition to using Process Builder, the notification also can be sent from Flow Builder, Apex, and API.

In the Process Builder, from Action Type, select "Send Custom Notification"


Then, we can define who will be notified

Activate the Process once completed.


Here is a sample of notification in Lightning experience for Opportunity owner


Thursday, November 12, 2020

Salesforce: Controlling Record Access (Contact, Opportunity, Case)

In the previous blog, we discussed sharing record with sharing rules using Public Group & Role. In this blog, we will discuss the additional options to share records based on the object types.


Grant Access Using Hierarchies

In the Organization-Wide Defaults, we can see if Grant Access Using Hierarchies is enabled for each object. For Standard objects, this is enabled by default and cannot be disabled, while for custom objects, admin can enable/disable "Grant Access Using Hierarchies" for each object.

If Grant Access Using Hierarchies is enabled, users in the above role hierarchy will be able to access or edit the records (depend on the profile permission too).

sample: Maria Ann able to access the record, because she is assigned with the higher role hierarchy of the record owner Free Man

While if Grant Access Using Hierarchies is disabled, users in the above role hierarchy will not able to access the records of that object, unless it shared using other methods, such as sharing rules, or etc.


Access to Contact, Opportunity, and Case from Sharing Rule

Contact, Opportunity, and Case are standard objects for Sales/Service Cloud, but these 3 objects are special and different from other standard Salesforce objects, they are linked directly to Account, and admin able to configure access to records in these 3 objects based on the Account ownership.

When you create a sharing rule for Account, you will able to set Contact, Opportunity, and Case access too, so you can define Contact, Opportunity, and Case access from Account Sharing Rule.




Access to Contact, Opportunity, and Case from User Role

Each user ideally assigned with a role. In the role setting, there is an additional access setting for Contact, Opportunity, and Case. 

As the above screenshot, from Role setting in the role hierarchy, user may be able to view or edit Contact, Opportunity, and Case if the user owns the Account. This also includes users in the above role hierarchy of the record owner.



Monday, October 19, 2020

Salesforce: Currency converted fields in Report

This is only applicable for org. has Multiple Currencies enabled.

Converted fields available in the reporting: 

  • for all currency fields, including formula field that return in currency type.
  • for both standard and custom report type

The converted fields only available in the reporting, but not in the page layout as extra fields, and also not in API access.

When creating a report, the default converted currency fields are based on the user's personal currency, this can be changed by editing the report and select a different currency, users run the report will see in the selected currency when the report saved. This is applicable in both Classic and Lightning environments.

You can use the currency fields as a bucket, but it would be in the original record currency, and cannot use the converted fields for a bucket in the report.

The workaround is to use Row-Level formula, then bucket with Row-Level formula field, e.g.

IF (ISBLANK(AMOUNT.CONVERT), "BLANK",
  IF (AMOUNT.CONVERT=0, "ZERO", 
  IF (AND(AMOUNT.CONVERT>0,AMOUNT.CONVERT<10000),"SMALL","BIG")
    )
)

If the above report show is shown in EUR, so the 10000 defined in the Row-Level formula would be in EUR 10,000. 


 

Reference:



Sunday, September 27, 2020

Salesforce: Send List Email

To continue our previous blog Send and Log Email from Salesforce, in this blog, we will share how to send mass emails from a ListView. Why I specifically mentioned ListView? because ListView is simple yet powerful feature in Salesforce, your user can create their own list view easily (define columns and filters), and by combining this to mass email, it would be very productive. Imagine that your rep needs to mass email only to Contact with a certain value, such as Lead Source is "webinar", they can easily create a list view for this.

Salesforce by default provides a button called Sent List Email, and the admin needs to check user permission and make sure it is enabled for your users. 


Permission
Users need to have "Allow sending of List Emails" permission, otherwise, they will not see this button, if you are enabling this permission, it will also enable 3 other permissions related to this permission: Send Email, Edit Task, and Mass Email.

Enable Button
Admin needs to make sure that "Sent List Email" is enabled, go to the Lead or Contact object, then edit the Search layout. As of Winter '21 release, this option is still under "Search Layouts for Salesforce Classic"


Email Limits
In the previous blog Send and Log Email from Salesforce, we mentioned when sending email from Salesforce, we can use email templates, merge fields, attach files, signature, and so on, the same feature is available when sending mass email from "Sent List Email". 

The difference is, you will see a limit tell you on how many emails can be sent, and this limit is for the whole user in the org., not for the individual user. As per this article, we can send 5,000 external emails per day based on GMT.

Save as Draft
Another difference when using "Sent List Email", offers "Save as Draft", when composing your email, but unable to send it yet because of something else, instead of discard that email, you can save it as a draft. You will not see this when sending email from a record. See the button before Send in the above screenshot.

How to access email save as draft? Open the "List Emails" tab (from 9-dots if you do not see it), open the email composed, then click Edit. 

You will see the status of the email sent, name, owner, and etc.


Notification Email
After all of the emails sent, you will get an email notification from Salesforce


Email icon
Another difference of email sent via "Sent List Email" is the icon of email under Activities, instead of the standard envelope icon, the icon for email sent with "Sent List Email" is multiple envelopes.


As per this blog EmailMessage object, emails will be stored under EmailMessage object with prefix 02s, however, email sent via "Sent List Email" will be stored in a different object called ListEmail with the prefix of 0XB.

Send Later
The Winter '21 release offers an additional feature for email sent via "Sent List Email", users can select the email to be sent later, set a perfect date and time when the email will be sent.




Reference:



Send and Log Email from Salesforce

Email is a very basic thing in our daily work, we can send emails from Google or Outlook, then manually log the email to a record Salesforce for the future reference.


Email logged to Salesforce will appear as under the activities component. If we logged it against Contact, it will appear in the Account too, this is because of the special parent-child relationship between Account and Contact.


Salesforce also offers the capability to send emails directly from the platform, and the emails sent will be automatically logged to the Contact or Lead.


If you notice that email sent from the Salesforce will be tracked; if the recipient opens the email, we will see when it opened. While email sent from Outlook and manually logged to Salesforce will have no such tracking information in Salesforce.


Salesforce offers the below features when sending an email:

  • rich-text format
  • image
  • link
  • quick text
  • attach file
  • merge field from Salesforce
  • template
  • preview
  • popout to dock view
  • signature (from user Settings >> Email >> My Email Settings), check out this and this article to add image and link to your email signature


One thing to note when sending from Salesforce using standard configuration, if the recipient uses Gmail, they will see the email is sent via Salesforce.


To understand how email is stored in Salesforce, check out this blog EmailMessage object.


Note: this blog is written without Inbox and EAC configured. 


Reference:


Monday, August 10, 2020

Einstein Analytics: Deploying Conditional Formatting

When you deploy the Einstein Analytics dashboards contain conditional formatting using ANT or Change Set or simply copy and paste the dashboard JSON, conditional formatting will not follow, you need to manually configure the conditional formatting again in the target environment manually.

This is because conditional formatting in the dashboard is stored under dashboard XMD, so if you deploy the dashboard XMD, then conditional formatting will be deployed.

In this blog, I will use Workbench to deploy this.

1. Create package.xml file

<?xml version="1.0" encoding="UTF-8"?>

<Package xmlns="http://soap.sforce.com/2006/04/metadata">

    <types>

        <members>Test_Conditional_Formatting</members>

        <name>WaveXmd</name>

    </types>

    <version>48.0</version>

</Package>

Test_Conditional_Formatting in above sample is the dashboard API name, you can check dashboard API name from Workbench too https://workbench.developerforce.com/restExplorer.php?url=/services/data/v48.0/wave/dashboards&autoExec=1


2. Retrieve dashboard XMD file

From workbench login to source org. > migration > retrieve, select package.xml prepared in step (1) >  click Next button > click Retrieve button > download zip file

3. Deploy Zip file

Make sure the dashboard has been created/deployed in the target org. From workbench login to target org. > migration > deploy > select zip file from step (2) > click Next button > click Deploy button 


Now open the dashboard in target org and the conditional formatting has been applied.




Page-level ad