Skip to content

Apply keys to resources in your commercetools Composable Commerce Project

Notifications You must be signed in to change notification settings

commercetools/key-applier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this useful for?

Import and export functionality in Composable Commerce uses the key field as the identifier for resources. If your resources do not have a key, they cannot be updated via import and their references may be broken in exported files.

As the key value is optional, resources within your Composable Commerce Project may lack them.

This app sets boilerplate key values to resources, which enables you to fully use the import and export functions within Composable Commerce.

Note

The boilerplate key values use the format: {resourceType}_{resourceId}.

For example: category_512a4466-6876-4c41-add8-1406c6c68da3

How do I set this up?

  1. Clone this repository.
  2. Install the dependencies using the command:
    npm install
  3. Create a commercetools Composable Commerce API Client that can manage:
    • Cart Discounts
    • Categories
    • Customers
    • Customer Groups
    • Discount Codes
    • Products
    • Standalone Prices
    • Tax Categories
  4. Download the Environment Variables (.env) for this API Client.
  5. Rename the downloaded file .env, and copy it to the cloned repository.

About

Apply keys to resources in your commercetools Composable Commerce Project

Topics

Resources

Stars

Watchers

Forks