Episode 30: Commerce Development with Gaurav Kheterpal

This week on the Salesforce Developer Podcast, we are joined by Gaurav Kheterpal, Chief Technology Officer at MTX. Together we have an in-depth conversation about Commerce Cloud. We also discuss the commerce ecosystem as a whole and the rise of mobile development.  

 

 

Show Highlights:

  • The growing importance of mobile when it comes to commerce development.
  • Some distinctions between B2C versus B2B.
  • The Commerce Cloud: what it is, what developers can expect, and a realm versus an org.
  • The MVC model, both old and new, developers experience with Commerce Cloud
  • Einstein AI for Commerce and the Commerce Cloud
  • Integrations and available API’s for Commerce Cloud
  • Considerations around GDPR and privacy laws with Commerce Cloud
  • Gaurav shares some things developers starting their first enterprise commerce cloud project should know. 

 

Resources:

 

Episode Transcript

 

00:07

Gaurav: I was fascinated with computers when I was as little as a seven year old. So I actually sold my video game to buy my first computer. Oh, wow. And I never really thought I could become anything else but a software engineer. So I’m actually glad it worked out pretty well.

 

00:23

Josh: That is Gaurav Kheterpal Chief Technology Officer for the MTX Group. I’m Josh Birk, a Developer Evangelist for Salesforce. And here on the Salesforce Developer Podcast, you will hear stories and insights from developers for developers. Their growth is describing how he got his first ever computer, a computer, by the way, he still has. Today we sit down with Gaurav to talk about a variety of things when it comes to commerce development, including commerce cloud itself, and also mobile development development that girl became familiar with back at his job at MetaCube.

 

00:53

Gaurav: Yeah, so some of the early projects that we did were for a platform called Symbian which is now dead. Again, we did stuff on Blackberry, which again is no more now. When the iPhone launched, I will be very honest, I was a little skeptical as well. Nobody had seen a device like that and to be able to do those things on a phone. Back in those days, it seemed like a crazy idea when we were used to physical keypads and all of that. But as we started developing applications, I think being developers, we realized that it opened up so many other opportunities, which were not possible with the classical mobile operating systems. And then Android happened. And it was always more of a volume game with so many other players coming in. But I think the one thing which it did well is break the monotony of iOS and Apple, otherwise it would have been a very one sided ecosystem. And I would say around 2010 11 after that, it was just an Android versus iOS game for developers, everything else kind of fizzled out.

 

02:00

Josh: Right, right. And that is kind of interesting because when the iPhone first came out, I mean, Blackberry was kind of the king of the hill at that time, but you really couldn’t have a device less like a blackberry than the iPhone itself.

 

02:11

Gaurav: Absolutely. I think Blackberry ruled the enterprise. I mean, it was the de facto smartphone, so to say, in the enterprise world, and for the iPhone to come in and in a matter of years, or displace it and just kill the whole company, I mean, and completely conquer the enterprise segment. I think that that has been a fantastic achievement.

 

02:31

Josh: Yeah. So let’s bring that towards e commerce development. How have you seen the growing importance of mobile when it comes to commerce development?

 

02:39

Gaurav: I read a report which said that almost 70% of e commerce transactions worldwide are done through either a mobile phone or a tablet. I think there is no doubt that without phones and tablets, the world of e commerce would not be the same as what it is today. Anytime you get a package from Amazon, the person who does Reverse the package typically uses his phone, to know your location to get an acknowledgement on the package. And in most of the cases, even the person who’s ordering stuff is doing through a phone. And I think it’s made ecommerce more accessible. And I think that was the need of the hour because e commerce existed long back as well. I’m in the old, old world of email, eBay, and Craigslist was forever there. But the world of Amazon’s and at the other side did not exist. And I think they really benefited from this mobile revolution. And I think if one sector has made the most of it, it is ecommerce.

 

03:35

Josh: All right. So that’s a really interesting point, I think because a lot of people think of e commerce in terms of you know, that digital point of contact for sales where somebody has a website to sell products, but there are all these other points of contact in between where you as you said, the person who’s doing the delivery the person who’s going on Route and, and that taxi driver who like now he can get paid via his iPad. It feels like mobile devices have really opened up a lot more opportunities.

 

04:00

Gaurav: Absolutely, I think it’s a it’s a complete ecosystem altogether. And a lot of people do not realize the nuances behind that ecosystem. And I think a lot of companies have struggled to kind of make the most of that ecosystem because they fail to understand the specifics. In that sense, I think Salesforce has done really well. I think they realized that there is an enterprise play there as well as a consumer play there. And they made sure that they check the two right boxes, b2b as well as b2c.

 

04:30

Josh: So let’s, let’s break that down for people. What is b2c versus b2b and what are some distinctions there?

 

04:37

Gaurav: b2b is business to business transaction and a b2c is business to consumer transaction. So to compare them in a b2b scenario, you are essentially selling to other sellers who would in turn, sell to the end buyers. In a b2c scenario, you are actually selling directly to the end customer. So in that sense, b2c is somebody who’s listing their product. On an Amazon site, and there are customers who are ordering from their b2b is more like an Alibaba or even Amazon does B to B where I would list my products as a distributor. And then dealers would buy off me and they would then in turn sell it to customers. And what features does commerce cloud have that kind of goes across both of those? Yeah, so I think you you raised an important question there. What is commerce cloud? And I think that has been kind of a question which has been widely debated ever since Salesforce, started these commerce acquisitions. Originally, commerce cloud actually meant the b2c commerce platform they acquired a company called demandware. The company itself was earlier used to be called as inter shop several years back, but when Salesforce acquired it, it was called demandware. Salesforce then changed that name and started calling it Salesforce commerce cloud and it was fondly abbreviated as SF cc Martin’s developers want to take shortcuts. Nobody wanted to say Salesforce commerce cloud. So people started calling it commerce cloud. And that’s how that’s how the name came. And now it’s known as b2c e commerce. And the distinction is there because now Salesforce has another offering, which is called b2b e commerce, which is another company that Salesforce acquired two years back called Cloud, Chris. Gotcha.

 

06:22

Josh: Okay, let’s focus on Commerce Cloud, and talk about it from a developer experience. It feels like a very similar but different feeling from what a Salesforce developer would expect, like, for instance, describe a realm versus an org to me.

 

06:38

Gaurav: Yeah, so Commerce Cloud. I mean, you can always draw parallels between commerce cloud or b2c commerce and Salesforce. from a technology standpoint, it’s a completely different stack. So you do not use Apex Visualforce or Lightning. And it’s all JavaScript. So it’s all the JavaScript in the front end and JavaScript in the back end, and obviously they have their own propriety. languages like asml, which is a markup template, and they are continuously upgrading the stack and going in the same direction as Salesforce. So just to answer your question, our realm is very similar to an org. It’s a logical segregation. Similar to how it is in Salesforce. It’s basically the place where all your customer code and customer data exists, are elements exactly similar, but it’s the terminology that b2c commerce uses.

 

07:28

Josh: Gotcha. So let’s talk a little bit about how commerce cloud used to function describes site Genesis to me.

 

07:36

Gaurav: Yeah, SiteGenesis as a reference architecture. So back in the days when the company was called demandware. And they used to ship their platform to the customer. So customers had two choices, either they start from scratch, or they use something which is like a seed project with where they can use it as a starting point and then make modifications and get their site or storefront up quickly. Yeah. site Genesis was that reference architecture, it’s a fully functional website. It has the back end, it has the front end, it has the database, and then you can customize it based on your needs. So that reduced the amount of time that a customer would need to build their own site and have it deployed in production and up and running. So it gave them a good starting point and kind of took the donkey work out of building a website, I would say,

 

08:25

Josh: gotcha. But it’s kind of old school. Like it sounded like there were some problems with its MVC model, like how would you describe it as not a true MVC model?

 

08:35

Gaurav: Yeah, so SiteGenesis, I mean, the architecture served well for several years, I would say more than a decade. But I mean, it was meant to be an MVC architecture, but it lacked some principles like there were no separation of concerns. The framework I assemble, which I mentioned, again, it worked well for simplistic pages. But as Simon stores grew larger and better It just became more complex, the templates became bulky. And then typically when we envisage MVC, we say that the model represents your database. The view represents your view layer or the presentation layer. And the controller is the business logic abstraction. In that sense, the model really wasn’t the true database layer, it was a lot of scripts also being clubbed into the model layer, or a period of time I think they realized that this architecture is good enough for now, but it will probably not scale in the future.

 

09:31

Josh: Got it. And kind of to that point is if somebody was starting a new website, would there be any compelling reason to use SiteGenesis versus anything that’s newer?

 

09:39

Gaurav: So after SiteGenesis, they introduced a framework it was initially called MFRA, which was mobile first reference architecture. Because one of the issues with site Genesis was that it was primarily designed for the desktop. And although it kind of worked well on smartphones and tablets, but it was not really an option. The mobile experience. So in that sense, they’ve built a new framework pretty much from scratch using, again, JavaScript and a lot of modern frameworks. And they call it mobile first reference architecture, because it was exactly what it sounded like it would run beautifully on your smartphones and tablets. But then it gave a wrong impression that it was it was heavily focused on mobile, and then desktop users would be left behind. So they kind of standardized the terminology, and started calling it storefront reference architecture.

 

10:30

Josh: This is more of a true MVC model. Correct?

 

10:32

Gaurav: This is a pure MVC implementation.

 

10:35

Josh: Yes. What kind of object model comes out of the box to help make it run?

 

10:40

Gaurav: Yeah, so similar to how in Salesforce you have standard objects and custom objects. In b2c commerce, you actually get a prebuilt data model, which typically covers all your most common ecommerce use cases. You know, the common, tell me some of the entities that you can think of when you talk about a ecommerce data model, what would those be?

 

Josh: Right? So like product like car, I’m assuming some kind of categorization structure, etc.

 

11:07

Gaurav: Bingo. Yeah, so you call it products, cart categories. These are all products that are there in the pre built model. And the best part is that you can actually add custom fields to these standard objects, and you can extend them.

 

11:20

Josh: So that was gonna be my follow up question is, what does that look like? Is that similar to Salesforce custom objects custom field? Or is it more like a database experience?

 

11:29

Gaurav: Yeah, so it’s, I mean, in that sense, b2c commerce platform has been designed with a lot of thought process. So you can actually do both things, you can create your own custom objects, which can create custom fields. But if you only need to supplement the functionality of a standard object or a system object, as we call it, then you can actually add custom fields. So for example, the product object has everything that I need, but say I want to add something like a grouping or on an attribute which does not exist. Send I guess I would probably add a custom object to the product object. But if I’m creating some functionality, like I want to create a newsletter for my ecommerce store, and I cannot find a system object in that case, I would actually go ahead and create a custom object for it.

 

12:16

Josh: So it sounds very similar to the Salesforce experience. So let’s talk about the controller layer. you’d mentioned earlier, that it’s it’s all JavaScript, is that correct? That is correct. Yes. And what does that JavaScript look like? Is that like a nice ACMA script? Six style class structure?

 

12:34

Garuav: Yes, it is ECMAscript. Again, this goes back to demandware days. The ECMA script standard being followed earlier, I believe it was ECMA four. And then they also had proprietary scripts which are also called as Dscripts. But over a period of time everything has been standardized on JavaScript again, the thought process is very similar. Move away from the proprietary architecture similar to how Salesforce has done a fabulous job with lightning web components. I mean, in true sense, I heard a phrase, I think it was at some conference, you’re democratizing your development environment and opening up opportunities. So I’m really happy that b2c commerce is again going in that direction as well.

 

13:17

Josh: Well, it sounds like that for very much the same reasons because like when I was looking at some of the examples you’ve had in your presentations, a controller in commerce cloud looks like a controller and lightning web components, like we’re getting that leverage leveraging the education of JavaScript across development platforms, that is true. So you mentioned a markup language earlier what is comprising the view structure?

 

13:40

Gaurav: Yeah, so it used to be called ISML, which was internet store markup language and in in the earlier earlier world, it used to also be called as inter shop markup language. Okay, so it was very similar to any templating framework that you would have either a handle bar or something like Django, so they are idea was that you would create the templates when the client is executing the request. So for example, the user sends a request, the template fetches the data based on the client request and generates HTML dynamically. So that concept worked well. I mean, it worked well, because you could include templates, you could trigger a call from a template to another template, it sufficed those use cases. But again, as the pages got bulky, I mean, it kind of fit limitations. And that’s when they decided to kind of revamp that whole architecture with a Safari. So Safari, instead of just bluntly, depending on XML templates, it uses a concept of modules and super modules. So that way is it’s been architected in a way so that it can actually be performance, as well.

 

14:43

Josh: Nice. So let’s talk a little bit about integration. What kind of role does Einstein have with commerce cloud?

 

14:50

Gaurav: Yeah, so I think one of the things that Salesforce has done well as integrate Einstein as a layer in most of their cloud offerings, And I’m really happy that it came to commerce cloud as well. So in commerce cloud, there are multiple use cases, one of the most common use cases is based on a user’s past purchasing history. What is it that they’re likely to buy next? I think that’s one of the use cases which the Einstein connector for commerce cloud has. There are other use cases as well. But I think that’s one of the most common use cases and based on that it actually generates predictions. And you can use those predictions to surface those products, so that the user is able to see those more clearly, or those are the products which the user would likely see first, because there is a higher probability that he or she will buy them.

 

15:40

Josh: So we have that kind of like Amazon style, predicting your behaviors or suggesting new products built right into it.

 

15:47

Gaurav: Exactly. And that functionality is very sophisticated. And it’s actually a blessing in disguise, because earlier when you were you had to build predictions, you had to build it manually. So you would basically look at the data you would define Okay, these are the tracks I am getting let me put this product on top. And let me this is not selling too well or this is not Christmas season. So let me take off these products. But now with Einstein, I mean you can program these rules as business logic without any code. And it actually generates everything in run time. So that’s a true power of Einstein.

 

16:21

Josh: Nice. Now from the Salesforce side of things, I’m used to a wide ecosystem of API’s bulk, so rest, etc, etc. What kind of API’s are out of the box for commerce cloud?

 

16:31

Gaurav: Yeah, so commerce cloud has its own framework of API’s called Open commerce API’s. So you cannot actually build a commerce e commerce site in a silo you so the site that you see is just one piece of it and it’s the consumer facing piece of it. But in the background, there are a number of things which are going on. Typically there is an inventory management system. There is a master database from where the product information gets fetched. There is an order management system. When you check out your products call goes to a payment gateway. Typically all of these are built as cartridges, we call it as a cartridge. In terms of a basic building block. And most of these cartridges, what they would do is they would use an API interface to interface with external parties. The standard that has been followed is open commerce API, and it’s a fairly well documented and easy to use standard.

 

17:27

Josh: So I think that’s a that’s a really important point. Because back in my days of working for a commerce site, you know, would people would come to the experience, and I think it was very easy to say, Hey, we’re just, you know, we’re gonna build up our own website, we’ll just throw a cart together. And I’m like, do you have any idea how complicated a shopping cart actually is?

 

17:46

Gaurav: That is true. Yeah. But I think with the Okapi standards, we call it open commerce API. But again, as a developer, I mean, we abbreviate it as Okapi. It’s restful, again, it’s very well documented. So typical machinery Your swagger style documentation that this if you send this request with these parameters, these are the responses that you would expect. And I think it’s made life much, much simpler for developers to be able to build these cartridges, especially around integration.

 

18:16

Josh: Nice. Now with those integration points, is there anything out of the box that works directly with Salesforce Service Cloud or Sales Cloud?

 

18:23

Gaurav: Yeah, so they actually published a bunch of connectors. So there are two that I’m aware of, I think there are more so Salesforce calls them solution kits. So the idea is that if you want to sync data from one direction, or if you want to do a bi directional sync, then you can use these connectors or solution kits. And they allow you to do that. So a typical example is a case information. So you would typically want to allow users to submit case on your sites, for example, if their payment failed, or if they had some trouble with the order. They would want to raise a case within commerce flour and Typically, you would want to push that case to a Service Cloud back end. And similarly for Marketing Cloud as well, again, if you want to kind of trigger an email campaign for a specific set of users, you would typically need some kind of interaction with Marketing Cloud. Again, there is a lot of support, there is a there is a very sophisticated solution kit available for marketing where you can actually define the overall journey like you do in a journey builder for all the users who are on your site and clearly defined touch points in terms of who gets what email At what point of time so you also call this typical Kraus cross cloud architecture. And that is something which is gaining a lot of prominence. And personally, in my experience, I’ve also seen that a lot of customers who have bought commerce cloud, were customers who were actually using Salesforce earlier and the reason that they went with commerce cloud was that the seamless interface that if you are using Salesforce, the core platform Far more Service Cloud or Marketing Cloud, then it is much easier to integrate with the b2c commerce rather than opting for any other e commerce platform via Magento. Or SAP.

 

20:11

Josh: Now I saw a demo of yours from London’s calling where it looked like things like privacy and consent were built right into the website. So if I’m a developer working with commerce cloud, how much do I have to worry about things like GDPR?

 

20:26

Gaurav: No, so as you rightly pointed out, the basic functionality around compliance is built in. So GDPR was one of the compliances that was built in because one fine day when I was when I opened my sandbox, and I saw that notification, I wasn’t sure what was going on. And, and since it was a sandbox, so I thought maybe I screwed up some code, but then I realized, so in that sense, I think commerce cloud is up to date with most of the legal standards and the compliances in I think most regions and they do publish a list and audit report from time to time basis. And I think in that sense they have their bases covered.

 

21:05

Josh: Nice. Okay, so kind of an awkward question, but what is required to get access to that development sandbox?

 

21:13

Gaurav: That’s a great question. So and to be honest, I’m in one of the pain points of commerce cloud development till last year was the entry barrier to commerce cloud development was much higher than what it is for Salesforce. So in Salesforce, you sign up a developer or it’s yours for life, you don’t need to pay anything for it. But for b2c e commerce till last year, it required you to either be a b2c commerce partner, or attend one of the trainings and I proudly say that because I used to do several of those trainings as a certified instructor. But the limitation there was that not everybody could attend a training or not everybody could sign up to be a partner because it is Again, it takes some paperwork. It’s a time consuming process. So at dreamforce, they announced on demand sandboxes.

 

22:06

So if you are a partner, if you are a part of that program, you can actually you get an interface where you can spin up sandboxes, just as you would spin up a Salesforce developer. org. And I think that is tremendously helped kind of reduced that entry barrier. And, again, I mean, to be honest, I did not use to come across a lot of commerce cloud developers in the partner community till last year. But now I mean, I see that there are events being done specific for commerce cloud, because the developer base has just grown exponentially. And I think, the easy access to sandboxes as definitely a

 

22:40

Josh: nice. So it sounds like we’ve been kind of touching on this throughout the talk. But if I do have access, and I have, I have experience with Salesforce apex, maybe somewhere in between Visualforce and lightning web components, like what’s the difficulty level for me to bring those skills into commerce cloud?

 

22:59

Gaurav: Good question. Working with JavaScript as a developer, and I think some some background of data modeling and database architecture. But otherwise I’m in it’s not a steep learning curve, you need to know the key ecommerce concepts, which again, can be picked up relatively quickly. So since I’ve been teaching these courses for a while, I mean, I know of most of the times when people in my class especially when I was delivering these trainings at partners, about 80% of the audience for Salesforce developers, and there are people who were actually so confident that they did all the exercises in the trainings and just a couple of days after the training, they took the b2c commerce developer certification and they passed. Now it’s I would say that a typical ramp time is anywhere between three to four weeks, I think three to four weeks you you get a hang of things, you you start to appreciate best practices, you know, you typically are able to debug performance issues. So I think that that’s a reasonable timeframe for anybody to start picking up b2c e commerce skills.

 

24:05

Josh: If somebody’s gone through that training, they’ve got their certification, and they’re going to start their first like real enterprise commerce cloud project. Is there any first in mind advice that you have for them?

 

24:16

Gaurav: Yeah, so they have actually done a great job. So they’ve put together a b2c e commerce developer Center, which is like I always do comparisons with the developer for site that we have developer.force.com that for me defines the kind of benchmark on what our developer portal across any technology should look like. I mean, you should be able to see API documentation you should be able to see examples you should be able to see best practices. And I think the commerce cloud team, the product team has picked up on that and I think they have they have put together and they’re it’s a it’s a work in progress, but I think they have done a good job so far. So you can try out all the API’s. You have the release notes there. There, there is a lot of reference to v2 See commerce best practices, which again is a good move, because earlier, everything used to be on a portal called exchange demand exchange.demandware.com. Again, the entry barrier to exchange was high, you needed to be a partner or you needed to have attended one of the official trainings, but this new developer portal is completely free, and you can access it without any credentials. And so I would strongly recommend that people should bookmark that and spend time going through those resources.

 

25:29

Josh: Nice. All right. Well, today I wanted to focus on b2c, but just kind of out of curiosity, what’s the elevator pitch for the b2b side of things?

 

25:38

Gaurav: Yeah, so b2b is a completely different proposition and cloud craze, they actually built this b2b e commerce platform natively on Salesforce. And I think that that was a big reason why Salesforce bought it because it will then I think, nobody was sure because b2b is all about scale and you typically an order would be like 500 Products even more. I mean 500 is just a very small example. But b2b is all about scale and less about diversity of products less about user experience, but just about scale resilience and the sheer volume of products, and the sheer volume of transactions that can happen. And I think it was a very solid product, and I think it was 2017 or 18, when Salesforce acquired it, and then they kind of changed the name to b2b commerce.

 

26:29

The massive advantage there is that you actually do not need to learn anything else to be a b2b e commerce developer, if you know Visualforce if you know Apex, if you know your Force.com data model, if you know custom objects, if you know standard objects, that’s all you need. And you need to learn a little bit of commerce concepts, but other than that you are good to go.

 

26:50

Josh: And that’s our show. Now when asked about his favorite non technical hobby, Quora did admit to being something of a bookworm, a hobby he’s been able to catch up on while in quarantine in India.

 

26:59

Gaurav: Since We are recording this in a time where I’ve been locked in my house for the last 45 days, pretty much managed to complete my backlog for the rest of this year. So I’ve read about 16 art books that I had on my radar. So yeah, I cannot go to bed without reading for half an hour every day. So I think this, this lockdown has been a blessing in disguise. For what I read it like me,

 

27:26

Josh: My huge thanks to Gaurav for the great conversation, wonderful information. And of course my thanks to you for listening. If you want to learn more about this podcast, head on over to developer salesforce.com/podcasts where you can hear all the episodes, see show notes, and have links to your favorite podcast service. Thanks again and I’ll talk to you next week.