XML Import
Automated XML feed import and synchronization for products.
CloudCart supports two XML-based import methods:
- XML Import — One-time or manual import from an XML feed
- XML Sync — Scheduled automatic synchronization from XML feeds
XML Import Workflow
Step 1: Create Task
mutation {
xmlImportSaveStep1(input: {
name: "My Import"
url: "https://supplier.com/products.xml"
product_tag: "product"
}) {
success
message
}
}Step 2: Map Fields (Skeleton)
mutation {
xmlImportSaveStep2(id: "task_id", input: {
id: "task_id"
name: "My Import"
skeletons: {
id: { finder: "product > SKU", update: false }
name: { finder: "product > Name", update: true }
price: { finder: "product > Price", update: true }
quantity: { finder: "product > Stock", update: true }
description: { finder: "product > Description", update: true }
images: { finder: "product > Images > Image", update: true }
}
}) {
success
message
}
}Step 3: Read Mapped Fields
query {
xmlImportStep2(id: "task_id")
}Skeleton Field Format
Each skeleton field accepts:
| Key | Type | Description |
|---|---|---|
finder | String | XPath-like selector (e.g. product > Name) |
update | Boolean | Whether to update this field on re-import |
XML Sync
XML Sync uses the same skeleton mapping but runs on a schedule.
mutation {
xmlSyncSaveStep2(id: "task_id", input: {
id: "task_id"
skeletons: {
id: { finder: "product > ID", update: false }
price: { finder: "product > Price", update: true }
quantity: { finder: "product > Stock", update: true }
}
}) {
success
message
}
}