CLC D-Tech Locker Utility

holds-pickup, polaris, shared-ext-housekeep

Mike Fields

The CLC’s D-Tech Locker Utility both removes unclaimed items from and adds new holds to the locker’s database. Without this tool, these tasks would need to be performed manually by the staff. Unclaimed holds could prevent the locker from opening. It is recommended that you run this script daily and that staff physically remove any unclaimed items from the locker after the script is run.

By default the tool runs in read-only mode and requires passing the -write parameter to update the database. The tool exposes quite a few options in appSettings.json but the only ones required to be set are ConnString, ClcApiKey, and LockerBranchId.

The current release, version 11, can be found here:
dtech-locker-utility-11.zip (2.9 MB)

This version only supports the newer, multi-table database. For the older version that supports the legacy, single table database schema please open a helpdesk ticket.

The tool is built using .NET Core and may require installing the runtime, which can be found here: Download .NET 6.0 (Linux, macOS, and Windows)

In addition to using this utility, we also recommend opening a HelpDesk ticket with CLC staff to ensure that the 3M SIP CKO option to allow CKOs of In-Transit items is allowed. This is a workaround to the following D-Tech locker issue:

One flaw the lockers have is whenever any items are added to a given locker, any other item(s) already in the locker are checked in, too. This creates the issue of putting these items into In-Transit (since, of course, they’d never belong as In at a lockers branch). By default In-Transit items are unable to be checked out, so lockers would frequently become unusable.

appSettings.json Settings

Setting Description
ConnString connection string for local D-Tech locker MySQL database
ClcApiUrl URL for CLC API, should be https://api.clcohio.org unless told otherwise
ClcApiKey API key for CLC API, provided by CLC
LockerBranchId Polaris OrganizationID for your locker branch
OldItemsLabel Label for items that were in the locker when the tool was ran
NewItemsLabel Label for the new list of items that should be in the locker
UnclaimedItemsLabel Label for unclaimed items that are in the locker
UnknownItemsLabel Label for unknown items in the locker, those that are neither held nor unclaimed. There shouldn’t be many of these normally
LockerOkMessage Message displayed when the locker already contains the correct items
WriteOkStatusMessage Message displayed when the locker’s database row was successfully updated
WriteErrorStatusMessage Message displayed when the locker’s database row could not be updated
LockerSeparator Text that separates each locker in the text output
MaxTitleLength Titles longer than this will be truncated to avoid display issues
ShowOkLockers By default, only lockers requiring action will be shown. If this option is enabled, ALL lockers will be shown in the output
AllPatronLockersInfoHeader Label for a patron’s full list of lockers. Only used if a patron is in multiple lockers
TextOutputFolder If set, a timestamped text file will be created in this directory each time the tool is run
TextOutputFilenameRoot Root of the text output filename for the above folder, shown before the timestamp
TextOutputDateFormat Date format string for timestamping the text output filename
OpenTextFileOnExit If enabled, the text file will be automatically opened after the tool is finished

Launch Parameters

Parameter Description
-write Enables updating the locker database, otherwise runs in read-only mode
-pause Pauses after execution, requiring the Enter key to close the application
-showok Overrides the appSettings.json setting to force showing lockers that don’t require action
-hideok Overrides the appSettings.json setting to force hiding lockers that don’t require action
Shane Hoffman

Is there another way to get the file? I downloaded it, unblocked it, and tried to extract it, but it errors out with “unexpected error” each time. I downloaded the file twice, just to make sure there wasn’t something weird with the first dl.

Sam Lewis

Are you getting unhandled exception when running the exe? That could happen if your connection string is not updated correctly in appSettings.json.

Also, @mfields - the latest version is now version 8, can you update this post?

P.S. Does this mean that Plain City is looking into / getting D-Tech lockers?

Mike Fields

I’ve updated the ZIP with the latest version.

If I had to guess, the error you’re getting is likely because your CLC API key is empty in appsettings.json. I’ll try to send you a Discourse PM with a note containing a key to use or via email if that ends up not working.

Shane Hoffman

I’m not that far along. I’ve simply downloaded the file and am trying to unzip it so that I can look at the contents. It has happened with the old file and the new one @mfields just put in.

Mike Fields

Interesting. If you can download and use 7zip that will likely fix it. Otherwise I can try rezipping the file without the couple setting tweaks I needed to get it under the discourse attachment limit and send it to you some other way.

Shane Hoffman

That got it.
Thanks

Shane Hoffman

anyone have the database name for the connection string?

Sam Lewis

The database name is holditdb

The first line after the opening { in our appSettings.json is like this:

"ConnString": "Server=10.1.1.245;Database=holditdb;Uid=d-tech;Pwd=;",

I got the database name and credentials from de-compiling the staff client Java app.

Wes Osborn

Is there a new database version number after the Dtech upgrade? We’re wanting to see if we can match the d-tech CLC utility to the Dtech database number in the connection string.

Sam Lewis

This is what I have for the MySQL version on the lockers PCs.

OWL
image

NWL
image

I don’t have a “before”, but the fact that they are different versions from each other makes me think they are not updating the MySQL version during the locker software update. The database in question (the only one on the server) remains “holditdb”, but instead of everything being in one table called “userlockerdata” there are now multiple tables: “lockerassignment”, “lockerassignmenthistory”, “lockeritem”, “lockeritemhistory”, “outoforderlocker”, and “version”. The “version” table has a single row with two columns, “Name” with a value “Schema” and “Version” with a value “2” - the same for both NWL and OWL.