Your integration bundle includes a mockup application to demonstrate available types of integrated printing with Cloud Applications. We simulate your cloud-based applications with a JavaScript mockup application. Your mockup application can send printing data to:
-
Cloud Print APIs to demonstrate direct printing with cloud-enabled printers.
-
Cloud Trigger APIs to demonstrate server-based printing with Cloud Triggers.
-
NiceLabel Web Client to demonstrate thin client printing.
We provide you with sample files in LabelCloudDataIntegrationPack.zip. You can download it here:
For NiceLabel 10: https://ftp.nicelabel.com/software/demo/v10/LabelCloudDataIntegrationPack.zip
For NiceLabel 2019: https://ftp.nicelabel.com/software/demo/v8/LabelCloudDataIntegrationPack.zip
Your sample is configured for NiceLabel Cloud’s “demosystem” account. Follow the steps in the following sections to update your sample application to work with your NiceLabel Cloud account.
-
Log in to your NiceLabel Cloud Control Center. In your browser, type:
https://<account>.onnicelabel.com/dashboard
Note
Replace
<account>
with your actual NiceLabel Cloud account name. -
Download and install NiceLabel Web Client.
-
In Documents, create a new folder: /Demo/LabelCloudDataIntegration.
-
Open LabelCloudDataIntegrationPack.zip (provided).
-
Upload your Document Storage folder contents into your CloudIntegration folder (in your DMS).
Your files are uploaded in Control Center and ready to use.
In Web Applications, you define which applications NiceLabel Web Client can run. We also use Web Applications for “thin client” printing demos.
Register your Web Application:
-
Go to Applications > Web Applications (on your left) and click Add.
-
For Name, type CloudIntegration-ThinClient.
-
For Path (Solution or Label files), click Browse and select: /Demo/LabelCloudDataIntegration/ThinClient.nsln.
-
For Authorized Users and Groups, add at least one user (yourself). Your users receive email invitations and all users you authorize can run the Web Application in NiceLabel Web Client.
-
Click Save.
Your Web Application is registered and ready to use.
Cloud Integrations you create in Control Center authenticate your Cloud Print APIs and Cloud Trigger APIs. You use the same Cloud Integrations for IoT print using Cloud API and Cloud trigger printing demos.
Create your Cloud Integration:
-
Go to Integrations > Cloud Integrations (on your left) and click Add.
-
For Name, type a custom name for your integration (you can type any name).
-
Click Save.
Your Cloud Integration is created in Control Center and ready for Developer Portal registration.
Before you can use Cloud Print APIs or Cloud Trigger APIs, you must register your Cloud Integration in the Developer Portal. Registering links your NiceLabel Cloud account with APIs and requires subscription keys to authorize your API calls.
Register your Cloud Integration:
-
Open your Control Center User Guide.
-
Read the chapter Cloud Print API.
-
Follow the provided instructions to complete the following:
-
Set up your new account on our Developer Portal.
-
Create your new subscription.
-
Register your Developer Portal subscription with your Cloud Integration (in Control Center).
You must use your activated subscription key in custom HTTP headers (Ocp-Apim-Subscription-Key) with each of your API calls.
-
Your Cloud Integration is registered on the Developer Portal and ready for printer registration.
Before you can execute Cloud Print APIs, you must register your cloud-enabled printers with your NiceLabel Cloud account.
For instructions and more information about the registration process, read our user guide:
-
Chapter Understanding Cloud Print in Control Center User Guide.
-
Open LabelCloudDataIntegrationPack.zip (provided).
-
Extract the Website subfolder to a temporary disk location.
-
Open your extracted Website folder.
-
Open index.html in your text editor.
-
Find the string “nicelabelwebclient”. Update the URI reference:
nicelabelwebclient10:?server=https://demosystem.onnicelabel.com/print
Note
Replace “demosystem” with your NiceLabel Cloud account name.
-
Save your file.
-
Open scripts/config.js in your text editor.
-
Type your subscription key as your subscriptionKey value.
Note
You can get your subscriptionKey from Developer Portal > Products.
Note
Do not change values for label and uniqueIdentifier:
-
Label specifies which label file to use.
-
UniqueIdentifier specifies unique cloud trigger identifiers (defined in your Automation configuration).
-
-
Save your file.
Your mockup website is set up and ready to use.
-
Run NiceLabel Automation Manager.
-
Click Connect under “Connect to NiceLabel Cloud” to begin activation.
-
Type your NiceLabel Cloud account name.
Note
Replace “demosystem” in the screenshot below with your actual NiceLabel Cloud account name.
-
Click Connect.
-
Select Microsoft or Google authentication (depending on how you logged in to Control Center from your invitation email). NiceLabel activates on your computer.
-
In Automation Manager, click +Add. Browse to your Automation configuration file (.MISX) in Document Storage (Load the file you copied to /Demo/LabelCloudDataIntegration).
-
Start all the triggers in your configuration.
Your integration server is set up and ready to use.
Configure your NiceLabel Web Client for “thin client” printing:
-
Open ThinClient.nsln in NiceLabel Designer.
-
Select the “question mark” Picture object.
-
Double-click the “question mark” Picture object to open object properties.
-
In Events, click Actions for On Click event.
-
In the Open Document/Program action, direct your file name to your mockup website URL.
Note
If your mockup website runs from your local disk and not through a web server, you can delete the Open Document/Program action altogether.
-
Save your changes.
NiceLabel Web Client is ready for “thin client” printing.
Execute your sample integration:
-
Go to the temporary folder on your disk with your extracted files from LabelCloudDataIntegrationPack.zip.
-
Go to your Website folder.
-
Double-click index.html. Your cloud system mockup opens in your browser:
Your browser console logs outbound XML requests and inbound responses. To view your logs:
-
Open your browser.
-
Press F12.
-
Click Console.
For each Print request, your mockup website writes and sends JSON messages as HTTP requests to our Cloud Print API. Cloud Print API processes the XML data, creates print jobs, sends print jobs to cloud-connected printers, and provides feedback.
Execute cloud printing:
-
For your integration method, select IoT print using Cloud API.
-
Select your printer from the list.
Note
Your list dynamically displays printers registered to your NiceLabel Cloud account. If your list is empty, register your printers. See Registering cloud printers.
-
Click Print to print labels.
Your cloud printing is set up and ready to use.
For each Print or Preview request, your mockup website writes and sends XML messages as HTTP requests to our Cloud Trigger API. Cloud Trigger API redirects the messages to your on-premise NiceLabel Automation. Automation processes the XML data, executes the required actions (such as print or preview), and provides feedback.
Execute your server-based integration:
-
Click Print to print labels.
-
Click Preview to see label previews.
Note
Your list dynamic displays printers available on the computer where your NiceLabel integration system (NiceLabel Automation) is installed.
-
For your integration method, select Cloud trigger.
-
Select your printer from the list.
Your server-based integration is set up and ready to use.
Execute your client-based integration:
-
For your integration method, select Thin client.
-
Click Print to open NiceLabel Web Client.
Note
You must have Web Client installed on the computer where your mockup web application runs.
-
Log in to the Web Client with your Microsoft or Google account (Select Remember me to save your credentials). Web Client opens your Web printing application:
-
Choose a printer from the drop-down list to print your labels.
-
Click Save to remember your printer.
-
Keep your Web application running.
-
Click Print in your mockup application to transmit product data to your Web Client in a query string. Your labels print to your local printer.
-
If you have no driver installed, click Download printer driver and install your driver.
Your client-based integration is set up and ready to use.