Total Pageviews

Sunday, January 13, 2019

Skinny Tables solution to time-out errors in Reports



How often you have came across a frustrated salesforce user who is looking towards you to solve the nagging time-out error while running his/her reports. I do not know about you but I have encountered quite many angry users who are too eager to abandon the wonderful platform that salesforce is due to timeout issues with reporting. When the database grows and an object houses around 100K records or more , the performance of salesforce report may not be optimum.  So what is the way around ? - Indexing - well its many times suggested as a workaround by Salesforce but SFDC more often than not applies indexing automatically on all the system fields ( created date , sfdc id, created by id, etc.) Creating an additional field for indexing may improve the performance a little bit but nothing phenomenal will happen. Please note indexing on any field other that auto-number and system fields can be done by creating a case with salesforce support.

Does it mean we are stuck with no solution in view ? No we can use "Skinny Tables" to provide succour to the users. Salesforce provides a feature called skinny tables which are created to hold frequently used fields and to avoid expensive joins. This will boost the performance of certain read-only operations. Salesforce keeps them in sync with their source tables when the source tables are changed.


How to get "Skinny Tables"?
If you want to leverage skinny tables , contact Salesforce Customer Support. They can enable it for you ,once enabled, skinny tables are created and used automatically where appropriate. You can’t create, access, or modify skinny tables yourself. If the report, list view, or query you’re optimizing changes—for example, to add new fields—you’ll need to contact Salesforce to update your skinny table definition.
Why use of "Skinny Tables" leads to performance enhancement? 
Salesforce in practice maintains the "Standard" and "custom" fields in separate tables which is not visible to us. Hence any query involving custom and standard fields - at the data level involves requires a join , hence the depletion in performance as database or table size increases. Skinny tables houses both custom and standard fields in same table hence leading to an enhancement in performance.
On which objects can "Skinny tables be used" ?
Skinny tables can be created on custom objects, and on Account, Contact, Opportunity, Lead, and Case objects. They can lead to enhancement of performance for reports, list views, and SOQL.
A word of caution
There’s an overhead in maintaining separate tables that hold copies of live data. Using skinny tables in an inappropriate context can lead to performance degradation instead of improvement.

Saturday, December 29, 2018

Have you E- Quip -ed yourself!!


We all in the business of consulting are required to showcase our acumen to prospective clients via presentations / decks, etc.  Any such document creation requires different and distributed teams to work and collaborate together.  In such a scenario we all struggle with numerous email chains and versions of document to keep track of the latest approved content. In short working in a collaborative environment may prove to be chaotic and keeping track of latest content is a painful aspect.  We all have struggled with filenames like - "SalesDeck_v1", "SalesDeck_vn" , "SalesDeck_vn_final" or "SalesDeck_vn_final_latest".

Quip - collaboration suite is the answer to above mentioned chaotic situation. Quip enables us to create, edit, discuss, and organize our work using the features provided  in its content collaboration platform. It fuels a culture of action across any organization with documents, slides, and spreadsheets that stay up-to-date and keep the conversation in focus.
One might ask why use Quip , why not any other cloud based ( I trying to avoid taking names here) solution which also provide online documents. The reason is explained in the following diagram taken from Quip"s official website .


Additionally the features provided by Quip will further make the argument in favour of using quip much stronger.  Some of the features which Quip provides are:-
  • Real-time collaboration –Quip provides built-in chat and also supports co-editing and commenting to create version-free slides together, faster.
  • Live Charts — It provides Interactive charts which connect to real-time data in Quip Spreadsheets. One can even connect charts to spreadsheets backed by Salesforce Reports. 
  • Live Data — It allows Embeding of live data from Salesforce and third-party systems through Live Apps. One can keep their slides up to date with real-time data easily and automatically.
  • Feedback Prompts — It facilitates feedback through its feature of :-
  1. adding questions
  2. polls
  3. comment prompts in our slides 
to engage our audience, get feedback, and drive decisions faster.
  • Engagement Insights – It also enables users to check which stakeholders have viewed our presentation, and which slides have the most (or least) engagement.
Quip is the latest feather in Salesforce's kitty of acquisitions and attempt to make its platform robust and responsive to need of modern day work reality. 

Friday, December 28, 2018

Does the multitude of BPA Tools in SFDC puzzle you?


Salesforce is a very dynamic platform which keeps adding amazing tools and features to its kitty on a quarterly basis. The addition of new forward looking features shows that through its platforms like - "Idea-force or Ideas" , "Success-force","Feedback Channels" , "Community Platforms" its constantly listening to what its user community and customers are talking w.r.t. improvements , enhancements, small and big modulations to bring about customer delight. While that provides us multiple options to implement our solutions at times one may feel a bit lost about which tool to adopt for the problem at hand.
One of the classic examples is multiple tools available in salesforce for BPA or "Business Process Automation" tools. We all are aware that the options available are :-
  • Workflow Rules
  • Approval Processes
  • Process Builder
  • Cloud Flow Designer
Please note these are admin or configuration tools (some will need developer skills) , we also have the option of full-blown custom solution using code , which should be avoided as they pose challenges with house-keeping and maintenance in the long run.
The question which might bother a rookie is that- which tools to use and when? Well let's consider some scenarios to answer that. 
Scenario I 
Let's say your sales-rep has submitted a request for organising a "Training Activity" which goes to his/her manager for approval. In such scenarios where approvals are required by a supervisor utilise - "Approval Process"

Other set of Scenarios
Let's say our Business Process requires action based on certain values of the record in such a case we can utilise Work Flow Rule, Cloud Flow Builder and Process Builder

Scenario II
Simple/single  if-else condition warrants use of "Workflow Rule". Also if your use-case involves :-
  1. only updating fields of the record or its parent record  
  2. sending outbound message without code
  3. creation of tasks
  4. email alerts
Scenario III
Complex if-else condition warrants use of "Process builder". Also if your usecase involves:- 
  1. update of any related record 
  2. post to chatter
  3. creation of records
  4. email alerts
  5. invoke flows or other process
  6. Things cannot be done via process builder are sending outbound messages without code and getting input from end user.
Scenario IV
If your usecase requires getting information from Users or Customers , which is then followed by doing something with those inputs one needs to use Cloud Flow Designer . Also use CFD if your usecase involves the following:- 
  1. requires user interaction
  2. update of any  record 
  3. delete records
  4. post to chatter
  5. creation of records
  6. send email
  7. launch a flow
  8. Things cannot be done via CFD are sending outbound messages without code and cannot invoke process.
 The above scenarios provide an insight into which path to embark upon while automating your business processes.  More in my following blog , bye for now, have a great holiday season!

Wednesday, December 26, 2018

Look and Feel aka Themes & Their Detection in Salesforce



Now a days we all invariably or mostly are using the Lightning Experience theme. Of late there are quite a variety of themes in Salesforce , have you ever felt the need to know the theme which is currently being applied when a page renders. You might say, big deal I know the theme I have applied to my pages so why bother. Well as per the documentation of Salesforce and many practical experiences , the rendered Theme may not be the same as the theme applied to the page and its guided by the browser being used and the final outcome is decided not by "preference and permission" but the ability of the browser to support the selected Theme. It is necessary that I mention the term "user interface context" for clarity on this topic , its nothing but the technical term for UI rendered. Also w.r.t. U. I. C. ("user interface context") it's vital to understand the difference between the user interface context requested by the user, and the user interface context the user is actually in. The former is guided by preference and permission applied and the later is the view which is actually rendered. Salesforce has the following themes in its kitty as of now :-
  • Theme1—Obsolete Salesforce theme
  • Theme2—Salesforce Classic 2005 user interface theme
  • Theme3—Salesforce Classic 2010 user interface theme
  • Theme4d—Modern “Lightning Experience” Salesforce theme
  • Theme4t—Salesforce mobile app theme
  • Theme4u—Lightning Console theme
  • PortalDefault—Salesforce Customer Portal theme
  • Webstore—Salesforce AppExchange theme


At this juncture its important that 2 sets of variables/ methods are introduced :-
  1. $User.UITheme in VF Pages gives the value of applied theme / UserInfo.getUiTheme() in Apex gives the value of applied theme
  2. $User.UIThemeDisplayed in VF Pages gives the value of rendered theme / UITheme.getUITheme() in Javascript gives values of current rendered theme/ UserInfo.getUiThemeDisplayed() in Apex gives the value of rendered theme
Utility of knowing Theme:-
  1. For conditional rendering of fields in VF pages
  2. For conditional application of Stylesheets
  3. Detecting the current user experience context in JavaScript code is important if we are relying on JavaScript heavily, especially for purposes for managing navigation in our JavaScript code.
I will close it here as of now , but in case you think that the Assistant in Lightning needs to get more versatile please do upvote the following idea:-






Additionally if you feel that the "News Component" of Lightning in SFDC is not much help in its current form :-
  • not customisable w.r.t. websites from where the feed is pulled
  • not customisable w.r.t. context and keywords currently the algorithm matches exactly with the Account Name or is tightly coupled with the Account Name
You may want to upvote the following idea on "News Component" if the above issues too bothers you.

Tuesday, December 25, 2018

Lightning Blues- Demystifying the Assistant


Lightning and the buzz around has always led to the rise in expectations to exponential levels. As is the case with such scenarios the high hopes at times leads to quick dis-illusion by primary user groups and the platform is held responsible for mis-match in expectations. I have already heard murmurs of delay in Go-live or Lightning does not give that it promises and clamour for customised solutions. While ask for customisations may sound like music to consultants and consulting companies , we need to hold back take a deep breath and analyse the gaps. Lightning is a wonderful and amazing platform aimed at making life of the END USER EASY, but as Salesforce says and keeps repeating it requires planning, through analysis , identification of gap and analysis on bridging the gaps - more often that not you will be surprised that sometimes solution lies in adapting the process to the platform.
One such amazing feature rolled out OOB is the Assistant- which tells us about:-
  1. Tasks overdue
  2. Task assigned today
  3. Leads assigned today
  4. Opportunities with overdue tasks
  5. Opportunities with no activity in 30 days
  6. Overdue Opportunities
So far so good, but there are some pitfalls like:-
  1. An orphan overdue tasks will not be shown by assistant - to be shown it has to be attached to an opportunity, but do not get disheartened as you could post this in "Ideas" and alternatively use "Today's Tasks" component
  2. Also please do check that is "Einstein Activity Capture" feature is on updates on activity less opportunities will be suppressed.
  3. Also if you are not seeing the updates on activity please check that if your profile has access to the "Activities on Opportunity"
  4. Another set of heart-burn is around no visibility Buttons or Assistant Actions for "New Task" , "New Event" , "Send Email" - please check the following:-
  • Actions need to exist as Global actions
  • Also you need to have access for these actions
  • Remember that these actions need to be added in "Publisher Layout" under section - "Salesforce Mobile and Lightning Experience Actions"
  • Also remember as of now only Standard Global Actions are available and custom actions cannot be added

Friends adoption is always the tricky part requiring patient analysis , discovery and trouble shooting.

Sunday, April 16, 2017

Lighting - Interview Questions


All my friends working on SFDC or Salesforce are aware that lighting is the latest in-thing. Also those trying to cross to the cloud will be greeted by this catchy word! I will not go into the technicalities of it but would like to list out some of the frequently asked questions on lightning.

Q: What is Lightning?

A: Lightning is the collection of tools and technologies behind a significant upgrade to the Salesforce platform. Lightning includes:
Experience: A set of modern user interfaces optimized for speed. This includes the Lightning Experience, Salesforce1 Mobile app and template-based communities.
Lightning Component Framework: A JavaScript framework and set of standard components that allow you to build reusable components to customize the Lightning Experience, Salesforce1 Mobile app and template-based communities and build your own standalone apps.
Visual Building Tools: Drag-and-drop technologies for fast and easy app building & customizations. Use the Lightning App Builder to customize the Lightning Experience and Salesforce1 Mobile app. Use the Community Builder to customize template-based communities.
Lightning Exchange: A section of the AppExchange where you can find 70+ partner components to jumpstart your development.
Lightning Design System: Style guides and modern enterprise UX best practices to build pixel perfect apps that match the look and feel of the Lightning Experience and Salesforce1 Mobile app.

Q: Is Lightning an MVC framework?
A: Unlike salesforce lightning is a component-based framework.

Q. Which parts of Lightning Components are server-side and which are client-side ?
A: Lightning Components are use JavaScript on the client side and Apex on the server side.

Q: Can I make a Lightning Component that shows up in both the mobile and the desktop user interfaces?
A: You can use Lightning Components directly in Lightning Experience, the Salesforce1 Mobile app, template-based communities, and custom standalone apps. Additionally, you can include Lightning components in a Visualforce page, allowing you to use them in Salesforce Classic, Console, and Visualforce-based communities.

A:Can we make one component inherit styles/CSS from a parent component, or must we always define it in the component ?
Q: Yes, we can inherit styles from parent. there is no need to always defined in the component.

 Q:Can we Include One component to another ?
 A: Yes, we can Include one lightning component to another lightning component

Q: What is Aura? Why do I see the aura: namespace in the code?
A: Aura is the open source technology that powers Lightning Components. The aura: namespace contains all of the basic building blocks for defining components and applications.

Q: Do I need a namespace to develop Lightning Components?
A: No. Lightning Components used to require a namespace, but that is no longer a requirement.

Q: Where can a component be displayed?
A: After you create a component, you will want to display it somewhere. There are a number of possibilities.
Lightning Experience: Display your component in the Lightning Experience using the App Builder. You can edit the home page, edit a record detail page or create/edit a new app page to include it. Alternatively, you can create a custom Lightning tab that references your component and add that tab to your Lightning navigation.
Salesforce1 Mobile app: Display your component in the Salesforce1 Mobile app by creating a custom Lightning tab that references it and adding that tab in your mobile navigation.
Template-based community: Display your component in your template-based (e.g. Napili) community using the Community Builder.
Standalone Lightning app: Create a standalone Lightning app (e.g. myapp.app) and include your component in this app. Access your Lightning app by URL.

Q: Do I always create an app bundle first?
A: Not necessarily, you can start with a Component bundle.

Q:Where Lightning components can be displayed ?
Ans :
In Lightning App (.app URL)
In Salesforce1 app as a Tab
As a lightning extension

Q: Is there any limit on how many component to have in one Application ?
 A: There is no limit.

Q: What is difference between Visualforce Components and Lightning Components ?
A: Visualforce components are page-centric and most of the work is done on the server. Lightning is designed from the component up, rather than having the concept of a page as its fundamental unit. Lightning Components are client-side centric, which makes them more dynamic and mobile friendly.

Q:Can we include external JavaScript/CSS libraries in components ?
A:Yes ! we can use multiple libraries in our lightning component like JQuery, Bootstrap, custom CSS and custom Javascript libraries from a local resource (static resource).

Sunday, July 17, 2016

How to set up Free Trials and Discounts in Zuora!

It happens to every business now and then with the sales numbers - they may not be as optimistic as you would have predicted them or hoped them to be? So you might have launched a new product and are seeing a sluggish adoption by users- how to accelerate user acceptance ?

Discounts are a great way of bringing the consumer back to buying ways and opening the strings of their purse.

Similarly a free trial might go a long way in pursuing the users to try your newly launched product line.
So far so good but how does one setup these constructs :-
1. Discounts
2. Free Trials
in your respective tools - say Zuora -your  Relationship Business Management (RBM) solution which helps enable businesses in any industry to launch or shift products to subscription.

Discounts
All those who are familiar with Zuora will know that everything revolves around- your Product Catalog ( your product repository in Zuora). Product Catalog is where :-
1. You record / capture your products.
2. Define different Rate Plan for each product.
3. Define various charges and discounts for each rate plan.

Zuora's product catalog provides two discount charge models - Discount-Fixed Amount and Discount-Percentage - which can be used to offer your customers a variety of discount options:
Lets say you launched an online technical magazine called "Tech-Mate" and find  that user adoption is a challenge and say you would like to use the following plan to give a boost to your sales  :-
1. 50% discount for the first 3 months subscription
2. 200 Rupees discount on renewal.

So will go to Product Catalog and Add the Product- "Tech-Mate"
For the above product you need to do the following:-
1. Create the following Rate Plans
Normal Subscription:
 a. Monthly charge of Rs. 500
Promotional Subscription
 a. Monthly charge of Rs. 500
 b. Percentage Discount of 50% for 3 months
Renewal Subscription
 a. Monthly charge of Rs. 500
 b.Fixed Amount Discount of 200 Rupees
How to use them?
When a customer signs up for "Tech-Mate" while creating subscription:-
1. Select the product "Tech-Mate" say initial term of 6 months
2. Select from Rate Plan drop-down - Promotional Subscription
3. Once the customer comes for renewal - create an amendment for:-
    a. Remove the Rate Plan -Promotional Subscription  (Type
    b. Add the Rate Plan - Renewal Subscription
    c. Renew the subscription using another Amendment

Free Trials

 Sometimes it takes more than a discount to make prospective customers try your new product. Free trials come in handy in such situations.
How to handle free trials in Zuora.
I will suggest 2 ways to handle it.

1. Using the Subscription billing trigger dates for providing free trial.
    The billing trigger dates are (You need to control how many are active via settings)
    a. Contract Effective Date (Contract is signed)
    b. Service Activation Date ( Service is made available)
    c. Service Acceptance Date (Customer accepts service)

Now say you want to provide a free trial of 15 days.
You can set the Contract Effective date to say 18th July 2016 but set the Service Activation date to 2nd August 2016.

2. Using Discount Model
In case you want to give free trial of 1 month to your Product -"Tech-Mate"
In that case create another Rate Plan say
Free Trial Subscription
 a. Monthly charge of Rs. 500
 b. Percentage Discount of 100% for 1 months

Zuora has all the features to support the adage - Customer is the king - so use them to increase your sales !!