Fulfiller and Returns Customization

It is often best for fulfiller users to have a synergized experience across their tenant's entire suite of platforms and applications, which is created by visuals such as branded logos and matching color schemes. This can be achieved on the Unified Commerce Platform's Fulfiller Interface by configuring a theme that includes custom assets to re-skin the appearance of the interface, including the modals and other elements for processing returns.

This guide provides a step-by-step walkthrough to customize the fulfiller application for a more personalized user experience. However, note that many points in this guide refer to the Getting Started with Themes guide, as many of the steps in that guide are necessary for working with theme customization in Unified Commerce.

Customizable Elements

The below elements of the interface can be customized to enhance the fulfiller user experience.

  • Logo: The logo that gets displayed on fulfiller hamburger menu. This allows maintaining the same branding experience across the platform.
  • Color Scheme: The background colors of grid headers, popups, section headers, and other elements. However, font size and font family cannot be changed.
  • Localization: Labels are displayed based on language-specific resource files. To change the text of buttons, grid headers, section headers, or other elements, edit the resource keys in the localization files.
  • Field Display: Localization files can also be leveraged to hide or show certain fields. A common use for this is the flag that determines whether to display the External Order Number field in order data. Another example is the Return Status column that is usually displayed in shipment details. If your implementation does not process returns in the Fulfiller UI, you can toggle this column off with the displayReturnsSection setting. In most cases such as these, a value of 1 will display the field while a value of 0 will hide it.

However, it is good idea to discuss customization changes and field displays with the Kibo project team first in case supporting code changes are required for your implementation.

Development Environment

First, follow the themes' Before You Begin instructions to install a command line interface, Node.js, Grunt.js, and Git. This software is required in order to build and manage the theme files that are used for customization.

Additionally, Visual Studio Code should be installed. This is a lightweight but powerful source code editor which runs on the desktop and is available for Windows, macOS and Linux. It comes with built-in support for JavaScript, Typescript, and Node.js, and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity).

Note that access to a provisioned sandbox is required through a Dev Center account.

Creating a Theme

Follow the below steps from the Getting Started with Themes documentation:

  1. In the Dev Center Console, click Develop > Themes.
  2. Click Create Theme.
  3. In the dialog box that appears, specify the Name and ID.
  4. Click Save. You should now see your theme in the Themes grid.
  5. Double-click your new theme to edit it.
  6. Note the Application Key. You will need this value later in the tutorial.

Close-up of the Dev Center header where the Application Key is displayed

Configuring Assets

In the new theme, follow the below steps to create the configuration file:

  1. Create a file called "mozu.config.json" in the root of the theme folder. Configure it as shown in the below code block.
    • To find your developer account ID, click Launchpad under your user name in Dev Center, and then hover over the link to the account you want to access. You should see your developer account ID appended to the URL, typically as a four-digit number.
  2. Replace the workingApplicationKey value with the Application Key value that you noted when creating the theme.
{
  "baseUrl": "https://home.mozu.com",
  "developerAccountId": yourDevAccountId,
  "developerAccount": {
    "emailAddress": "yourDevEmailAddress"
  },
  "workingApplicationKey": "yourPackageApplicationKey"
}

Customizing Assets

Now you are ready to begin customizing. The structure and assets of the new theme can be based on existing repositories that Kibo provides as templates, so you can clone those and make changes that will be uploaded to your new theme in Dev Center.

  1. If you are customizing the general UI, clone the fulfiller theme repository to a local folder. If you are customizing the returns part of the UI, clone the returns theme repository instead.
  2. Open the cloned local folder in Visual Studio Code.
  3. Open the Terminal window of Visual Studio Code. Usually this window should be open by default and displayed in the bottom half of Visual Studio Code. If not displayed, click Terminal > New Terminal in the menu to launch a new window.

Both the fulfiller and returns themes share a similar hierarchy, in which theme assets such as logos and CSS variables are accessible under the root fulfiller or returns folder depending on which repository you are using. The languages subfolder contains the language files that support custom language localization. 

You can make the following changes to customize the theme:

  1. Ensure that the config.json file from the repository exists in your new theme.
  2. Replace the logo.png file with the appropriate image, though the file name and the extension must remain the same.
  3. Open the variables.css file and make changes to the CSS styling for the user interface and its color scheme. For example, replacing --dashboard-active-tab-background-color: #c73916; with --dashboard-active-tab-background-color: #56ba77; would change the dashboard active tab's background from red to green.
  4. The language localization files bind static text in the UI to string variables. To change any of the text, make edits to the values of these variables in the appropriate language file (such as fr.json for French). For example, changing the "lateShipments": "Late Shipments" field in the section for dashboard grid tabs with "lateShipments": "Delayed Shipments" would cause the UI to display "Delayed Shipments" where that label appears on the dashboard.
  5. Tenants that capture External Order Numbers can toggle the display of this field in the language file. This field is hidden by default by a Boolean in the tenant settings called displayExternalOrderId, which is set to 0 by default. Setting this option to 1 would toggle the order number on.

The structure of the variables.css file must remain the same, so make sure to keep :root { as the first line in the file. If you remove this line, then the customized variables will not be loaded.

Edited assets must be pasted into the theme at resources > admin > fulfiller or resources > admin > returns. Then, it is ready to be applied to a sandbox.

Custom Language Localization

Recall that the fulfiller > languages and returns > languages subfolders contain language files that allow localization of the Fulfiller UI. Language files for en.json (English) and fr.json (French) are provided by default, but you can upload additional files for other languages that you want to support.

You must upload a language file to both the fulfiller and returns subfolders to fully translate both elements of the Fulfiller UI. These files should use the same template as the existing en.json and fr.json files, but with the string values translated into your chosen language. The name of the files must be the locale code, such as de.json (German), otherwise it will not be usable and the UI will default to English.

Once these language files exist for the user’s browser language, then the Fulfiller UI and return menus will automatically be displayed in that language.

Publishing Changes

The new theme must be built, published, applied to the tenant, and tested to ensure it displays properly. Make sure that your final theme in Dev Center includes both your customized clone and the configuration file that you created before.

  1. In the terminal window, type grunt build –force and check for a successful build message.
  2. Once the build is successful, publish the customized theme to the Dev Center by typing the command grunt mozusync:upload and then authorizing with your password. This will upload all the customizations to the Dev Center.
  3. To apply it to a tenant, it must be installed on a sandbox. Follow section 1.4: Install Your Theme in a Sandbox from the Get Started guide.
  4. To apply the updates in Site Builder, follow section 1.5: Apply Your Theme in Site Builder from the Get Started guide.
  5. To test the new interface styling, click the fulfiller link within Site Builder to view the customizations. To test the returns customization specifically, click on Create Return or Process Return Button once viewing the UI.

Kibo recommends applying any theme customizations to all of your sites. This is because the Fulfiller UI cannot distinguish between sites except when viewing shipment details, so the default site's theme is always used on the dashboard or any other page where there isn't a specific shipment to reference.