What It Is:
This article explains how to sync product images from NetSuite to WooCommerce using Celigo Integrator. Since WooCommerce doesn’t accept NetSuite-hosted image URLs directly, this method uses Celigo’s file lookup and blobkey extraction to upload images via WooCommerce’s HTTP Import API using multipart/form-data.
Need to Use:
To ensure product images stored in NetSuite’s File Cabinet are properly uploaded and displayed in WooCommerce product listings. This approach is essential when WooCommerce requires actual image files rather than external URLs, and when you want to automate the process within Celigo flows.
Key Benefits:
- Native File Handling: Uses Celigo’s built-in blobkey system to handle NetSuite files securely and efficiently.
- WooCommerce Compatibility: Ensures images are uploaded in a format WooCommerce accepts (
multipart/form-data). - Automation-Friendly: Fully automatable within Celigo flows—no manual uploads or scripting required.
- Dynamic Integration: Supports syncing images dynamically based on item data, file associations, or custom logic.
Steps Involved:
1.Export Item Data from NetSuite:
- Begin with a NetSuite export flow that retrieves item records.
- Ensure each item includes a reference to its associated image file (e.g., internal ID or name).
2.Lookup Image File in NetSuite File Cabinet:
- Add a Lookup step to search for the image file using the reference from the item record.
- In the Results Mapping, map the blobkey to the input data.
- Set the Destination Field as
"blobKey"(case-sensitive). - This ensures the blobkey is available for the next import step.
3.Configure WooCommerce HTTP Connection:
- Set up a WooCommerce HTTP connection in Celigo.
- In the connection settings:
- Set Content-Type to
multipart/form-data. - Add Authorization header with your WooCommerce API token.
- Ensure the endpoint is
/wp-json/wp/v2/media.
4.Prepare HTTP Import for WooCommerce:
- Add an HTTP Import step using the WooCommerce connection.
- Set the method to
POST. - Add an HTTP Import step using the WooCommerce connection
- Set the method to
POST. - In the Non-API Response Settings tab:
Set Encoding Type to binary.
- In the advanced Settings tab:
Set Blobkey Path to blobKey.
- Within the same HTTP Import step, manually enter the Request Body in the following format:
[
{
“name”: “file”,
“value”: “{{blob}}”,
“type”: “attachment”
}
]
5. After the image is uploaded, WooCommerce returns metadata including the
image URL or ID.
- Use a Response Mapping step to extract this value.
- Optionally, use a NetSuite Update step to store the
- WooCommerce image URL or ID back on the item record for future reference or reporting.
This approach ensures seamless, automated image syncing from NetSuite to WooCommerce—fully compatible, script-free, and integration-ready.