{
    "name": "WooCommerce",
    "app_type": "woocommerce",
    "sync_type": "api",
    "is_active": true,
    "debug_mode": false,
    "authorization": {
        "auth_type": "basic",
        "auth_settings": {
            "client_id": "<customer_key>",
            "client_secret": "<customer_secret>",
            "authorization_header_name": "Authorization"
        }
    },
    "connections": [
        {
            "name": "Products",
            "type": "api",
            "is_active": true,
            "is_primary": true,
            "resource_type": "product",
            "priority": 1,
            "configuration": {
                "auth_enabled": true,
                "method": "GET",
                "endpoint": "https://<domain>/wp-json/wc/v1/products",
                "headers": {
                    "Content-Type": "application/json",
                    "Accept": "application/json"
                },
                "body": {},
                "prerequisites": {
                    "product_response": "",
                    "variable_response": {
                        "variable_path": "variations"
                    },
                    "main_product_unique_identifier": "id",
                    "variable_product_unique_identifier": "id"
                }
            }
        },
        {
            "name": "Categories",
            "type": "api",
            "is_active": false,
            "is_primary": false,
            "resource_type": "product",
            "priority": 2,
            "configuration": {
                "method": "GET",
                "endpoint": "https://<domain>/wp-json/wc/v1/products/categories?per_page=50&include={{categoryID}}",
                "auth_enabled": true,
                "headers": [],
                "body": {
                    "type": "none",
                    "data": null
                },
                "prerequisites": {
                    "product_response": "",
                    "variable_response": null,
                    "main_product_unique_identifier": "",
                    "variable_product_unique_identifier": ""
                },
                "advanced_configuration": {
                    "time_delay": ""
                }
            }
        },
        {
            "name": "Order",
            "type": "api",
            "is_active": false,
            "is_primary": false,
            "resource_type": "order",
            "priority": 3,
            "configuration": {
                "method": "POST",
                "endpoint": "https://<domain>/wp-json/wc/v3/orders",
                "auth_enabled": true,
                "headers": {
                    "Content-Type": "application/json"
                },
                "body": {
                    "type": "json",
                    "data": {
                        "payment_method": "bacs",
                        "payment_method_title": "Direct Bank Transfer",
                        "set_paid": true,
                        "billing": {
                            "first_name": "John",
                            "last_name": "Doe",
                            "address_1": "969 Market",
                            "address_2": "",
                            "city": "San Francisco",
                            "state": "CA",
                            "postcode": "94103",
                            "country": "US",
                            "email": "john.doe@example.com",
                            "phone": "555-555-5555"
                        },
                        "shipping": {
                            "first_name": "John",
                            "last_name": "Doe",
                            "address_1": "969 Market",
                            "address_2": "",
                            "city": "San Francisco",
                            "state": "CA",
                            "postcode": "94103",
                            "country": "US"
                        },
                        "line_items": [
                            {
                                "product_id": 123,
                                "quantity": 2
                            }
                        ],
                        "shipping_lines": [
                            {
                                "method_id": "flat_rate",
                                "method_title": "Flat Rate",
                                "total": "10.00"
                            }
                        ]
                    }
                },
                "prerequisites": {
                    "product_response": "",
                    "prerequisite_type": "no-variations",
                    "prerequisite_variation_type": "group-variations",
                    "variable_response": null,
                    "main_product_unique_identifier": "",
                    "variable_product_unique_identifier": ""
                },
                "advanced_configuration": {
                    "time_delay": ""
                }
            }
        }
    ],
    "attribute_mapping": [
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "sku",
            "supplier_attribute": "sku",
            "advanced_configuration": null
        },
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "name",
            "supplier_attribute": "name",
            "advanced_configuration": null
        },
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "description",
            "supplier_attribute": "description",
            "advanced_configuration": null
        },
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "regular_price",
            "supplier_attribute": "regular_price",
            "advanced_configuration": null
        },
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "stock_quantity",
            "supplier_attribute": "stock_quantity",
            "advanced_configuration": null
        },
        {
            "connection": "Products",
            "product_type": "parent",
            "type": "core",
            "wc_attribute": "images",
            "supplier_attribute": "images",
            "advanced_configuration": {
                "image_src_attr": "src"
            }
        }
    ],
    "operations": [
        {
            "operation": "product-operations",
            "operation_type": "data-sync",
            "is_active": true,
            "configuration": {
                "available_products": {
                    "add": true,
                    "update": true,
                    "update_product_status": false,
                    "product_status": "publish"
                },
                "unavailable_products": {
                    "operation": "none",
                    "products_of": "none"
                }
            },
            "connections": [
                "Products"
            ]
        },
        {
            "operation": "page",
            "operation_type": "performance-optimization",
            "is_active": true,
            "configuration": {
                "type": "regular",
                "location": "query-parameter",
                "page_param": "page",
                "limit_param": "per_page",
                "limit_value": 50
            },
            "connections": [
                "Products"
            ]
        }
    ],
    "order_sync": [
        {
            "name": "Order",
            "connection_id": "Order",
            "is_active": false,
            "configuration": {
                "order_suppliers": [
                    "<supplier_id>"
                ],
                "direct_association": {
                    "payment_method": "####",
                    "payment_method_title": "####"
                },
                "nested_association": [
                    {
                        "billing": "billing",
                        "direct_association": [
                            {
                                "vendorKey": "first_name",
                                "wooKey": "first_name"
                            },
                            {
                                "vendorKey": "last_name",
                                "wooKey": "last_name"
                            },
                            {
                                "vendorKey": "address_1",
                                "wooKey": "address_1"
                            },
                            {
                                "vendorKey": "address_2",
                                "wooKey": "address_2"
                            },
                            {
                                "vendorKey": "city",
                                "wooKey": "city"
                            },
                            {
                                "vendorKey": "state",
                                "wooKey": "state"
                            },
                            {
                                "vendorKey": "postcode",
                                "wooKey": "postcode"
                            },
                            {
                                "vendorKey": "country",
                                "wooKey": "country"
                            },
                            {
                                "vendorKey": "email",
                                "wooKey": "email"
                            },
                            {
                                "vendorKey": "phone",
                                "wooKey": "phone"
                            }
                        ]
                    },
                    {
                        "shipping": "shipping",
                        "direct_association": [
                            {
                                "vendorKey": "first_name",
                                "wooKey": "first_name"
                            },
                            {
                                "vendorKey": "last_name",
                                "wooKey": "last_name"
                            },
                            {
                                "vendorKey": "address_1",
                                "wooKey": "address_1"
                            },
                            {
                                "vendorKey": "address_2",
                                "wooKey": "address_2"
                            },
                            {
                                "vendorKey": "city",
                                "wooKey": "city"
                            },
                            {
                                "vendorKey": "state",
                                "wooKey": "state"
                            },
                            {
                                "vendorKey": "postcode",
                                "wooKey": "postcode"
                            },
                            {
                                "vendorKey": "country",
                                "wooKey": "country"
                            }
                        ]
                    },
                    {
                        "line_items": "line_items",
                        "direct_association": [
                            {
                                "vendorKey": "product_id",
                                "wooKey": "sku"
                            },
                            {
                                "vendorKey": "quantity",
                                "wooKey": "purchase_quantity"
                            }
                        ]
                    },
                    {
                        "shipping_lines": "shipping_line",
                        "direct_association": [
                            {
                                "vendorKey": "method_id",
                                "wooKey": "method_id"
                            },
                            {
                                "vendorKey": "method_title",
                                "wooKey": "method_title"
                            },
                            {
                                "vendorKey": "total",
                                "wooKey": "total"
                            }
                        ]
                    }
                ]
            },
            "is_conditional_sync_enabled": false
        }
    ]
}