Adjust the job definition

The job definition describes the properties of one or more products in an order. It's an XML file. Don't confuse it with a job ticket:
that's the XML file in the queue that only tells you that there is an order waiting and where to find the associated assets.

So:

  1. Job ticket - the small XML file that tells you there is a job waiting and where you can find the associated files.
  2. Job definition - a somewhat larger XML file that describes the print job in detail, including product specifications and associated product files.
  3. Product files - the print-ready files that describe the contents of a product, for example the cover and contents of a photo book.

We noticed that print facilities like to have their own XML in the job definition. Using variables, you can build your own preferred XML tree. So, this job definition manual lists the variables that can be put in the job definition XML structure, in order to create a specific description for each print facility. Later, we may have values or value sets that are specific for a print facility, too. But not now.

You can put the variables in your own XML job definition structure, like this:

<name>
	<firstname>${shipping.recipientfirstName!}</firstname>
	<lastname>${shipping.recipientlastName!}</lastname>
	<initial>${shipping.recipientInitials!}</initial> 
</name>
<address> 
	<addressline1>
		<![CDATA[${shipping.recipientaddressLine1!}]]>
	</addressline1>
	<addressline2>
		<![CDATA[${shipping.recipientaddressLine2!}]]>
	</addressline2>
	<postalcode>
		${shipping.recipientaddressPostalCode!}
	</postalcode>
	<city>${shipping.recipientaddressCity!}</city> 
	<state>${shipping.recipientaddressState!}</state>
	<country>${shipping.recipientaddressCountry!}</country> 
	<countrycode>
		${shipping.recipientaddressCountryCode!}
	</countrycode>
</address>

You may notice the CDATA blocks around company names, email addresses and URLs - don't forget to use this if you build your own tree, or you might end up with crashing parsers.

Give us the complete XML and we will make sure you only receive your own XML. Once we have created pretty admin interfaces, you will be able to do it yourself. If you do not wish to receive your own XML, we will use the default job definition XML. You can use it as an example, too.

By the way - in the list below, starred elements are mandatory. The default values refer to the data that will be returned if we don't have any specific data for an order.

Facility

The print facility is the place where products are manufactured and sent from.

  • ${printFacility.reference!} - string, a reference that describes the print facility - defined by Peecho.
  • ${printFacility.providerReference!} - string, a print facility reference that describes the print facility customer - that's us, so default value is "Peecho".

Provider

In general, the provider, that's us. So all data below has a default value referring to Peecho. However, we don't want to add this to the XML directly, because then we will have to change all job ticket XML if we change address, for example.

  • ${provider.companyReference!}* - string, default: Peecho.
  • ${provider.companyName!}* - string, default: Peecho BV.
  • ${provider.companyChamberOfCommerceNumber!} - string, default: 34366663.
  • ${provider.firstName!}* - string, default: Martijn.
  • ${provider.lastName!}* - string, default: Groot.
  • ${provider.initials!} - string, default: [empty].
  • ${provider.gender!} - string, default: M.
  • ${provider.email!}* - string, default: info@peecho.com.
  • ${provider.phone!}* - string, default: +31640004007.
  • ${provider.url!} - string, default: http://www.peecho.com.
  • ${provider.addressLine1!}* - string, default: Rokin 75.
  • ${provider.addressLine2!}* - string, default: [empty].
  • ${provider.addressPostalCode!}* - default: 1012 KL.
  • ${provider.addressArea!} - string, default: [empty].
  • ${provider.addressCity!}* - string, default: Amsterdam.
  • ${provider.addressState!} - string, default: Noord Holland.
  • ${provider.addressCountry!}* - string, default: The Netherlands.
  • ${provider.language!} - string, default: EN.
  • ${provider.addressCountryCode!} - string, default: NL.

Merchant

The merchant, that's the merchant - the owner of the consumer app that created the order. Anything that we don't have defaults to [empty].

  • ${merchant.companyName!} - string.
  • ${merchant.companyReference!} - string.
  • ${merchant.companyChamberOfCommerceNumber!} - string.
  • ${merchant.firstName!} - string.
  • ${merchant.lastName!} - string.
  • ${merchant.initials!} - string.
  • ${merchant.gender!} - string.
  • ${merchant.email!} - string.
  • ${merchant.phone!} - string.
  • ${merchant.url!} - string.
  • ${merchant.addressLine1!} - string.
  • ${merchant.addressLine2!} - string.
  • ${merchant.addressPostalCode!} - string.
  • ${merchant.addressArea!} - string.
  • ${merchant.addressCity!} - string.
  • ${merchant.addressState!} - string.
  • ${merchant.addressCountry!} - string.
  • ${merchant.addressCountryCode!} - string, default: [empty].
  • ${merchant.language!} - string.

Order

This is the order. The order might have multiple products and multiple delivery addresses in the future.

  • ${order.reference!} - string, our order reference.
  • ${order.lineNumber!} - string, order lines just add up. They are only unique in combination with a unique order reference. Default: 1.
  • ${order.date!} - datetime, the date. Duh.
  • ${shipment.number!} - integer, shipment numbers just add up. They are only unique in combination with a unique order reference. Default: 1.
  • ${shipment.lineNumber!} - integer, shipment lines just add up. They are only unique in combination with a unique order reference. Default: 1.

Product

This is not the order, but the product. The difference between a product and an order is that the product is a thing and an order is a sales agreement. We will start off with our own definitions for values, but facilities should be able to define their own value sets in the future, too.

  • ${product.reference!}* - string, our product reference.
  • ${product.typeReference!} - string, our product type reference (is it a book? is it a card?).
  • ${product.customerTitle!} - string, a nice name. May be *empty*.
  • ${product.color!} - string, default: [empty].
  • ${product.dimensionUnit!} - string, default: cm.
  • ${product.dimensionHeight!} - real number, default: [empty].
  • ${product.dimensionWidth!} - real number, default: [empty].
  • ${product.dimensionSize!} - string, default: [empty].
  • ${product.quantity!}* - integer, default: 1.
  • ${product.contentNumberOfFiles!}* - integer, how many PDFs make a single product? Sometimes, a book has a separate cover. Default: 1..
  • ${product.contentFiles!}* - list, this returns a list of content files associates with this product (example usage: <#list product.contentFiles as contentFile>).
  • ${contentFile.name!}* - string, default: [empty].
  • ${contentFile.paperType!}* - string, default: [empty].
  • ${contentFile.reference!} - string, default: [empty].
  • ${contentFile.filetype!}* - string, default: PDF.
  • ${contentFile.usage!} (innerpages, cover, etc.) - string, default: full-product.
  • ${contentFile.downloadLocation!}* - string, the download location of the file.

Shipping

The shipping says something about how the product(s) will be shipped.

  • ${shipping.carrierReference!} - string, default: [empty].
  • ${shipping.carrierName!} - string, default: [empty].
  • ${shipping.carrierTracking!} - string, default: no.
  • ${shipping.preferredArrivalDate!} - datetime, default: [empty].
  • ${shipping.optionalRemark!} - string, default: [empty].

Sender

The sender is the consumer who created the product - or at least ordered it. It's user data that we might not have, so everything defaults to [empty].

  • ${shipping.senderCompanyName!} - string.
  • ${shipping.senderCompanyChamberOfCommerceNumber!} - string.
  • ${shipping.senderFirstName!} - string.
  • ${shipping.senderLastName!} - string.
  • ${shipping.senderInitials!} - string.
  • ${shipping.senderGender!} - string.
  • ${shipping.senderEmail!} - string.
  • ${shipping.senderPhone!} - string.
  • ${shipping.senderUrl!} - string.
  • ${shipping.senderAddressLine1!} - string.
  • ${shipping.senderAddressLine2!} - string.
  • ${shipping.senderAddressPostalCode!} - string.
  • ${shipping.senderAddressArea!} - string.
  • ${shipping.senderAddressCity!} - string.
  • ${shipping.senderAddressState!} - string.
  • ${shipping.senderAddressCountry!} - string.
  • ${shipping.senderAddressCountryCode!} - string, default: [empty].
  • ${shipping.senderLanguage!} - string.

Recipient

The recipient is the consumer who will get the product delivered. This user data we should have, because otherwise we can't deliver.

  • ${shipping.recipientCompanyName!} - string, default: [empty].
  • ${shipping.recipientCompanyChamberOfCommerceNumber!} - string, default: [empty].
  • ${shipping.recipientFirstName!} - string, default: [empty].
  • ${shipping.recipientLastName!}* - string.
  • ${shipping.recipientInitials!} - string, default: [empty].
  • ${shipping.recipientGender!} - string, default: [empty].
  • ${shipping.recipientEmail!} - string, default: [empty].
  • ${shipping.recipientPhone!} - string, default: [empty].
  • ${shipping.recipientUrl!} - string, default: [empty].
  • ${shipping.recipientAddressLine1!}* - string.
  • ${shipping.recipientAddressLine2!}* - string.
  • ${shipping.recipientAddressPostalCode!}* - string.
  • ${shipping.recipientAddressArea!} - string, default: [empty].
  • ${shipping.recipientAddressCity!}* - string.
  • ${shipping.recipientAddressState!} - string, default: [empty].
  • ${shipping.recipientAddressCountry!}* - string.
  • ${shipping.recipientAddressCountryCode!} - string, default: [empty].
  • ${shipping.recipientLanguage!} - string, default: EN.