|
| 1 | +# Supported Resources and Fields |
| 2 | + |
| 3 | +This document lists all resource types supported by **commercetools-sync-java** and the specific fields that can be created and updated for each resource. |
| 4 | + |
| 5 | +> **Note:** This library only **creates** and **updates** resources — it never deletes them. |
| 6 | +
|
| 7 | +--- |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +| Resource | Supported Fields | Complexity | |
| 12 | +|----------|:----------------:|:----------:| |
| 13 | +| [Products](#products) | 20+ | Very High | |
| 14 | +| [Categories](#categories) | 12 | Medium | |
| 15 | +| [ProductTypes](#producttypes) | 12 | Medium | |
| 16 | +| [Types](#types) | 8 | Low | |
| 17 | +| [InventoryEntries](#inventoryentries) | 6 | Low | |
| 18 | +| [CartDiscounts](#cartdiscounts) | 12 | Medium | |
| 19 | +| [States](#states) | 6 | Low | |
| 20 | +| [TaxCategories](#taxcategories) | 3 | Low | |
| 21 | +| [CustomObjects](#customobjects) | 3 | Low | |
| 22 | +| [Customers](#customers) | 20+ | Medium | |
| 23 | +| [ShoppingLists](#shoppinglists) | 10 | Medium | |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +## Products |
| 28 | + |
| 29 | +Sync class: `ProductSync` |
| 30 | + |
| 31 | +### Product-Level Fields |
| 32 | + |
| 33 | +| Field | Update Action | Notes | |
| 34 | +|-------|---------------|-------| |
| 35 | +| `name` | `changeName` | LocalizedString | |
| 36 | +| `description` | `setDescription` | LocalizedString | |
| 37 | +| `slug` | `changeSlug` | LocalizedString | |
| 38 | +| `searchKeywords` | `setSearchKeywords` | LocalizedString | |
| 39 | +| `metaTitle` | `setMetaTitle` | LocalizedString | |
| 40 | +| `metaDescription` | `setMetaDescription` | LocalizedString | |
| 41 | +| `metaKeywords` | `setMetaKeywords` | LocalizedString | |
| 42 | +| `categories` | `addToCategory` / `removeFromCategory` | Category references | |
| 43 | +| `categoryOrderHints` | `setCategoryOrderHint` | Sort order per category | |
| 44 | +| `taxCategory` | `setTaxCategory` | TaxCategory reference | |
| 45 | +| `state` | `transitionState` | State reference | |
| 46 | +| `publish` | `publish` / `unpublish` | Publication state | |
| 47 | + |
| 48 | +### Variant-Level Fields |
| 49 | + |
| 50 | +All variants (master variant and additional variants) support these fields: |
| 51 | + |
| 52 | +| Field | Update Action | Notes | |
| 53 | +|-------|---------------|-------| |
| 54 | +| `sku` | `setSku` | Stock keeping unit | |
| 55 | +| `attributes` | `setAttribute` / `setAttributeInAllVariants` | Custom attributes; `SameForAll` constraint supported | |
| 56 | +| `prices` | `addPrice` / `changePrice` / `removePrice` | Includes value, tiers, and custom fields per price | |
| 57 | +| `images` | `addExternalImage` / `removeImage` / `moveImageToPosition` | Image URLs and ordering | |
| 58 | +| `assets` | `addAsset` / `removeAsset` / `changeAssetName` / `setAssetDescription` / `setAssetSources` / `setAssetTags` | Includes custom fields per asset | |
| 59 | + |
| 60 | +### Variant Management |
| 61 | + |
| 62 | +| Operation | Update Action | Notes | |
| 63 | +|-----------|---------------|-------| |
| 64 | +| Add variant | `addVariant` | Add new variants to the product | |
| 65 | +| Remove variant | `removeVariant` | Remove variants (except master variant) | |
| 66 | +| Change master variant | `changeMasterVariant` | Swap which variant is the master | |
| 67 | + |
| 68 | +### Filtering |
| 69 | + |
| 70 | +Product sync supports **sync filtering** via `SyncFilter` and `ActionGroup` to include or exclude specific field groups from the sync process. |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## Categories |
| 75 | + |
| 76 | +Sync class: `CategorySync` |
| 77 | + |
| 78 | +| Field | Update Action | Notes | |
| 79 | +|-------|---------------|-------| |
| 80 | +| `name` | `changeName` | LocalizedString | |
| 81 | +| `slug` | `changeSlug` | LocalizedString | |
| 82 | +| `description` | `setDescription` | LocalizedString | |
| 83 | +| `parent` | `changeParent` | Category reference; cannot be unset | |
| 84 | +| `orderHint` | `changeOrderHint` | Cannot be unset | |
| 85 | +| `externalId` | `setExternalId` | | |
| 86 | +| `metaTitle` | `setMetaTitle` | LocalizedString | |
| 87 | +| `metaDescription` | `setMetaDescription` | LocalizedString | |
| 88 | +| `metaKeywords` | `setMetaKeywords` | LocalizedString | |
| 89 | +| `assets` | `addAsset` / `removeAsset` / `changeAssetName` / `setAssetDescription` / `setAssetSources` / `setAssetTags` | Includes custom fields per asset | |
| 90 | +| `custom` | `setCustomType` / `setCustomField` | Custom fields | |
| 91 | + |
| 92 | +--- |
| 93 | + |
| 94 | +## ProductTypes |
| 95 | + |
| 96 | +Sync class: `ProductTypeSync` |
| 97 | + |
| 98 | +### ProductType-Level Fields |
| 99 | + |
| 100 | +| Field | Update Action | Notes | |
| 101 | +|-------|---------------|-------| |
| 102 | +| `name` | `changeName` | | |
| 103 | +| `description` | `changeDescription` | | |
| 104 | + |
| 105 | +### Attribute Definition Management |
| 106 | + |
| 107 | +| Operation | Update Action | Notes | |
| 108 | +|-----------|---------------|-------| |
| 109 | +| Add attribute | `addAttributeDefinition` | | |
| 110 | +| Remove attribute | `removeAttributeDefinition` | | |
| 111 | +| Reorder attributes | `changeAttributeOrder` | | |
| 112 | + |
| 113 | +### Per-Attribute Definition Fields |
| 114 | + |
| 115 | +| Field | Update Action | Notes | |
| 116 | +|-------|---------------|-------| |
| 117 | +| `label` | `changeLabel` | LocalizedString | |
| 118 | +| `inputTip` | `setInputTip` | LocalizedString | |
| 119 | +| `isSearchable` | `changeIsSearchable` | Boolean | |
| 120 | +| `inputHint` | `changeInputHint` | SingleLine / MultiLine | |
| 121 | +| `attributeConstraint` | `changeAttributeConstraint` | Only `SameForAll` → `None` or `Unique` → `None` | |
| 122 | +| `enumValues` | `addEnumValue` / `changeEnumValueOrder` / `changeEnumValueLabel` | For `AttributeEnumType` | |
| 123 | +| `localizedEnumValues` | `addLocalizedEnumValue` / `changeLocalizedEnumValueOrder` / `changeLocalizedEnumValueLabel` | For `AttributeLocalizedEnumType` | |
| 124 | + |
| 125 | +--- |
| 126 | + |
| 127 | +## Types |
| 128 | + |
| 129 | +Sync class: `TypeSync` |
| 130 | + |
| 131 | +### Type-Level Fields |
| 132 | + |
| 133 | +| Field | Update Action | Notes | |
| 134 | +|-------|---------------|-------| |
| 135 | +| `name` | `changeName` | LocalizedString | |
| 136 | +| `description` | `setDescription` | LocalizedString | |
| 137 | + |
| 138 | +### Field Definition Management |
| 139 | + |
| 140 | +| Operation | Update Action | Notes | |
| 141 | +|-----------|---------------|-------| |
| 142 | +| Add field definition | `addFieldDefinition` | | |
| 143 | +| Remove field definition | `removeFieldDefinition` | | |
| 144 | +| Reorder field definitions | `changeFieldDefinitionOrder` | | |
| 145 | + |
| 146 | +### Per-Field Definition Fields |
| 147 | + |
| 148 | +| Field | Update Action | Notes | |
| 149 | +|-------|---------------|-------| |
| 150 | +| `label` | `changeLabel` | LocalizedString | |
| 151 | +| `inputHint` | `changeInputHint` | SingleLine / MultiLine | |
| 152 | +| `enumValues` | `addEnumValue` / `changeEnumValueOrder` / `changeEnumValueLabel` | For `CustomFieldEnumType` | |
| 153 | +| `localizedEnumValues` | `addLocalizedEnumValue` / `changeLocalizedEnumValueOrder` / `changeLocalizedEnumValueLabel` | For `CustomFieldLocalizedEnumType` | |
| 154 | + |
| 155 | +--- |
| 156 | + |
| 157 | +## InventoryEntries |
| 158 | + |
| 159 | +Sync class: `InventorySync` |
| 160 | + |
| 161 | +| Field | Update Action | Notes | |
| 162 | +|-------|---------------|-------| |
| 163 | +| `quantityOnStock` | `changeQuantity` | Defaults to 0 if null | |
| 164 | +| `restockableInDays` | `setRestockableInDays` | | |
| 165 | +| `expectedDelivery` | `setExpectedDelivery` | ZonedDateTime | |
| 166 | +| `supplyChannel` | `setSupplyChannel` | Channel reference | |
| 167 | +| `custom` | `setCustomType` / `setCustomField` | Custom fields | |
| 168 | + |
| 169 | +--- |
| 170 | + |
| 171 | +## CartDiscounts |
| 172 | + |
| 173 | +Sync class: `CartDiscountSync` |
| 174 | + |
| 175 | +| Field | Update Action | Notes | |
| 176 | +|-------|---------------|-------| |
| 177 | +| `name` | `changeName` | LocalizedString | |
| 178 | +| `description` | `setDescription` | LocalizedString | |
| 179 | +| `value` | `changeValue` | Supports Absolute, Relative, Fixed, and GiftLineItem | |
| 180 | +| `cartPredicate` | `changeCartPredicate` | | |
| 181 | +| `target` | `changeTarget` | | |
| 182 | +| `sortOrder` | `changeSortOrder` | | |
| 183 | +| `isActive` | `changeIsActive` | Boolean; defaults to `true` | |
| 184 | +| `requiresDiscountCode` | `changeRequiresDiscountCode` | Boolean; defaults to `false` | |
| 185 | +| `validFrom` | `setValidFrom` | ZonedDateTime; when both `validFrom` and `validUntil` change, `setValidFromAndUntil` is used instead | |
| 186 | +| `validUntil` | `setValidUntil` | ZonedDateTime; see `validFrom` note above | |
| 187 | +| `stackingMode` | `changeStackingMode` | Defaults to `Stacking` | |
| 188 | +| `custom` | `setCustomType` / `setCustomField` | Custom fields | |
| 189 | + |
| 190 | +--- |
| 191 | + |
| 192 | +## States |
| 193 | + |
| 194 | +Sync class: `StateSync` |
| 195 | + |
| 196 | +| Field | Update Action | Notes | |
| 197 | +|-------|---------------|-------| |
| 198 | +| `type` | `changeType` | | |
| 199 | +| `name` | `setName` | LocalizedString | |
| 200 | +| `description` | `setDescription` | LocalizedString | |
| 201 | +| `initial` | `changeInitial` | Boolean | |
| 202 | +| `roles` | `addRoles` / `removeRoles` | | |
| 203 | +| `transitions` | `setTransitions` | State references | |
| 204 | + |
| 205 | +--- |
| 206 | + |
| 207 | +## TaxCategories |
| 208 | + |
| 209 | +Sync class: `TaxCategorySync` |
| 210 | + |
| 211 | +| Field | Update Action | Notes | |
| 212 | +|-------|---------------|-------| |
| 213 | +| `name` | `changeName` | | |
| 214 | +| `description` | `setDescription` | | |
| 215 | +| `taxRates` | `addTaxRate` / `removeTaxRate` / `replaceTaxRate` | Matched by key | |
| 216 | + |
| 217 | +--- |
| 218 | + |
| 219 | +## CustomObjects |
| 220 | + |
| 221 | +Sync class: `CustomObjectSync` |
| 222 | + |
| 223 | +| Field | Notes | |
| 224 | +|-------|-------| |
| 225 | +| `container` | Part of the composite identifier | |
| 226 | +| `key` | Part of the composite identifier | |
| 227 | +| `value` | JSON value; compared for equality; upsert-based (create or replace) | |
| 228 | + |
| 229 | +> CustomObjects use an **upsert** approach — if a custom object with the same `container` and `key` exists, its `value` is replaced. No individual update actions are generated. |
| 230 | +
|
| 231 | +--- |
| 232 | + |
| 233 | +## Customers |
| 234 | + |
| 235 | +Sync class: `CustomerSync` |
| 236 | + |
| 237 | +### Personal Information |
| 238 | + |
| 239 | +| Field | Update Action | Notes | |
| 240 | +|-------|---------------|-------| |
| 241 | +| `email` | `changeEmail` | | |
| 242 | +| `firstName` | `setFirstName` | | |
| 243 | +| `lastName` | `setLastName` | | |
| 244 | +| `middleName` | `setMiddleName` | | |
| 245 | +| `title` | `setTitle` | | |
| 246 | +| `salutation` | `setSalutation` | | |
| 247 | +| `dateOfBirth` | `setDateOfBirth` | | |
| 248 | +| `companyName` | `setCompanyName` | | |
| 249 | +| `vatId` | `setVatId` | | |
| 250 | +| `locale` | `setLocale` | | |
| 251 | +| `customerNumber` | `setCustomerNumber` | Immutable once set; triggers warning if changed | |
| 252 | +| `externalId` | `setExternalId` | | |
| 253 | + |
| 254 | +### References |
| 255 | + |
| 256 | +| Field | Update Action | Notes | |
| 257 | +|-------|---------------|-------| |
| 258 | +| `customerGroup` | `setCustomerGroup` | CustomerGroup reference | |
| 259 | +| `stores` | `addStore` / `removeStore` / `setStores` | Store references | |
| 260 | + |
| 261 | +### Addresses |
| 262 | + |
| 263 | +| Field | Update Action | Notes | |
| 264 | +|-------|---------------|-------| |
| 265 | +| `addresses` | `addAddress` / `changeAddress` / `removeAddress` | Matched by address key | |
| 266 | +| `defaultShippingAddress` | `setDefaultShippingAddress` | | |
| 267 | +| `defaultBillingAddress` | `setDefaultBillingAddress` | | |
| 268 | +| `shippingAddressIds` | `addShippingAddressId` / `removeShippingAddressId` | | |
| 269 | +| `billingAddressIds` | `addBillingAddressId` / `removeBillingAddressId` | | |
| 270 | + |
| 271 | +### Custom Fields |
| 272 | + |
| 273 | +| Field | Update Action | Notes | |
| 274 | +|-------|---------------|-------| |
| 275 | +| `custom` | `setCustomType` / `setCustomField` | Custom fields | |
| 276 | + |
| 277 | +--- |
| 278 | + |
| 279 | +## ShoppingLists |
| 280 | + |
| 281 | +Sync class: `ShoppingListSync` |
| 282 | + |
| 283 | +### ShoppingList-Level Fields |
| 284 | + |
| 285 | +| Field | Update Action | Notes | |
| 286 | +|-------|---------------|-------| |
| 287 | +| `name` | `changeName` | LocalizedString | |
| 288 | +| `slug` | `setSlug` | LocalizedString | |
| 289 | +| `description` | `setDescription` | LocalizedString | |
| 290 | +| `customer` | `setCustomer` | Customer reference | |
| 291 | +| `store` | `setStore` | Store reference | |
| 292 | +| `anonymousId` | `setAnonymousId` | | |
| 293 | +| `deleteDaysAfterLastModification` | `setDeleteDaysAfterLastModification` | | |
| 294 | +| `custom` | `setCustomType` / `setCustomField` | Custom fields | |
| 295 | + |
| 296 | +### Line Items |
| 297 | + |
| 298 | +| Operation | Update Action | Notes | |
| 299 | +|-----------|---------------|-------| |
| 300 | +| Add line item | `addLineItem` | | |
| 301 | +| Remove line item | `removeLineItem` | | |
| 302 | +| Update line item quantity | `changeLineItemQuantity` | | |
| 303 | +| Update line item custom fields | `setLineItemCustomType` / `setLineItemCustomField` | Custom fields per line item | |
| 304 | + |
| 305 | +### Text Line Items |
| 306 | + |
| 307 | +| Operation | Update Action | Notes | |
| 308 | +|-----------|---------------|-------| |
| 309 | +| Add text line item | `addTextLineItem` | | |
| 310 | +| Remove text line item | `removeTextLineItem` | | |
| 311 | +| Update text line item name | `changeTextLineItemName` | | |
| 312 | +| Update text line item description | `setTextLineItemDescription` | | |
| 313 | +| Update text line item quantity | `changeTextLineItemQuantity` | | |
| 314 | +| Update text line item custom fields | `setTextLineItemCustomType` / `setTextLineItemCustomField` | Custom fields per text line item | |
0 commit comments