@cxtms/cx-schema 1.9.31 → 1.9.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -22,9 +22,11 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"placeholder": {
|
|
25
|
-
"type": "string",
|
|
26
|
-
"description": "Field placeholder text",
|
|
27
|
-
"x-example":
|
|
25
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
|
|
26
|
+
"description": "Field placeholder text. Supports plain strings or localized values.",
|
|
27
|
+
"x-example": {
|
|
28
|
+
"en-US": "Enter Country Code"
|
|
29
|
+
}
|
|
28
30
|
},
|
|
29
31
|
"type": {
|
|
30
32
|
"type": "string",
|
|
@@ -71,7 +73,10 @@
|
|
|
71
73
|
"allowMultiple": { "type": "boolean" },
|
|
72
74
|
"allowClear": { "type": "boolean" },
|
|
73
75
|
"allowSearch": { "type": "boolean" },
|
|
74
|
-
"placeholder": {
|
|
76
|
+
"placeholder": {
|
|
77
|
+
"oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
|
|
78
|
+
"description": "Select placeholder text. Supports plain strings or localized values."
|
|
79
|
+
},
|
|
75
80
|
"minWidth": { "type": "string" },
|
|
76
81
|
"valueFieldName": {
|
|
77
82
|
"type": "string",
|
|
@@ -258,7 +263,9 @@
|
|
|
258
263
|
"props": {
|
|
259
264
|
"label": { "en-US": "Description" },
|
|
260
265
|
"type": "text",
|
|
261
|
-
"placeholder":
|
|
266
|
+
"placeholder": {
|
|
267
|
+
"en-US": "Enter description"
|
|
268
|
+
}
|
|
262
269
|
}
|
|
263
270
|
}
|
|
264
271
|
]
|
|
@@ -78,15 +78,29 @@
|
|
|
78
78
|
"type": "object",
|
|
79
79
|
"description": "Import options (for Order/Import@1)",
|
|
80
80
|
"properties": {
|
|
81
|
+
"defaultDivisionId": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"description": "Default division to use when divisionId is omitted from an imported order."
|
|
84
|
+
},
|
|
81
85
|
"orderMatchByFields": {
|
|
82
86
|
"type": "array",
|
|
83
87
|
"items": { "type": "string" },
|
|
84
|
-
"description": "Fields to match existing orders. If null,
|
|
88
|
+
"description": "Fields to match existing orders. If null or empty, falls back to orderId when provided."
|
|
89
|
+
},
|
|
90
|
+
"orderEntityMatchByFields": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": { "type": "string" },
|
|
93
|
+
"description": "Fields used to match existing order entities. Supports nested values like contact.name."
|
|
94
|
+
},
|
|
95
|
+
"orderEntityContactMatchByFields": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": { "type": "string" },
|
|
98
|
+
"description": "Fields used to match contacts nested inside order entities."
|
|
85
99
|
},
|
|
86
|
-
"
|
|
100
|
+
"billToContactMatchByFields": {
|
|
87
101
|
"type": "array",
|
|
88
102
|
"items": { "type": "string" },
|
|
89
|
-
"description": "Fields to match
|
|
103
|
+
"description": "Fields used to match the bill-to contact."
|
|
90
104
|
},
|
|
91
105
|
"contactAddressMatchByFields": {
|
|
92
106
|
"type": "array",
|
|
@@ -98,19 +112,56 @@
|
|
|
98
112
|
"items": { "type": "string" },
|
|
99
113
|
"description": "Fields to match existing inventory items on commodities."
|
|
100
114
|
},
|
|
115
|
+
"inventoryItemCustomerContactMatchByFields": {
|
|
116
|
+
"type": "array",
|
|
117
|
+
"items": { "type": "string" },
|
|
118
|
+
"description": "Fields used to match customer contacts nested inside inventory items."
|
|
119
|
+
},
|
|
101
120
|
"tagMatchByFields": {
|
|
102
121
|
"type": "array",
|
|
103
122
|
"items": { "type": "string" },
|
|
104
123
|
"description": "Fields to match existing tags."
|
|
105
124
|
},
|
|
125
|
+
"commodityMatchByTrackingNumber": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"description": "When true, commodities can be matched by tracking number-oriented data instead of commodityId."
|
|
128
|
+
},
|
|
106
129
|
"commodityMatchByFields": {
|
|
107
130
|
"type": "array",
|
|
108
131
|
"items": { "type": "string" },
|
|
109
132
|
"description": "Fields to match existing commodities."
|
|
110
133
|
},
|
|
134
|
+
"createEventDefinitions": {
|
|
135
|
+
"type": "boolean",
|
|
136
|
+
"description": "Auto-create missing tracking event definitions during import. Default: true."
|
|
137
|
+
},
|
|
138
|
+
"eventDefinitionDefaults": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"description": "Default values applied when creating event definitions during import.",
|
|
141
|
+
"additionalProperties": true
|
|
142
|
+
},
|
|
143
|
+
"trackingEventMatchByFields": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"items": { "type": "string" },
|
|
146
|
+
"description": "Fields used to deduplicate imported tracking events."
|
|
147
|
+
},
|
|
148
|
+
"matchByEventDefinition": {
|
|
149
|
+
"type": "array",
|
|
150
|
+
"items": { "type": "string" },
|
|
151
|
+
"description": "Fields on eventDefinition customValues used to match event definitions instead of eventDefinitionName."
|
|
152
|
+
},
|
|
153
|
+
"skipIfExists": {
|
|
154
|
+
"type": "boolean",
|
|
155
|
+
"description": "Skip importing tracking events that already exist based on the configured match fields. Default: true."
|
|
156
|
+
},
|
|
111
157
|
"linkTrackingEventsToCommodities": {
|
|
112
158
|
"type": "boolean",
|
|
113
159
|
"description": "When true, imported tracking events are linked to the order's first-level (non-container) commodities. Default: false."
|
|
160
|
+
},
|
|
161
|
+
"skipValues": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"enum": ["None", "Null", "NullOrEmpty"],
|
|
164
|
+
"description": "Controls whether null/empty values in the import payload are stripped before updating existing orders, commodities, and order entities. None: overwrite with nulls; Null: skip null values; NullOrEmpty: skip null and empty strings (default). Prevents feed data that stops returning fields (e.g. ETA after delivery) from wiping existing data."
|
|
114
165
|
}
|
|
115
166
|
},
|
|
116
167
|
"additionalProperties": true
|
|
@@ -102,6 +102,42 @@ Input priority: `stream` > `fileUrl` > `postalCodes`. Task catches exceptions an
|
|
|
102
102
|
notes: "Updated by workflow"
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
+
### Order/Import@1
|
|
106
|
+
|
|
107
|
+
Imports order data from an external feed. Supports create and upsert (match-by-fields).
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
- task: "Order/Import@1"
|
|
111
|
+
name: ImportOrder
|
|
112
|
+
inputs:
|
|
113
|
+
data: "{{ inputs.orderData }}"
|
|
114
|
+
options:
|
|
115
|
+
orderMatchByFields: ["customValues.externalId"]
|
|
116
|
+
commodityMatchByFields: ["customValues.lineId"]
|
|
117
|
+
skipValues: "NullOrEmpty" # default — preserves existing data when feed stops sending a field
|
|
118
|
+
outputs:
|
|
119
|
+
- name: result
|
|
120
|
+
mapping: "result?"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**`options` parameters:**
|
|
124
|
+
|
|
125
|
+
| Option | Type | Default | Description |
|
|
126
|
+
|--------|------|---------|-------------|
|
|
127
|
+
| `orderMatchByFields` | string[] | null | Fields to match existing orders for upsert. null = always create. |
|
|
128
|
+
| `contactMatchByFields` | string[] | null | Fields to match existing contacts on order entities. |
|
|
129
|
+
| `contactAddressMatchByFields` | string[] | null | Fields to match existing contact addresses within order entities. |
|
|
130
|
+
| `inventoryItemMatchByFields` | string[] | null | Fields to match existing inventory items on commodities. |
|
|
131
|
+
| `tagMatchByFields` | string[] | null | Fields to match existing tags. |
|
|
132
|
+
| `commodityMatchByFields` | string[] | null | Fields to match existing commodities on update. |
|
|
133
|
+
| `linkTrackingEventsToCommodities` | boolean | false | Link imported tracking events to first-level commodities. |
|
|
134
|
+
| `skipValues` | `None` \| `Null` \| `NullOrEmpty` | `NullOrEmpty` | Strip null/empty values before updating existing records. `NullOrEmpty` (default) prevents feeds that stop returning a field from wiping existing data (e.g. ETA after delivery). Use `None` to allow explicit null overwrites. |
|
|
135
|
+
|
|
136
|
+
**`skipValues` modes:**
|
|
137
|
+
- `NullOrEmpty` (default) — strips null and empty string values before update; existing field values are preserved when the feed omits them
|
|
138
|
+
- `Null` — strips only null values; empty strings still overwrite
|
|
139
|
+
- `None` — no stripping; all values including nulls overwrite existing data
|
|
140
|
+
|
|
105
141
|
**Order/Import commodity fields**: When importing commodities, you can supply `packageTypeName` (string) instead of `packageTypeId`. The import handler resolves the name to an ID using an N+1-safe per-import cache (one DB query per unique package type name).
|
|
106
142
|
|
|
107
143
|
## Contact
|