https://github.com/commercetools/key-applier
Apply keys to resources in your commercetools Composable Commerce Project
https://github.com/commercetools/key-applier
commercetools
Last synced: 7 months ago
JSON representation
Apply keys to resources in your commercetools Composable Commerce Project
- Host: GitHub
- URL: https://github.com/commercetools/key-applier
- Owner: commercetools
- Created: 2024-10-22T22:50:36.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-14T15:23:07.000Z (10 months ago)
- Last Synced: 2025-06-09T06:54:59.964Z (7 months ago)
- Topics: commercetools
- Language: TypeScript
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
npm install
```
3. Build the application:
```bash
npm run build
```
4. Create a commercetools Composable Commerce [API Client](https://docs.commercetools.com/getting-started/create-api-client) that can manage:
- Cart Discounts
- Categories
- Customers
- Customer Groups
- Discount Codes
- Products
- Standalone Prices
- Tax Categories
- Inventory Entries
5. Download the **Environment Variables (.env)** for this API Client.
6. Rename the downloaded file `.env`, and copy it to the cloned repository.
7. Run the application:
```bash
npm start
```