Pages

Monday, July 30, 2018

Tips for passing Salesforce Certified Commerce Cloud Digital Developer

Today (30th July'2018), I have successfully passed Salesforce Certified Commerce Cloud Digital Developer. Here is few tips to pass the exam.

Exam Outline

  • Content: 60 multiple-choice/multiple-select questions * (5 unscored questions will be added)
  • Time allotted to complete the exam: 105 minutes (time allows for unscored questions)
  • Passing Score: 70%
  • Registration fee: USD 200, plus applicable taxes as required per local law
  • Retake fee: USD 100, plus applicable taxes as required per local law
  • Delivery options: Proctored exam delivered onsite at a testing center or in an online proctored environment. Click here for information on scheduling an exam.
  • References: No hard-copy or online materials may be referenced during the exam.
  • Prerequisite: None
I have faced 65 questions, some of the questions are descriptive and contained long code script, which took time to read and understand the question. 

Above all, it's good to see me passed.



Prerequisites

You need a sandbox and access to Commerce Cloud Account Manager. If your company is Salesforce Partner then requesting to Salesforce will have access.

Topics I have received on Exam


  • How to connect sandbox from UXStudio.
  • Lot's of question on Import and Export, (including Site, Product etc)
  • What are different type of includes and for which purpose it is being used. Read on <include>, require()
  • Content Link functions like $url()$, $httpUrl()$, $httpsUrl()$, $include()$
  • Different types of scopes like Session, Request, Page and when to use what.
  • How to show error message when required mandatory input has not given.
  • How to create an instance of custom object.
  • Write a correct code to show Debug message.
  • Log file formats.
  • Accessing values for multi-lingual requirements.
  • Creating and using custom tags.
  • CSRF and how to prevent those.
  • Quota and what happens when it is exceeded and what needs to be done.
  • Cache: how to define cache
  • How to identity the cache related issues.
  • Creating custom attributes and how to make it indexed.
  • Open Commerce API (OCAPI) and calling webservices using SOAP, REST etc.
  • Correct syntax using GET and POST with authentication.
  • Hooks: Which hook needs to be used given a certain use case.
Hope, this will help you to prepare for the exam.


Wednesday, July 25, 2018

Engaging and working on Ideas using Salesforce

Use Case


I was answering this question End user adoption/understanding in Stackexchange and thought of having this use case. 

Usually the project team has an idea and they build a few features, alerts, dashboards, etc.
Yet, vendor often see that end users do not always understand everything we built. Vendor has noticed that his notes/guides tend to be somewhat technical, but maybe he should build some sort of knowledge base that tells the user 'alert 1' does XYZ.
How do you tackle it?

Probable approach


  1. If vendor has an idea then post this idea in chatter and get votes on this idea. Also, vendor should make sure users are adopting Chatter quite well, otherwise, ideas will not reach to the broader audience.
  2. Before actual implementation, vendor needs to engage your user on what you are planning to implement and how business will get benefited (either by, improvement of productivity, cost etc.)
  3. Show and Tell approach - Vendor can create a mock application to show customer and get customer's feedback and confidence.
  4. After implementation, vendor should create a Knowledge article, so that business can understand the effective use of the use case or need. Knowledge article should be readable and sometimes use of context sensitive pictures and flow charts helps users the understand the context.
  5. Easy access to the Knowledge article, so that when customers need it they will have it.
  6. Engaging them in Chatter when vendor comes up with this implementation.
  7. Taking feedback periodically, how Customers are using this feature and what's their suggestions for future improvements.
  8. Build continuous improvement process at your organization.

Sunday, July 8, 2018

Displaying lightning:radioGroup dynamically from SOQL query

Use Case


Sometimes we receive a use case to display dynamic radio button with dynamic options querying the data from database via SOQL query.

Let's say, questions and answers to be populated and displayed in lightning components.

I was answering this question lightning:radioGroup - not able to select the options in stackexchange and able to produce a small poc with an approach.

Approach


Create Question and Answer custom object with following attributes.

Question Object (Question__c)
  • Question Name (Auto number)
  • Question Text (QuestionText__c, TextArea(255)).
Answer Object (Answer__c)
  • Question (Master-Detail (Question)
  • Option (TextArea (255))
  • Correct Answer (Checkbox)
Following things to considered when implementing this solution:

  1. To group the options for individual question, the name should be unique. Here QuestionText has been used. You can use QuestionId.
  2. We can see in the reference Radio group in Lightning Component Library that options attribute takes label and value as follows. So we need to pull the options as AnswerText__c from Answer object and assign those values as label and value.


<aura:component>
    <aura:attribute name="options" type="List" default="[
    {'label': 'Sales', 'value': 'option1'},
    {'label': 'Force', 'value': 'option2'}
    ]"/>
    <aura:attribute name="value" type="String" default="option1"/>

    <lightning:radioGroup name="radioGroup"
                          label="Radio Group"
                          options="{! v.options }"
                          value="{! v.value }"
                          type="radio"/>
</aura:component>

So, the component code will look like this.

Quiz.cmp

 <aura:component controller="QuestionAnswerClass" access="global" >  
      <aura:attribute name="Questions" type="List"/>  
   <aura:attribute name="radioGrpValue" type="List"/>   
   <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>  
   <aura:iteration items="{!v.Questions}" var="ques">  
     <lightning:radioGroup name="{!ques.QuestionText__c}"  
                           label="{! ques.QuestionText__c}"   
                           options="{!ques.Answers__r}"  
                           value="{! v.radioGrpValue}"  
                           type="radio"  
                           required="true"/>  
   </aura:iteration>   
 </aura:component>  

QuizController.js


({
 doInit : function(component, event, helper) {
  helper.doInit(component, event,helper);       
 }
})

QuizHelper.js


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
({
 doInit : function(component, event, helper) {
        
  var action = component.get("c.getQuestionAnswers");
        
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var returnVal = response.getReturnValue();
                var finalList = [];
                for(var i=0; i<returnVal.length; i++)
                {
                    var answers = returnVal[i].Answers__r;
                    //append label and values into the list so it can be displayed as options
                    for(var j=0; j<answers.length; j++)
                    {
                        answers[j].label = answers[j].Option__c;
                        answers[j].value = answers[j].Option__c;
                    }
                    finalList.push(returnVal[i]);         
                }
                
                component.set("v.Questions", finalList);
            }
            else {
                console.log("Failed with state: " + state);
            }
        });
        // Send action off to be executed
        $A.enqueueAction(action);
 }
})

Apex Controller


public class QuestionAnswerClass
{
 @AuraEnabled
 public static List<Question__c> getQuestionAnswers()
 {
  List<Question__c> lstQues = [SELECT Name, QuestionText__c, 
     (SELECT Name, Option__c, Correct_Answer__c FROM Answers__r)
     FROM Question__c];
  return lstQues;
  
 } 
}

Quiz.app


<aura:application extends = "force:slds">
    <c:Quiz/>
</aura:application>

Desired Results


If we load the application clicking on preview, it will display like this.

User can see the dynamic questions with options and able to select options respective to questions.


For more information, refer Radio group in Lightning Component Library