* Add a new text content object to your plan. Set a default value like "123" so you can see where to put it in the document design. Make the new object a campaign dial.
* Add the new object to the design (presumably on a layer or page which is not shown to the customer by using GetEnv("JobType") = "PROOF" in a visibility content object)
* proof and process the document on the uProduce server and get the new job ids
* in uStore, edit your product, and update the job ids
* If you don't already have a SQL datasource defined in presets, go to Presets > Data sources Setup and enter the details of the SQL server used by uStore. Make it available to at least the store where your product is located.
* on the product's customization setting, add the new content object. Set it to "not visible to customer" so they don't get to edit the value.
* then check the box to "take value from datasource". Check the "custom" query type and paste in this simple query:
SELECT O.EncryptedOrderId AS text, O.EncryptedOrderId as value
FROM Orders AS O INNER JOIN
OrderProduct AS OP ON O.OrderID = OP.OrderID
WHERE OP.OrderProductID = @OrderProductID
* Save, put online and test. (Remember you may need to process the order and download the output to see the encryupted order id depending on where you put the text in the document and if you used the GetEnv() trick.