Pages

Sunday, October 24, 2021

Salesforce: Topic in Lightning

Topic is another Salesforce feature that is probably not so well-known, but with good governance and maintenance, it served as a good tool to organize posts and records. Topics are case insensitive. 

Where to add Topics?
Topic is enabled by default for Chatter Post in Lightning. Topic also can be enabled for objects, follow this link to enable it.

To add topics in Chatter post:
  • start with # continue with the topic, for example, hello world, hit enter key then continue with the post, in this case, the topic is 2 words - hello world
  • You can have multiple topics in chatter port. 
  • As you type after #, the system will look for existing topics and you can simply select the existing topic.
To add topics into a record object:
  • Do not need to start with #, just type the topic and hit enter when done. 
  • Need to type in the Topics component in lightning, see post below for Topics component. 
  • You need to have edit permission on the record to be able to add topics to that record. 
  • Same with adding topics in the Chatter post, you can add multiple topics for a record, also as you type, the system will look for existing topics and you can simply select the existing topic.

If you open a topic, the topic in the Chatter post will show under Feed, while topics added to records will show under the Related tab.





Topics Component
Once you enabled Topics for an object, you need to add the component to the Lightning page, so your users can use it.



Reporting
You can run a report on Topic to see the usage, including the related records, you need to create a custom report type with Topic Assignments as the primary object.


If you do not have access to the record, you will not see the topic in the report too.


Search
You can search a topic from the global search box, you do not need to add # before the topics. see screenshot below, the one on the top is correct.



Deleting Topics
Only users with Delete Topics permission are able to delete a topic, this is only for the topic that relates to a record (not for a topic related to a Chatter post). Once the topic is deleted, topics added in the related record will be removed.



Reference:

Sunday, October 17, 2021

Tableau CRM: Getting Started with Recipe a.k.a Data Prep 3.0

Recipe has existed in Tableau CRM for a long time, but not really used a lot because Dataflow offers more powerful data transformation, although there are functions which only available in Recipe, such as Join. However, in the last few releases, Salesforce introduced a new term called "Data Prep 3.0", which actually is Recipe, and stop to enhance everyone's darling "dataflow".

When Data Prep 3.0 was introduced (I have no idea if there was Data Prep 2.0 and 1.0), it was not so popular because of the lack of functionalities, such as support to upload/download JSON, use SAQL, etc. Since then, in every release, more and more features are added to the Data Prep/Recipe, so it may be worth starting to look at it.

As per the Winter '22 release, at a glance, Recipe now looks quite promising, it supports many things: 

  • Download/upload recipe in JSON -- same with Dataflow
  • Formula with query -- comparable with computeExpression in Dataflow
  • Multiple row formula -- comparable with computeRelative in Dataflow


Here are things that are better in Recipe compare to Dataflow

  • Join (Left, Right, Inner, Outer) -- this is not available in Dataflow
  • Preview -- we cannot preview data in Dataflow
  • Layout stay when save -- you need EADashboardHelper in Dataflow
  • Multiple actions in a Transform node -- less node compare to Dataflow
  • Aggregate
  • Sentiments, Predict Missing Values, Cluster
  • Trim, Substring, Split, Uppercase, Lowercase, Replace -- some of them can be achieved with computeExpression in Dataflow
  • Format Dates, Bucket, Edit Attributes

Here are things that can be improved in Recipe
  • Ability to re-order items in Transform node 
  • Ability to re-order column in Preview data
  • Ability to sort and filter Preview data
  • Running a recipe does not show details in Monitor

A sample of Recipe


Formula in Transform node is based on TCRM SQL, so this is not SAQL, or SOQL.
for example: SQL
case 
when LeadSource = 'Partner' OR  LeadSource = 'Web'
then 'Partner Web'
else LeadSource
end

for example: SAQL
case 
when LeadSource == "Partner" OR  LeadSource == "Web"
then "Partner Web"
else LeadSource
end


Direct Data in Recipe

Winter '22 release also make Direct Data in Recipe become General Available. With Data Direct, you can access Salesforce live data in the recipe, not accessing data stored in Tableau CRM via sync. However, but sync needs to be enabled in the Tableau CRM to use this.

Another catch is, you cannot use direct data when the object has been sync to Tableau CRM, example: you have dataflow or recipe that sync Opportunities, then Opportunities will no longer be available for Data Direct, which is quite sad, sometimes we need to access the real-time data directly, not "obsolete" stored data in Tableau CRM.

When I search "Opportunity". because the opportunity object already syncs in Tableau CRM from other dataflow/recipe, it will only be available via Connected (in yellow), not Direct (in green)



If you have more things that not cover here or the information shared here is wrong, feel free to comment on this blog or reach me.



Wednesday, October 13, 2021

Salesforce: Email Template with Hyperlink

We shared about the Lightning Email Template seven months ago, as you read, it is easy to create an email template with merged fields, such as Account Name, Opportunity Name, etc.

However, those merge fields are not clickable (not hyperlink), so if the email sent is to your internal Salesforce users, it will be ideal if recipients are able to open the link directly from the email received.

Let's do a quick hands-on, in this example, I would like to build an email template for Case, contain 2 hyperlinks:

  • Case Number, to open the case
  • Account Name, to open the Account in the case

Here is the step:

1. Create the email template 

Create the email template as per normal, add all merged fields needed


2. Case Number hyperlink

Open a case from your browser and grab the URL and copy to a text editor, for example, https://d90000000ky88eag.lightning.force.com/lightning/r/Case/50090000001O98rAAC/view

Change the Case ID (as in red) and replace with {{{Case.Id}}}, now we have https://d90000000ky88eag.lightning.force.com/lightning/r/Case/{{{Case.Id}}}/view

Copy the above URL, select {{{Case.CaseNumber}}} from the email template, then click the Link icon (2nd from right) and paste the URL above (in the yellow background) here, then click the Save button.


3. Account Name hyperlink

Repeat the same for Account Name, get the URL and change the Account Id, so it will look like
https://d90000000ky88eag.lightning.force.com/lightning/r/Account/{{{Case.AccountId}}}/view 

Copy the above URL, select {{{Case.Account__c}}} from the email template, then click the Link icon (2nd from right) and paste the URL above, then click the Save button.

If you notice I use Case.Account__c, this is simply telling that I have a formula field in Case to get Account Name from AccountId.


4. Sending Email

Open a case and click the Email tab, select the email template created, and notice the email body is auto-populated with hyperlinks.



Reference:



Friday, October 1, 2021

Salesforce: Clone & Fields in Page Layout

Clone
  • When you clone a record, by default, fields that are not in the page layout will not copy to the new record.
  • If the record you’re cloning or a related record contains a field you don’t have access to, the field in the new record is blank.
  • If the record you’re cloning contains a field you have read-only access to, the field in the new record is blank.
  • If a related record contains a field you have read-only access to, the field value is copied into the new record.

Related List
When you create a child record from the parent Related List, even the parent field is not in the child page layout, the parent value will be populated.


Reference:

Page-level ad