Order Numbers, Record Numbers and Order IDs

Item Name, Item Quantity, Item SKU - single product

Item Name, Item Quantity, Item SKU - multiple products

Dates and Timestamps


Background
ShipWorks gives you the ability to add small lines of code to your shipping provider default settings, allowing you to print additional information onto your printed shipping labels.  This can be useful if, for example, you need the order number printed on the label, or perhaps you wish to have the item information and quantity printed on the label to pick product from.


Below are some of the more commonly used attributes.  Please see this article for instructions on where to find these fields for each shipping provider and for instructions on how to update them with the below attributes.


Order Numbers, Record Numbers and Order IDs


1. Order Number
For your document to display the order number, copy and paste this value: 
In a reference/tokenized field: {//Order/Number} 
In template code/tokenized field: <xsl:value-of select="//Order/Number" /> 

2. eBay Record Number
In a reference/tokenized field: {//Order/eBay/SellingManager/RecordNumber} 
In template code/tokenized field: <xsl:value-of select="//Order/eBay/SellingManager/RecordNumber" /> 


3. Amazon ASIN

In a reference/tokenized field: {//Order/Item/Amazon/ASIN}
In template code/tokenized field: <xsl:value-of select="//Order/Item/Amazon/ASIN" /> 

4. Amazon Order ID

In a reference/tokenized field: {//Order/Amazon/AmazonOrderID}
In template code/tokenized field: <xsl:value-of select="//Order/Amazon/AmazonOrderID" /> 

Item Name, Item Quantity, Item SKU - single product

These values would only output the first line item (if more than one line item existed). 


5. Item Name 

For your document to display a line item name (or description), copy and paste this value:  

In a reference/tokenized field: {//Order/Item/Name} 
In template code/tokenized field: <xsl:value-of select="//Order/Item/Name" /> 

6. Item Quantity

For your document to display the line item's quantity, copy and paste this value:

In a reference/tokenized field: {//Order/Item/Quantity} 
In template code/tokenized field: <xsl:value-of select="//Order/Item/Quantity" /> 

7. Item SKU

For your document to display the line item's quantity, copy and paste this value:

In a reference/tokenized field: {//Order/Item/SKU}
In template code/tokenized field: <xsl:value-of select="//Order/Item/SKU" /> 

Item Name, Item Quantity, Item SKU - multiple products:


1. Multiple Item Names

This would display multiple line item name/descriptions. If multiple line items exist, they will be separated by commas.
<xsl:for-each select="//Order/Item">{Name}, </xsl:for-each> 

2. Multiple Item Quantities with Item Name
This would display the line item quantity in parentheses, followed by the item name/description. If multiple line items exist, they will be separated by commas. 
<xsl:for-each select="//Order/Item">({Quantity}) - {Name}, </xsl:for-each> 

3. Multiple Item Quantities with Item Codes 

This would output the line item quantity in parenthesis, followed by the item code. If multiple line items exist, they will be separated by commas.

<xsl:for-each select="//Order/Item">({Quantity}) - {Code}, </xsl:for-each> 


4.Multiple Item Quantities with Item Codes and Item Locations 

This would output the line item quantity in parenthesis, followed by the item code, followed by the item's location code. If multiple line items exist, they will be separated by commas.
<xsl:for-each select="//Order/Item">({Quantity}) - {Code} - {Location}, </xsl:for-each> 


Dates and Timestamps 

These can also be useful for automatically naming reports generated from ShipWorks with the current date and/or timestamp.  For more information, see this article.


1.  Generating the date (example:  8_15_2017)

This would output the current date.

{sw:ToShortDate(//Generated)}


2.  Generating the current date and timestamp (example:  2017-08-15T14_12_20.7278676Z)

This outputs the current date along with the current time.

{//Generated}


Still Need Help?

Please feel free to reach out to one of our awesome Customer Care Representatives in St. Louis.  We are happy to help.