uStore Order ID in an ADOR?

29 views
Skip to first unread message

KA

unread,
Jul 14, 2025, 2:22:05 PMJul 14
to XMPie Interest Group
Hi,

Is there QLingo to get the current uStore EncryptedOrderID in an ADOR?

Our goal is to have the output file named from an ADOR named "filename" within which QLingo concatenates a campaign dial variable value for that order and the uStore EncryptedOrderID for the current order.

"BusinessCard_" & @{Name} & "_" & GetEnv("????")

For extra credit, we'd love to have the EncryptedOrderID and the OrderProductID.

Then in uProduce we can pick an ADOR for the filename.

It looks like "JobID" is the uProduce JobID, not the uStore JobID.

Thanks,
Kristin

couch

unread,
Jul 15, 2025, 1:47:47 AMJul 15
to XMPie Interest Group
* 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.

eko...@gmail.com

unread,
Jul 15, 2025, 7:17:45 AMJul 15
to XMPie Interest Group
Hi Kristin -

Steve provided the info about EncryptedOrderID. 

Here's the easiest way to pass the OrderID via a hidden Customization Dial. See attached screenshot. 
Screenshot_20250715-041123.png

Wayne

unread,
Jul 15, 2025, 8:23:48 AMJul 15
to XMPie Interest Group
With the new NG Theme Cart Page it makes it easy for a User to check and uncheck an Order Item to be added to an Order.
This will mean Steve's method may not work as expected as the Order ID could change at the cart level
The Get Order Properties => Order Item ID method will work but the OrderEncryptedID needs to be queried in Plan when processed - this is the only reliable way.
I would advise not to use the Get Order Properties => Order ID method as this caused SQL Deadlocks in our environment
XMPie did improve the SQL Query however, if your users add lots of order items to the cart this can add extra load
To be honest this sounds like a perfect fit for the new uProduce Post Operations Composition feature

Regards,'
Wayne
Reply all
Reply to author
Forward
0 new messages