Skip to content

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 — leave printJobGuid empty and describe the product with addProducts and addPrintings (see DataMode). removeProducts and removePrintings are ignored.
  • Edit — set printJobGuid. The editor loads the saved print job and applies your changes: addProducts/addPrintings add variants and printings (printings that are already in the print job are skipped), removeProducts/removePrintings remove them, title replaces the saved title, the customer fields you set replace the saved ones and customProperties are merged into the saved ones.
  • View — set printJobGuid only. 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 ​

PropertyTypeDescription
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?ArgAddProductThe product and its variants to add.
customer?ArgCustomerCustomer 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?stringLanguage (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?ArgPrintingLogoDefault 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?stringGUID 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?ArgRemoveProductEdit only: product variants to remove from the print job.
title?stringTitle of the print job. In Edit mode it replaces the saved title.

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples