Skip to main content

Clean Up Storefront Data

Learning Objectives

After completing this unit, you’ll be able to:

  • List the types of data to focus on for a cleanup plan.
  • List the tools you can use to keep storefront data under control.
  • Explain why using a naming convention is helpful with data cleanup.
  • Describe how you can access WebDAV files.
  • Explain why it’s important to limit campaign and promotion records.

Data Cleanup

During the holiday season, unnecessary storefront data can clog an otherwise healthy system, resulting in reduced performance and lost sales. Linda Rosenberg, Cloud Kicks admin, has an awesome data cleanup planned for her storefront data that includes:

  • Campaigns and promotions
  • Replication settings
  • Data objects retention settings
  • Content Slots
  • Metadata

She uses a variety of tools in her data reduction plan, such as:

  • Campaign and promotion reports
  • Business Manager
  • The Open Commerce API (OCAPI) Data API
  • The Alerts Framework
  • Third-party applications
  • Control Center

Review Campaign and Promotion Data

Each time a shopper clicks the Buy button, B2C Commerce checks which promotions apply. This is processing intensive, though the shopper might not even blink while it’s happening. That’s why Linda searches for ways to reduce campaign and promotion data to a necessary minimum.

Campaign and Promotion Reports

She contacts her technical account manager (TAM) who helps her review her system’s campaign and promotion object usage via a list of these categorized data objects.

Category

Description

Inactive Campaigns

Disabled campaign objects

Expired Campaigns

Campaign objects with a scheduled end date in the past

Inactive Promotions

Disabled promotion objects

Expired Promotions

Promotion objects where the schedule of all assigned campaigns and A/B tests have expired

Orphaned Promotions

Promotions that are not assigned to a campaign or A/B test

Once a week, she removes expired campaigns and promotions. She coordinates her work with the merchandisers, who often use existing campaigns and promotions as templates to create new ones. While they try to keep the campaign/promotion count under 400 items, sometimes they forget. Then the system slows as B2C Commerce evaluates each potential condition and then an individual shopper’s qualifiers. Because the process includes disabled campaigns and promotions, these objects should be deleted.

Naming Convention

To make it easier to identify objects she no longer needs, Linda creates a naming convention that includes object-specific info. For sports equipment promotions, for example, object names begin with eqp_.

  • eqp_50percent_off
  • eqp_bonus_2for1

Data API for Data Elimination

While Linda can delete campaigns and promotions manually in Business Manager, there’s an easier way. She asks a developer to create a program using the OCAPI Data API to perform bulk changes to these data API resources.

  • CampaignSearch
  • Campaigns
  • PromotionSearch
  • Promotions

Replication Settings

Linda uses replication to move updated and vetted code and data from the staging instance to production. Replication processing speed is highly dependent on the amount of data it moves, typically product, pricing, coupons, content, and custom objects. Cleaning up this data to ensure it’s relevant data is the first step in reducing replication time. 

Linda schedules replications to run during off peak hours and with optimized run times where applicable. If she can’t get her processes to a reasonable speed, she can gain more insight by contacting her TAM and opening a support ticket.

Configure Data Object Retention

Linda takes a look at global settings that let her limit how long data is saved. 

Setting

Description

Enter

Product list

The number of days B2C Commerce retains anonymous customer product lists, after which it removes them, such as wish lists.

1 to 30

Inventory records

The number of days B2C Commerce stores inventory records that don't reference an existing product, after which, it removes the records.

1 to 365, or 0 if they are not to be removed

Product prices

The number of days B2C Commerce stores product price records that don't reference an existing product, after which it removes the records.

1 to 365, or 0 if they are not to be removed

She has a lot to consider. What’s a reasonable number of days to keep these objects in the system? While for guest shoppers she might want to preserve wish lists for a few days, there might be no value in keeping orphaned inventory or price records. Configuring retention settings and purging unnecessary data from the system helps ensure a cleaner system with improved site performance.

Here’s how she configures these settings.

  1. Open Business Manager.
  2. Select Admin > Global Preferences > Retention Settings.
    In Business Manager, configure retention settings help clean up data.
  3. Enter Product List Retention: 10
  4. Enter Inventory Record Retention: 1
  5. Enter Product Price Retention: 1
  6. Click Apply.

Content Slots

Developers and merchandisers are always busy creating and updating content slots and configurations to keep the storefront fresh. In the flurry of activity, orphaned records remain behind:

  • Content slots that are no longer referenced by ISML templates
  • Slot configurations that are no longer valid because their context categories or folders no longer exist, or the related slots are gone

Here’s how Linda reviews the number of orphaned slot objects there are in the system so she can delete them.

  1. Open Business Manager on a staging instance.
  2. Select site > Merchant Tools > Online Marketing > Content Slots.
    In the Business Manager Content Slots module, click the Referenced Content Slots or Slot Configurations to reduce obsolete data.
  3. Click the Unreferenced Contents Slots link.
    • Select a content slot and click Delete or click Delete All to delete one or more unreferenced content slots.
    • Return to the previous page.
  1. Click the Unreferenced Slot Configurations link.
    • Select a slot configuration and click Delete or click Delete All to delete one or more unreferenced slot configurations.
    • Click <<Back.

Metadata: Custom Attributes

The B2C Commerce system’s metadata includes custom attributes that represent specialized product and order fields. Even if the system doesn’t use this data, the data can cause storefront performance issues just by its existence, especially during index rebuilds or usage. The data can also cause uncertainty within Business Manager as it tries to figure out which fields it needs. Once a month, Linda takes a look at custom attributes (in Business Manager: Administration > Site Development > Custom Object Types) to see if they are still in use.

WebDav Files

While Linda typically uses Business Manager to find and delete unused WebDav files, she can also use a third-party WebDAV client, such as Cyberduck or Transmit.

To access WebDAV Business Manager:

  1. Open Business Manager.
  2. Select Administration > Site Development > Development Setup.
  3. Click the Folder Browser tab.
    In Business Manager, access the WebDAV files.
  4. Navigate to your WebDAV permitted folder.
  5. Enter the file name you’re looking for in the Filter By Name field, and click Filter.
    • To download a file, click the download icon under Actions.
    • To copy the URL of the directory to the clipboard of your local machine, click
      Copy WebDAV URL. You can use the URL to access the directory in a
      third-party WebDAV client.

Get Alerts with the Alert Framework

Keeping up with data growth can be a chore, and Business Manager provides no easy way to find every deletion candidate. Outdated data can lurk within multiple Business Manager modules, forcing Linda to dig deep to figure out what data is irrelevant and what isn’t.

That’s where the alert framework, a data cleanup cartridge, comes in. This tool, created by Salesforce employees as a Business Manager extension, shows irrelevant data across the system all in one place. Linda can easily spot potential clean up opportunities and fix them. 

The alert framework provides site-specific and organization-specific (global) alerts. It handles campaign, promotion, coupon, and pricebook data at a site level, and data such as compatibility mode and price books at an organization level, as shown in this table.

Context

Data/type (setting)

Site

  • Campaigns
    • Expired
    • Disabled
  • Promotions
    • Expired
    • Disabled
  • Coupons
    • Disabled
    • Not assigned to active promotions
  • Pricebooks
    • Expired
    • Disabled

Organization

  • Compatibility Mode
    • Outdated
  • Pricebooks
    • Pricebook currency not used on any site

Here’s how to install the cartridge.

  1. Go to https://github.com/SalesforceCommerceCloud/sfcc-data-maintenance. Credentials are required to access this repository. If you try to access the repository without credentials, you receive a 404 error.
  2. Download and include the cartridge in your custom build.
  3. Include the cartridge in the Business Manager cartridge path.
  4. Create a job using the custom job steps.
    • custom.EvaluateSiteAlerts (must run in sequential mode)
    • custom.EvaluateOrgAlerts
  1. Ask Salesforce Operation to Restart the instance if the job fails with this message:
    “Cannot find a notification description for alert descriptor ID.”

Review the Import/Export Folder Size

Maintaining control of the import and export folder size helps improve system performance. Linda checks its size weekly, making sure it’s not growing too fast. She also performs a monthly review to remove:

  • Unused XML or other flat files
  • Empty main or secondary folders
  • Unused code files
  • Unused OCAPI and users IDs

Review Data Storage with Control Center

Linda uses Control Center to review realm-based data storage consumption. Here’s how she does it.

  1. Open Control Center via your Account Manager Login authentication credentials for single sign on.
  2. Search by your associated realm or account detail.
  3. Select the instance you want to review.
  4. Click the Statistics button. The graphs show data storage consumptions of instance and realm for current and previous months.

Next Steps

In this unit, you learned about the settings and tools you can use to reduce storefront data to improve performance, and why data cleanup is important. Next, learn how to manage traffic for a hype sale.

Resources

Compartilhe seu feedback do Trailhead usando a Ajuda do Salesforce.

Queremos saber sobre sua experiência com o Trailhead. Agora você pode acessar o novo formulário de feedback, a qualquer momento, no site Ajuda do Salesforce.

Saiba mais Continue compartilhando feedback