Type Alias: ArgPrintJob
ts
type ArgPrintJob = object;The print job to create, edit or view — EditorArguments.printJob.
Remarks
Which fields apply depends on EditorArguments.openMode:
Create— leaveprintJobGuidempty and describe the product withaddProductsandaddPrintings(see DataMode).removeProductsandremovePrintingsare ignored.Edit— setprintJobGuid. The editor loads the saved print job and applies your changes:addProducts/addPrintingsadd variants and printings (printings that are already in the print job are skipped),removeProducts/removePrintingsremove them,titlereplaces the saved title, thecustomerfields you set replace the saved ones andcustomPropertiesare merged into the saved ones.View— setprintJobGuidonly. A non-empty add or remove array makes the editor show an error (empty arrays are fine).OpenGallery,OpenUpload— pass an empty object ({}).
Example
Edit mode: add a variant and a printing, remove another printing
json
{
"openMode": "Edit",
"editorOptions": { "showSelectedVariants": "None", "showSelectedPrintOptions": "None" },
"printJob": {
"printJobGuid": "0b0e0a5c-6d8f-4e4b-9c1a-2f3d4e5f6a7b",
"addProducts": {
"variants": [{ "productCode": "10086055", "quantity": 50 }]
},
"addPrintings": [{ "printPositionCode": "back", "printTechnologyCode": "PAD03" }],
"removePrintings": [{ "printPositionCode": "side", "printTechnologyCode": "PAD03" }],
"customProperties": { "cartItemId": "42" }
}
}Properties
| Property | Type | Description |
|---|---|---|
addPrintings? | AddPrinting[] | The printings (print position + print technology) to add. Exact data mode requires at least one; in Partial and Own data mode the user can select or enter them in the editor. |
addProducts? | ArgAddProduct | The product and its variants to add. |
customer? | ArgCustomer | Customer and order data stored with this print job. Customer fields you leave out are taken from the current Customer. |
customProperties? | Record<string, string> | Your own key–value data stored with the print job, for example the ID of the cart item. Remarks The values must be strings. They are returned with the print job (IPrintJobDto). In Edit mode they are merged into the saved properties. See Customers and orders. |
languageCode? | string | Language (ISO 639-1 code, for example de) in which product and print option names are loaded. Remarks For a new print job it is also stored as the print job language. Defaults to the editor's UI language. |
logo? | ArgPrintingLogo | Default logo for all printings that don't set their own ArgAddPrinting.logo. Remarks Applied to the printings of a new print job (every data mode) and to the printings added in Edit mode. If you leave it out, the script uses the customer's logo (Customer.logoGuid) when there is one. |
printJobGuid? | string | GUID of an existing print job. Required for Edit and View; must be empty for Create. Remarks You get it from the printJob events (DesignerEntityEvent.entityGuid). |
removePrintings? | ArgRemovePrinting[] | Edit only: printings to remove from the print job. Printings that are not in the print job are ignored (a warning is logged). |
removeProducts? | ArgRemoveProduct | Edit only: product variants to remove from the print job. |
title? | string | Title of the print job. In Edit mode it replaces the saved title. |