0

I'm working for a startup and we have a customer who uses Demandware for their online store.

Our company provides vouchers which are worth a specific amount of money. So customers on the retail site can enter the voucher number near the end of the checkout experience and if it's worth, say, 10 dollars, their shopping cart is updated (-10).

I have the CTO saying we just need to "drop a few lines of javascript" onto the retailer online store. But I think this requires a Demandware plugin (especially updating a shopping cart), which involves signing up for a developer or partnership account (which takes some time), learning Demand Script and building the plugin, then releasing it to Saleforce's app store. Am I correct? Is this the only way to achieve this?

Just to be clear, the functionality is: the voucher code box needs to take a voucher number, an API request is made to our service to check what it's worth, then update the cart.

Mark
  • 4,428
  • 14
  • 60
  • 116
  • Hi Mark - This is very possible to accomplish but it is much more complex than "drop a few lines of javascript". You are correct in your assumptions. – Mahdi.Montgomery Mar 08 '18 at 23:20

2 Answers2

1

That's a pretty broad question but I'll try to explain.

First off, Demandware has gone all JavaScript. But yeah, it has a huge API so the process sounds about right the way you've described it.

Ask your client whether they have a service integrator they're working with, because that would be their job. Your job would be to provide an API so that Demandware can check whether the voucher code is valid.
Demandware is a closed community so it's unlikely to learn it unless you're working in a company that is doing Demandware development.

Oh, and if it somehow ends up being your job to develop this, a tip from me - you probably need to get access to their site's files and use the LineItemCtnr class to createPriceAdjustment() :)

Vergil Penkov
  • 380
  • 2
  • 11
  • Thanks. The client has already said "its up to you to develop the Demandware plugin". So it sounds like we need to partner with Salesforce to do this. I've gone through an awful lot of stuff trying to figure out how to join - they don't make it easy. Would the plugin then need to go on some sort of app store? – Mark Dec 07 '17 at 15:23
  • Well, the way Demandware works is, its backend is written in Java and exposes a JavaScript API. Then that gets compiled back to Java and executed. So updating the platform happens by Demandware. Therefore, you don't need a plugin (DWRE doesn't have a plugin concept, just cartridges), and can modify the website directly if you have access to it. More often than not, this would be the way to go. You get access to the client's Git, then you ask them for a sandbox, and Bob's your uncle. That's easier than getting access to the community. – Vergil Penkov Dec 08 '17 at 05:27
  • The client should also provide you with an account to the Business Manager (that's the site administration part), and partial access so the DWRE community. Specifically - access to the documentation. You do look like you'd need some consulting outside Stack Overflow though. – Vergil Penkov Dec 08 '17 at 05:32
  • Thanks. Given we will have more clients in the future who use DWRE, we don't want to have to do custom work for all of them. So this this mean we need to build a cartridge? This cartridge/plugin is close to what we want to do https://www.demandware.com/link-marketplace/loop-commerce – Mark Dec 08 '17 at 08:18
  • Yeah, you seem to be on the right track. But you'd absolutely need to contact your client for a sandbox, at least to have something to test it on. One final thing - files are uploaded to Demandware via Eclipse and a plugin called UX Studio, provided by DWRE. When you get access to the ]documentation, search for that. – Vergil Penkov Dec 08 '17 at 09:01
0

The first tip from me is that Demandware got bought by Salesforce and is now branded as Salesforce Commerce Cloud, so if you hear either, they are the same thing.

You are right that you are going to have to work with Salesforce to get going. They are a cloud provider and there is no self-hosted version of the platform, so in order to do any development, you need to have a relationship with them.

So then it depends on how you get access. If the client has any sandbox environments they are willing to share with you, you could do this as a custom build working in their environment, modifying cart code to make the service call as you ask and as the previous response suggests. But then (depending on the terms you have with the client) your company may or may not be able to reuse that code for other clients. You will also have to work with them to get that integrated into their existing site, get it deployed through their processes, etc.

If you want to write something that other Commerce Cloud clients could use, then you should set up your own partner relationship with Salesforce and get a software package they call a cartridge to what they call their LINK marketplace, which is basically a big clearinghouse of integrations like yours.

Technology-wise, the platform has gone through some changes recently, going from an XML-based GUI tool to specify business logic to using CommonJS scripts to define them. If your client is a new client within the last year or two they probably have this new fully javascript implementation, but if they are an older client than that they may be using the old way, which has a steeper (read: more proprietary) learning curve.

jbgoode
  • 355
  • 1
  • 4
  • Thank you, very helpful. We will go the cartridge route as we want to use it with other clients – Mark Dec 08 '17 at 09:30