Retrieve Design Job Data
Once the user finalizes the design for their job, you can capture all the data linked to this job via the iframe communicator event Infigo.ItemAddedToBasket. Below is an example of the data structure that will be received:
{
"Id": 3530,
"Job": {
"Id": "d3530",
"Quantity": 1,
"CustomName": null,
"Attributes": [],
"Canvas": "Integration Sample",
"CanvasSize": "Integration Sample",
"NumPages": 1,
"OutputType": "Integration Sample",
"SpineWidth": 0,
"Weight": 0,
"Stock": "Integration Sample White Stock",
"Width": 289.28,
"Height": 127.00,
"IsDynamicSize": false,
"Price": 0
},
"Customer": {
"Id": 90703,
"Email": "3f033a41-6f26-4e52-8dee-8b10df18b8d6@doesnotexist.com",
"Guid": "3f033a41-6f26-4e52-8dee-8b10df18b8d6"
},
"Product": {
"Name": "Integration Sample",
"Sku": null,
"ExternalIds": [],
"ProductGroupName": null,
"Id": 2042
},
"Images": {
"Thumbnails": [
"/iframe/CFE/GetJobFile?strGuid=cd2488c0-9f7d-41df-b4ca-e03ef4de2b2f&strFile=thumboutputpreview_0.png"
],
"Previews": [
"/iframe/CFE/GetJobFile?strGuid=cd2488c0-9f7d-41df-b4ca-e03ef4de2b2f&strFile=outputpreview_0.png"
]
}
}
This data structure also includes thumbnails and previews of the job, which you can use to display the design created by the user.
You will need to store this data in your system and link it to a shopping cart item. When the order placement is finalized, you can pass this Job reference to Infigo to complete the order process.
Last modified: 29 October 2024