Skip to content

Instantly share code, notes, and snippets.

@mmarienko
Last active September 8, 2023 13:44
Show Gist options
  • Save mmarienko/72c687443dcd0d7498410e070ea8a991 to your computer and use it in GitHub Desktop.
Save mmarienko/72c687443dcd0d7498410e070ea8a991 to your computer and use it in GitHub Desktop.
Shopify order parser into Shopify Flow json data for Klaviyo
{
"additionalFees": [
{% for fee in order.additionalFees %}
{% if forloop.first != true %},{% endif %}
{
"id": {{ fee.id | json }},
"name": {{ fee. name | json }},
"price": {
"presentmentMoney": {
"amount": {{ fee.price.presentmentMoney.amount | json }},
"currencyCode": {{ fee.price.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ fee.price.shopMoney.amount | json }},
"currencyCode": {{ fee.price.shopMoney.currencyCode | json }}
}
},
"taxLines": [
{% for tl in fee.taxLines %}
{% if forloop.first != true %},{% endif %}
{
"priceSet": {
"presentmentMoney": {
"amount": {{ tl.priceSet.presentmentMoney.amount | json }},
"currencyCode": {{ tl.priceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ tl.priceSet.shopMoney.amount | json }},
"currencyCode": {{ tl.priceSet.shopMoney.currencyCode | json }}
}
},
"rate": {{ tl.rate | json }},
"ratePercentage": {{ tl.ratePercentage | json }},
"title": {{ tl.title | json }}
}
{% endfor %}
]
}
{% endfor %}
],
"alerts": [
{% for alert in order.alerts %}
{% if forloop.first != true %},{% endif %}
{
"title": {{ alert.title | json }},
"dismissibleHandle": {{ alert.dismissibleHandle | json }}
}
{% endfor %}
],
"app": {
"id": {{ order.app.id | json }},
"name": {{ order.app.name | json }}
},
"billingAddress": {
"address1": {{ order.billingAddress.address1 | json }},
"address2": {{ order.billingAddress.address2 | json }},
"city": {{ order.billingAddress.city | json }},
"company": {{ order.billingAddress.company | json }},
"country": {{ order.billingAddress.country | json }},
"countryCodeV2": {{ order.billingAddress.countryCodeV2 | json }},
"firstName": {{ order.billingAddress.firstName | json }},
"formatted": {{ order.billingAddress.formatted | json }},
"id": {{ order.billingAddress.id | json }},
"lastName": {{ order.billingAddress.lastName | json }},
"latitude": {{ order.billingAddress.latitude | json }},
"longitude": {{ order.billingAddress.longitude | json }},
"name": {{ order.billingAddress.name | json }},
"phone": {{ order.billingAddress.phone | json }},
"province": {{ order.billingAddress.province | json }},
"provinceCode": {{ order.billingAddress.provinceCode | json }},
"zip": {{ order.billingAddress.zip | json }}
},
"billingAddressMatchesShippingAddress": {{ order.billingAddressMatchesShippingAddress | json }},
"canMarkAsPaid": {{ order.canMarkAsPaid | json }},
"canNotifyCustomer": {{ order.canNotifyCustomer | json }},
"cancelReason": {{ order.cancelReason | json }},
"cancelledAt": {{ order.cancelledAt | json }},
"capturable": {{ order.capturable | json }},
"cartDiscountAmountSet": {
"presentmentMoney": {
"amount": {{ order.cartDiscountAmountSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.cartDiscountAmountSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.cartDiscountAmountSet.shopMoney.amount | json }},
"currencyCode": {{ order.cartDiscountAmountSet.shopMoney.currencyCode | json }}
}
},
"channelInformation": {
"id": {{ order.channelInformation.id | json }},
"channelId": {{ order.channelInformation.channelId | json }}
},
"clientIp": {{ order.clientIp | json }},
"closed": {{ order.closed | json }},
"closedAt": {{ order.closedAt | json }},
"confirmationNumber": {{ order.confirmationNumber | json }},
"confirmed": {{ order.confirmed | json }},
"createdAt": {{ order.createdAt | json }},
"currencyCode": {{ order.currencyCode | json }},
"currentCartDiscountAmountSet": {
"presentmentMoney": {
"amount": {{ order.currentCartDiscountAmountSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.currentCartDiscountAmountSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.currentCartDiscountAmountSet.shopMoney.amount | json }},
"currencyCode": {{ order.currentCartDiscountAmountSet.shopMoney.currencyCode | json }}
}
},
"currentSubtotalLineItemsQuantity": {{ order.currentSubtotalLineItemsQuantity | json }},
"currentSubtotalPriceSet": {
"presentmentMoney": {
"amount": {{ order.currentSubtotalPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.currentSubtotalPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.currentSubtotalPriceSet.shopMoney.amount | json }},
"currencyCode": {{ order.currentSubtotalPriceSet.shopMoney.currencyCode | json }}
}
},
"currentTaxLines": [
{% for ctl in order.currentTaxLines %}
{% if forloop.first != true %},{% endif %}
{
"channelLiable": {{ ctl.channelLiable | json }},
"priceSet": {
"presentmentMoney": {
"amount": {{ ctl.priceSet.presentmentMoney.amount | json }},
"currencyCode": {{ ctl.priceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ ctl.priceSet.shopMoney.amount | json }},
"currencyCode": {{ ctl.priceSet.shopMoney.currencyCode | json }}
}
},
"rate": {{ ctl.rate | json }},
"ratePercentage": {{ ctl.ratePercentage | json }},
"title": {{ ctl.title | json }}
}
{% endfor %}
],
"currentTotalAdditionalFeesSet": {
"presentmentMoney": {
"amount": {{ order.currentTotalAdditionalFeesSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.currentTotalAdditionalFeesSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.currentTotalAdditionalFeesSet.shopMoney.amount | json }},
"currencyCode": {{ order.currentTotalAdditionalFeesSet.shopMoney.currencyCode | json }}
}
},
"currentTotalDiscountsSet": {
"presentmentMoney": {
"amount": {{ order.currentTotalDiscountsSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.currentTotalDiscountsSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.currentTotalDiscountsSet.shopMoney.amount | json }},
"currencyCode": {{ order.currentTotalDiscountsSet.shopMoney.currencyCode | json }}
}
},
"currentTotalDutiesSet": {
"presentmentMoney": {
"amount": {{ order.currentTotalDutiesSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.currentTotalDutiesSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.currentTotalDutiesSet.shopMoney.amount | json }},
"currencyCode": {{ order.currentTotalDutiesSet.shopMoney.currencyCode | json }}
}
},
"currentTotalPriceSet": {
"presentmentMoney": {
"amount": {{ order.currentTotalPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.currentTotalPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.currentTotalPriceSet.shopMoney.amount | json }},
"currencyCode": {{ order.currentTotalPriceSet.shopMoney.currencyCode | json }}
}
},
"currentTotalTaxSet": {
"presentmentMoney": {
"amount": {{ order.currentTotalTaxSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.currentTotalTaxSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.currentTotalTaxSet.shopMoney.amount | json }},
"currencyCode": {{ order.currentTotalTaxSet.shopMoney.currencyCode | json }}
}
},
"currentTotalWeight": {{ order.currentTotalWeight | json }},
"customAttributes": [
{% for ca in order.customAttributes %}
{% if forloop.first != true %},{% endif %}
{
"key": {{ ca.key | json }},
"value": {{ ca.value | json }}
}
{% endfor %}
],
"customer": {
"defaultAddress": {
"address1": {{ order.customer.defaultAddress.address1 | json }},
"address2": {{ order.customer.defaultAddress.address2 | json }},
"city": {{ order.customer.defaultAddress.city | json }},
"zip": {{ order.customer.defaultAddress.zip | json }},
"provinceCode": {{ order.customer.defaultAddress.provinceCode | json }},
"country": {{ order.customer.defaultAddress.country | json }}
},
"email": {{ order.customer.email | json }},
"id": {{ order.customer.id | json }},
"firstName": {{ order.customer.firstName | json }},
"lastName": {{ order.customer.lastName | json }},
"phone": {{ order.customer.phone | json }}
},
"customerAcceptsMarketing": {{ order.customerAcceptsMarketing | json }},
"customerJourneySummary": {
"visitCount": {{ order.customerJourneySummary.visitCount | json }},
"lastVisit": {{ order.customerJourneySummary.lastVisit | json }}
},
"customerLocale": {{ order.customerLocale | json }},
"discountCode": {{ order.discountCode | json }},
"discountCodes": [
{% for dc in order.discountCodes %}
{% if forloop.first != true %},{% endif %}
{{ dc | json }}
{% endfor %}
],
"displayAddress": {
"address1": {{ order.displayAddress.address1 | json }},
"address2": {{ order.displayAddress.address2 | json }},
"city": {{ order.displayAddress.city | json }},
"zip": {{ order.displayAddress.zip | json }},
"provinceCode": {{ order.displayAddress.provinceCode | json }},
"country": {{ order.displayAddress.country | json }}
},
"displayFinancialStatus": {{ order.displayFinancialStatus | json }},
"displayFulfillmentStatus": {{ order.displayFulfillmentStatus | json }},
"disputes": [
{% for dispute in order.disputes %}
{% if forloop.first != true %},{% endif %}
{
"id": {{ dispute.id | json }}
}
{% endfor %}
],
"edited": {{ order.edited | json }},
"email": {{ order.email | json }},
"estimatedTaxes": {{ order.estimatedTaxes | json }},
"fulfillable": {{ order.fulfillable | json }},
"fulfillments": [
{% for fulfillment in order.fulfillments %}
{% if forloop.first != true %},{% endif %}
{
"createdAt": {{ fulfillment.createdAt | json }},
"id": {{ fulfillment.id | json }},
"lineItems": [
{% for fli in fulfillment.lineItems %}
{% if forloop.first != true %},{% endif %}
{
"lineItemId": {{ fli.lineItemId | json }},
"quantity": {{ fli.quantity | json }}
}
{% endfor %}
],
"order": {
"id": {{ fulfillment.order.id | json }}
},
"status": {{ fulfillment.status | json }},
"updatedAt": {{ fulfillment.updatedAt | json }}
}
{% endfor %}
],
"fullyPaid": {{ order.fullyPaid | json }},
"hasTimelineComment": {{ order.hasTimelineComment | json }},
"id": {{ order.id | json }},
"legacyResourceId": {{ order.legacyResourceId | json }},
"merchantEditable": {{ order.merchantEditable | json }},
"merchantEditableErrors": {{ order.merchantEditableErrors | json }},
"merchantOfRecordApp": {{ order.merchantOfRecordApp | json }},
"metafield": {{ order.metafield | json }},
"name": {{ order.name | json }},
"netPaymentSet": {{ order.netPaymentSet | json }},
"note": {{ order.note | json }},
"originalTotalAdditionalFeesSet": {{ order.originalTotalAdditionalFeesSet | json }},
"originalTotalDutiesSet": {{ order.originalTotalDutiesSet | json }},
"originalTotalPriceSet": {{ order.originalTotalPriceSet | json }},
"paymentCollectionDetails": {{ order.paymentCollectionDetails | json }},
"paymentGatewayNames": {{ order.paymentGatewayNames | json }},
"paymentTerms": {{ order.paymentTerms | json }},
"phone": {{ order.phone | json }},
"physicalLocation": {{ order.physicalLocation | json }},
"poNumber": {{ order.poNumber | json }},
"presentmentCurrencyCode": {{ order.presentmentCurrencyCode | json }},
"processedAt": {{ order.processedAt | json }},
"publication": {{ order.publication | json }},
"purchasingEntity": {{ order.purchasingEntity | json }},
"refundDiscrepancySet": {{ order.refundDiscrepancySet | json }},
"refundable": {{ order.refundable | json }},
"refunds": [
{% for rf in order.refunds %}
{% if forloop.first != true %},{% endif %}
{
"id": {{ rf.id | json }},
"refundLineItems": [
{% for rli in rf.refundLineItems %}
{% if forloop.first != true %},{% endif %}
{
"quantity": {{ rli.quantity | json }},
"lineItem": {
"product": {
"title": {{ rli.lineItem.product.title | json }}
}
},
"subtotalSet": {
"presentmentMoney": {
"amount": {{ rli.subtotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ rli.subtotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ rli.subtotalSet.shopMoney.amount | json }},
"currencyCode": {{ rli.subtotalSet.shopMoney.currencyCode | json }}
}
},
"subtotalUnitPriceSet": {
"presentmentMoney": {
"amount": {{ rli.subtotalUnitPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ rli.subtotalUnitPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ rli.subtotalUnitPriceSet.shopMoney.amount | json }},
"currencyCode": {{ rli.subtotalUnitPriceSet.shopMoney.currencyCode | json }}
}
},
"totalSet": {
"presentmentMoney": {
"amount": {{ rli.totalSet.presentmentMoney.amount | json }},
"currencyCode": {{ rli.totalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ rli.totalSet.shopMoney.amount | json }},
"currencyCode": {{ rli.totalSet.shopMoney.currencyCode | json }}
}
},
"totalTaxSet": {
"presentmentMoney": {
"amount": {{ rli.totalTaxSet.presentmentMoney.amount | json }},
"currencyCode": {{ rli.totalTaxSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ rli.totalTaxSet.shopMoney.amount | json }},
"currencyCode": {{ rli.totalTaxSet.shopMoney.currencyCode | json }}
}
},
"unitPriceSet": {
"presentmentMoney": {
"amount": {{ rli.unitPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ rli.unitPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ rli.unitPriceSet.shopMoney.amount | json }},
"currencyCode": {{ rli.unitPriceSet.shopMoney.currencyCode | json }}
}
}
}
{% endfor %}
],
"transactions": [
{% for rt in rf.transactions %}
{% if forloop.first != true %},{% endif %}
{
"amountSet": {
"presentmentMoney": {
"amount": {{ rt.amountSet.presentmentMoney.amount | json }},
"currencyCode": {{ rt.amountSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ rt.amountSet.shopMoney.amount | json }},
"currencyCode": {{ rt.amountSet.shopMoney.currencyCode | json }}
}
},
"status": {{ rt.status | json }},
"transactionData": {
"currency": {{ rt.transactionData.currency | json }},
"formatted": {{ rt.transactionData.formatted | json }},
"gateway": {{ rt.transactionData.gateway | json }},
"paymentMethod": {{ rt.transactionData.paymentMethod | json }},
"sourceName": {{ rt.transactionData.sourceName | json }},
"text": {{ rt.transactionData.text | json }}
},
"type": {{ rt.type | json }}
}
{% endfor %}
],
"transactionsSet": {
"presentmentMoney": {
"amount": {{ rf.transactionsSet.presentmentMoney.amount | json }},
"currencyCode": {{ rf.transactionsSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ rf.transactionsSet.shopMoney.amount | json }},
"currencyCode": {{ rf.transactionsSet.shopMoney.currencyCode | json }}
}
}
}
{% endfor %}
],
"registeredSourceUrl": {{ order.registeredSourceUrl | json }},
"requiresShipping": {{ order.requiresShipping | json }},
"restockable": {{ order.restockable | json }},
"returnStatus": {{ order.returnStatus | json }},
"riskLevel": {{ order.riskLevel | json }},
"risks": {{ order.risks | json }},
"shippingAddress": {
"address1": {{ order.shippingAddress.address1 | json }},
"address2": {{ order.shippingAddress.address2 | json }},
"city": {{ order.shippingAddress.city | json }},
"zip": {{ order.shippingAddress.zip | json }},
"provinceCode": {{ order.shippingAddress.provinceCode | json }},
"country": {{ order.shippingAddress.country | json }}
},
"shippingLine": {
"code": {{ order.shippingLine.code | json }},
"discountedPriceSet": {
"presentmentMoney": {
"amount": {{ order.shippingLine.discountedPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.shippingLine.discountedPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.shippingLine.discountedPriceSet.shopMoney.amount | json }},
"currencyCode": {{ order.shippingLine.discountedPriceSet.shopMoney.currencyCode | json }}
}
},
"discounts": [
{% for sdl in order.shippingLine.discounts %}
{% if forloop.first != true %},{% endif %}
{
"appliesDiscounts": {{ sdl.appliesDiscounts | json }},
"buyingGroup": {
"name": {{ sdl.buyingGroup.name | json }},
"id": {{ sdl.buyingGroup.id | json }}
},
"discountAllocations": [
{% for sdald in sdl.discountAllocations %}
{% if forloop.first != true %},{% endif %}
{
"allocatedAmountSet": {
"presentmentMoney": {
"amount": {{ sdald.allocatedAmountSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdald.allocatedAmountSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdald.allocatedAmountSet.shopMoney.amount | json }},
"currencyCode": {{ sdald.allocatedAmountSet.shopMoney.currencyCode | json }}
}
}
}
{% endfor %}
],
"discountedTotalSet": {
"presentmentMoney": {
"amount": {{ sdl.discountedTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdl.discountedTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdl.discountedTotalSet.shopMoney.amount | json }},
"currencyCode": {{ sdl.discountedTotalSet.shopMoney.currencyCode | json }}
}
},
"discountedUnitPriceSet": {
"presentmentMoney": {
"amount": {{ sdl.discountedUnitPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdl.discountedUnitPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdl.discountedUnitPriceSet.shopMoney.amount | json }},
"currencyCode": {{ sdl.discountedUnitPriceSet.shopMoney.currencyCode | json }}
}
},
"fulfillableQuantity": {{ sdl.fulfillableQuantity | json }},
"id": {{ sdl.id | json }},
"lineItemId": {{ sdl.lineItemId | json }},
"nonFulfillableQuantity": {{ sdl.nonFulfillableQuantity | json }},
"originalTotalSet": {
"presentmentMoney": {
"amount": {{ sdl.originalTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdl.originalTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdl.originalTotalSet.shopMoney.amount | json }},
"currencyCode": {{ sdl.originalTotalSet.shopMoney.currencyCode | json }}
}
},
"originalUnitPriceSet": {
"presentmentMoney": {
"amount": {{ sdl.originalUnitPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdl.originalUnitPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdl.originalUnitPriceSet.shopMoney.amount | json }},
"currencyCode": {{ sdl.originalUnitPriceSet.shopMoney.currencyCode | json }}
}
},
"product": {
"title": {{ sdl.product.title | json }}
},
"quantity": {{ sdl.quantity | json }},
"refundableQuantity": {{ sdl.refundableQuantity | json }},
"requiresShipping": {{ sdl.requiresShipping | json }},
"sku": {{ sdl.sku | json }},
"taxLines": [
{% for sdltl in sdl.taxLines %}
{% if forloop.first != true %},{% endif %}
{
"priceSet": {
"presentmentMoney": {
"amount": {{ sdltl.priceSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdltl.priceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdltl.priceSet.shopMoney.amount | json }},
"currencyCode": {{ sdltl.priceSet.shopMoney.currencyCode | json }}
}
},
"rate": {{ sdltl.rate | json }},
"ratePercentage": {{ sdltl.ratePercentage | json }},
"title": {{ sdltl.title | json }}
}
{% endfor %}
],
"title": {{ sdl.title | json }},
"totalDiscountSet": {
"presentmentMoney": {
"amount": {{ sdl.totalDiscountSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdl.totalDiscountSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdl.totalDiscountSet.shopMoney.amount | json }},
"currencyCode": {{ sdl.totalDiscountSet.shopMoney.currencyCode | json }}
}
},
"unfulfilledDiscountedTotalSet": {
"presentmentMoney": {
"amount": {{ sdl.unfulfilledDiscountedTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdl.unfulfilledDiscountedTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdl.unfulfilledDiscountedTotalSet.shopMoney.amount | json }},
"currencyCode": {{ sdl.unfulfilledDiscountedTotalSet.shopMoney.currencyCode | json }}
}
},
"unfulfilledOriginalTotalSet": {
"presentmentMoney": {
"amount": {{ sdl.unfulfilledOriginalTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ sdl.unfulfilledOriginalTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ sdl.unfulfilledOriginalTotalSet.shopMoney.amount | json }},
"currencyCode": {{ sdl.unfulfilledOriginalTotalSet.shopMoney.currencyCode | json }}
}
},
"unfulfilledQuantity": {{ sdl.unfulfilledQuantity | json }},
"variant": {
"title": {{ sdl.variant.title | json }}
},
"variantTitle": {{ sdl.variantTitle | json }}
}
{% endfor %}
],
"fulfillableQuantity": {{ order.shippingLine.fulfillableQuantity | json }},
"id": {{ order.shippingLine.id | json }},
"originalTotalSet": {
"presentmentMoney": {
"amount": {{ order.shippingLine.originalTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.shippingLine.originalTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.shippingLine.originalTotalSet.shopMoney.amount | json }},
"currencyCode": {{ order.shippingLine.originalTotalSet.shopMoney.currencyCode | json }}
}
},
"priceSet": {
"presentmentMoney": {
"amount": {{ order.shippingLine.priceSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.shippingLine.priceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.shippingLine.priceSet.shopMoney.amount | json }},
"currencyCode": {{ order.shippingLine.priceSet.shopMoney.currencyCode | json }}
}
},
"title": {{ order.shippingLine.title | json }}
},
"sourceIdentifier": {{ order.sourceIdentifier | json }},
"subtotalLineItemsQuantity": {{ order.subtotalLineItemsQuantity | json }},
"subtotalPriceSet": {
"presentmentMoney": {
"amount": {{ order.subtotalPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.subtotalPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.subtotalPriceSet.shopMoney.amount | json }},
"currencyCode": {{ order.subtotalPriceSet.shopMoney.currencyCode | json }}
}
},
"suggestedRefund": {{ order.suggestedRefund | json }},
"tags": {{ order.tags | json }},
"taxExempt": {{ order.taxExempt | json }},
"taxLines": [
{% for tl in order.taxLines %}
{% if forloop.first != true %},{% endif %}
{
"priceSet": {
"presentmentMoney": {
"amount": {{ tl.priceSet.presentmentMoney.amount | json }},
"currencyCode": {{ tl.priceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ tl.priceSet.shopMoney.amount | json }},
"currencyCode": {{ tl.priceSet.shopMoney.currencyCode | json }}
}
},
"rate": {{ tl.rate | json }},
"ratePercentage": {{ tl.ratePercentage | json }},
"title": {{ tl.title | json }}
}
{% endfor %}
],
"taxesIncluded": {{ order.taxesIncluded | json }},
"test": {{ order.test | json }},
"totalCapturableSet": {{ order.totalCapturableSet | json }},
"totalDiscountsSet": {
"presentmentMoney": {
"amount": {{ order.totalDiscountsSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.totalDiscountsSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.totalDiscountsSet.shopMoney.amount | json }},
"currencyCode": {{ order.totalDiscountsSet.shopMoney.currencyCode | json }}
}
},
"totalOutstandingSet": {
"presentmentMoney": {
"amount": {{ order.totalOutstandingSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.totalOutstandingSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.totalOutstandingSet.shopMoney.amount | json }},
"currencyCode": {{ order.totalOutstandingSet.shopMoney.currencyCode | json }}
}
},
"totalPriceSet": {
"presentmentMoney": {
"amount": {{ order.totalPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.totalPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.totalPriceSet.shopMoney.amount | json }},
"currencyCode": {{ order.totalPriceSet.shopMoney.currencyCode | json }}
}
},
"totalReceivedSet": {
"presentmentMoney": {
"amount": {{ order.totalReceivedSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.totalReceivedSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.totalReceivedSet.shopMoney.amount | json }},
"currencyCode": {{ order.totalReceivedSet.shopMoney.currencyCode | json }}
}
},
"totalRefundedSet": {
"presentmentMoney": {
"amount": {{ order.totalRefundedSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.totalRefundedSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.totalRefundedSet.shopMoney.amount | json }},
"currencyCode": {{ order.totalRefundedSet.shopMoney.currencyCode | json }}
}
},
"totalShippingPriceSet": {
"presentmentMoney": {
"amount": {{ order.totalShippingPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.totalShippingPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.totalShippingPriceSet.shopMoney.amount | json }},
"currencyCode": {{ order.totalShippingPriceSet.shopMoney.currencyCode | json }}
}
},
"totalTaxSet": {
"presentmentMoney": {
"amount": {{ order.totalTaxSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.totalTaxSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.totalTaxSet.shopMoney.amount | json }},
"currencyCode": {{ order.totalTaxSet.shopMoney.currencyCode | json }}
}
},
"totalTipReceivedSet": {
"presentmentMoney": {
"amount": {{ order.totalTipReceivedSet.presentmentMoney.amount | json }},
"currencyCode": {{ order.totalTipReceivedSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ order.totalTipReceivedSet.shopMoney.amount | json }},
"currencyCode": {{ order.totalTipReceivedSet.shopMoney.currencyCode | json }}
}
},
"totalWeight": {{ order.totalWeight | json }},
"transactions": {
"currency": {{ order.transactions.currency | json }},
"formatted": {{ order.transactions.formatted | json }},
"gateway": {{ order.transactions.gateway | json }},
"paymentMethod": {{ order.transactions.paymentMethod | json }},
"sourceName": {{ order.transactions.sourceName | json }},
"text": {{ order.transactions.text | json }}
},
"unpaid": {{ order.unpaid | json }},
"updatedAt": {{ order.updatedAt | json }},
"agreements": {{ order.agreements | json }},
"events": {{ order.events | json }},
"fulfillmentOrders": [
{% for fo in order.fulfillmentOrders %}
{% if forloop.first != true %},{% endif %}
{
"assignedLocationId": {{ fo.assignedLocationId | json }},
"createdAt": {{ fo.createdAt | json }},
"id": {{ fo.id | json }},
"inventoryBehavior": {{ fo.inventoryBehavior | json }},
"lineItems": [
{% for foli in fo.lineItems %}
{% if forloop.first != true %},{% endif %}
{
"lineItemId": {{ foli.lineItemId | json }},
"quantity": {{ foli.quantity | json }}
}
{% endfor %}
],
"locationId": {{ fo.locationId | json }},
"name": {{ fo.name | json }},
"order": {
"id": {{ fo.order.id | json }}
},
"status": {{ fo.status | json }},
"updatedAt": {{ fo.updatedAt | json }}
}
{% endfor %}
],
"discountApplications": {{ order.discountApplications | json }},
"lineItems": [
{% for li in order.lineItems %}
{% if forloop.first != true %},{% endif %}
{
"contract": {
{% comment %}rest of contract omitted{% endcomment %}
"id": {{ li.contract.id | json }}
},
"customAttributes": [
{% for ca in li.customAttributes %}
{% if forloop.first != true %},{% endif %}
{
"key": {{ ca.key | json }},
"value": {{ ca.value | json }}
}
{% endfor %}
],
"discountAllocations": [
{% for da in li.discountAllocations %}
{% if forloop.first != true %},{% endif %}
"allocatedAmountSet": {
"presentmentMoney": {
"amount": {{ da.allocatedAmountSet.presentmentMoney.amount | json }},
"currencyCode": {{ da.allocatedAmountSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ da.allocatedAmountSet.shopMoney.amount | json }},
"currencyCode": {{ da.allocatedAmountSet.shopMoney.currencyCode | json }}
}
}
{% endfor %}
],
"discountedTotalSet": {
"presentmentMoney": {
"amount": {{ li.discountedTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ li.discountedTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ li.discountedTotalSet.shopMoney.amount | json }},
"currencyCode": {{ li.discountedTotalSet.shopMoney.currencyCode | json }}
}
},
"discountedUnitPriceSet": {
"presentmentMoney": {
"amount": {{ li.discountedUnitPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ li.discountedUnitPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ li.discountedUnitPriceSet.shopMoney.amount | json }},
"currencyCode": {{ li.discountedUnitPriceSet.shopMoney.currencyCode | json }}
}
},
"duties": [
{% for duty in li.duties %}
{% if forloop.first != true %},{% endif %}
{
{% comment %}rest of duties omitted{% endcomment %}
"id": {{ duty.id | json }}
}
{% endfor %}
],
"fulfillableQuantity": {{ li.fulfillableQuantity | json }},
"fulfillmentService": {
"callbackUrl": {{ li.fulfillmentService.callbackUrl | json }},
"fulfillmentOrdersOptIn": {{ li.fulfillmentService.fulfillmentOrdersOptIn | json }},
"handle": {{ li.fulfillmentService.handle | json }},
"id": {{ li.fulfillmentService.id | json }},
"inventoryManagement": {{ li.fulfillmentService.inventoryManagement | json }},
{% comment %}fulfillmentService.inventoryManagement - omitted{% endcomment %}
"productBased": {{ li.fulfillmentService.productBased | json }},
"serviceName": {{ li.fulfillmentService.serviceName | json }},
"shippingMethods": [
{% for sm in li.fulfillmentService.shippingMethods %}
{% if forloop.first != true %},{% endif %}
{
"code": {{ sm.code | json }},
"label": {{ sm.label | json }}
}
{% endfor %}
],
"type": {{ li.fulfillmentService.type | json }}
},
"fulfillmentStatus": {{ li.fulfillmentStatus | json }},
"id": {{ li.id | json }},
"image": {
"altText": {{ li.image.altText | json }},
"height": {{ li.image.height | json }},
"id": {{ li.image.id | json }},
{% comment %}li.image.metafield omitted{% endcomment %}
{% comment %}li.image.privateMetafield omitted{% endcomment %}
"width": {{ li.image.width | json }}
},
"merchantEditable": {{ li.merchantEditable | json }},
"name": {{ li.name | json }},
"nonFulfillableQuantity": {{ li.nonFulfillableQuantity | json }},
"originalTotalSet": {
"presentmentMoney": {
"amount": {{ li.originalTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ li.originalTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ li.originalTotalSet.shopMoney.amount | json }},
"currencyCode": {{ li.originalTotalSet.shopMoney.currencyCode | json }}
}
},
"originalUnitPriceSet": {
"presentmentMoney": {
"amount": {{ li.originalUnitPriceSet.presentmentMoney.amount | json }},
"currencyCode": {{ li.originalUnitPriceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ li.originalUnitPriceSet.shopMoney.amount | json }},
"currencyCode": {{ li.originalUnitPriceSet.shopMoney.currencyCode | json }}
}
},
"product": {
{% comment %}rest of Product omitted{% endcomment %}
"title": {{ li.product.title | json }}
},
"quantity": {{ li.quantity | json }},
"refundableQuantity": {{ li.refundableQuantity | json }},
"requiresShipping": {{ li.requiresShipping | json }},
"restockable": {{ li.restockable | json }},
"sellingPlan": {
"name": {{ li.sellingPlan.name | json }}
},
"sku": {{ li.sku | json }},
"taxLines": [
{% for tl in li.taxLines %}
{% if forloop.first != true %},{% endif %}
{
"priceSet": {
"presentmentMoney": {
"amount": {{ tl.priceSet.presentmentMoney.amount | json }},
"currencyCode": {{ tl.priceSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ tl.priceSet.shopMoney.amount | json }},
"currencyCode": {{ tl.priceSet.shopMoney.currencyCode | json }}
}
},
"rate": {{ tl.rate | json }},
"ratePercentage": {{ tl.ratePercentage | json }},
"title": {{ tl.title | json }}
}
{% endfor %}
],
"taxable": {{ li.taxable | json }},
"title": {{ li.title | json }},
"totalDiscountSet": {
"presentmentMoney": {
"amount": {{ li.totalDiscountSet.presentmentMoney.amount | json }},
"currencyCode": {{ li.totalDiscountSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ li.totalDiscountSet.shopMoney.amount | json }},
"currencyCode": {{ li.totalDiscountSet.shopMoney.currencyCode | json }}
}
},
"unfulfilledDiscountedTotalSet": {
"presentmentMoney": {
"amount": {{ li.unfulfilledDiscountedTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ li.unfulfilledDiscountedTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ li.unfulfilledDiscountedTotalSet.shopMoney.amount | json }},
"currencyCode": {{ li.unfulfilledDiscountedTotalSet.shopMoney.currencyCode | json }}
}
},
"unfulfilledOriginalTotalSet": {
"presentmentMoney": {
"amount": {{ li.unfulfilledOriginalTotalSet.presentmentMoney.amount | json }},
"currencyCode": {{ li.unfulfilledOriginalTotalSet.presentmentMoney.currencyCode | json }}
},
"shopMoney": {
"amount": {{ li.unfulfilledOriginalTotalSet.shopMoney.amount | json }},
"currencyCode": {{ li.unfulfilledOriginalTotalSet.shopMoney.currencyCode | json }}
}
},
"unfulfilledQuantity": {{ li.unfulfilledQuantity | json }},
"variant": {
{% comment %}rest of variant omitted {% endcomment %}
"title": {{ li.variant.title | json }}
},
"variantTitle": {{ li.variantTitle | json }},
"vendor": {{ li.vendor | json }}
}
{% endfor %}
],
"localizationExtensions": {{ order.localizationExtensions | json }},
"metafieldDefinitions": {{ order.metafieldDefinitions | json }},
"metafields": {{ order.metafields | json }},
"nonFulfillableLineItems": {{ order.nonFulfillableLineItems | json }},
"returns": {{ order.returns | json }},
"shippingLines": {{ order.shippingLines | json }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment