Link print jobs to your application's users, orders, and cart items. The data is saved with the print job and returned in the
printJob events, getPrintJob(), the REST API and webhooks.
Fields of printJob.customer:
customerIdentity, customerPerson, customerCompany, customerEmail -
customer data saved in this print job only (the customer record doesn't change)orderCode - your order or quote numberorderItemCode - your cart line or order line IDorderTitle - human-readable label, e.g. the product name in the cartprintJob.customProperties - your own key/value metadata (string values), see the
Custom Properties example.
Logged-in users: to make the TronDesigner customer itself (with its logo gallery and print jobs) your user, set
data-td-customer-identity on the script tag or call setCustomer({ customerIdentity }) after login -
see Customers and orders.
td.openDesigner({
"openMode": "Create",
"dataMode": "Exact",
"printJob": {
"addPrintings": [
{
"printPositionCode": "front",
"printTechnologyCode": "PAD03"
}
],
"addProducts": {
"supplierCode": "PFC",
"variants": [
{
"productCode": "10086021"
}
]
},
"customer": {
"customerIdentity": currentUserId,
"customerEmail": currentUserId + "@example.com",
"customerPerson": "User " + currentUserId,
"customerCompany": "Company of " + currentUserId,
"orderCode": currentOrderId,
"orderItemCode": currentCartItemId,
"orderTitle": "Example Product in Cart"
},
"customProperties": {
"campaignId": "summer2024",
"source": "product_page",
"sessionStart": "2024-06-01T12:00:00Z",
"userSegment": "premium"
}
}
}, {mode: "dialog"});
// Logged-in user: the customer record itself (logo gallery, print jobs)
await window.tronDesigner.setCustomer({ customerIdentity: 'user-1234', customerEmail: 'jane@acme.example' });
// Order / cart info for one print job - note the argument order: title, code, item code
window.tronDesigner
.setOrderInfo('Oregon 400 ml - red', 'ORD-2026-0815', 'CART-LINE-3')
.setExactProduct('PFC', undefined, (p) => p.addVariant('10086021'))
.addExactPrinting('front', 'PAD03')
.open({ mode: 'dialog' });
<!-- HTML -->
<script async src="https://app.trondesigner.com/js/website-integration.js" ...
data-td-customer-identity="user-1234"></script>
<button data-td-action="OpenCreate" ...
data-td-order-code="ORD-2026-0815"
data-td-order-item-code="CART-LINE-3"
data-td-order-title="Oregon 400 ml - red">Design</button>