Delete NZ Bibs and Sets from Scheduled Jobs
RunsThis biweeklyworkflow toautomatically identifyprocesses the setsets created by thetwo Almascheduled NZNetwork Zone cleanup jobs, runs Alma’s Delete Bibliographic Records job “Identifyagainst recordsthose thatsets, areand not used in the Network - NZ titles linked to CZ, no NZ inventory”, then emailsnotifies the NZ Manager aof review-and-approvalthe linkresults. forIf potentialthe deletion.deletion succeeds, LibOW removes the now-unneeded set, completing the cleanup process without staff intervention.
At a glance
Status: Active
Environment / Tags: Network Zone; Live
Applies consortium-wide?:
and NZ Production credentialsYesLikely yes —operatesinferredon Almafrom Network ZonebibliographictagrecordsRuns on: Alma Network Zone
(NZ)Trigger:
ScheduledRuns—wheneverrunsaneveryAlmatwojobweeks on Monday at 8:30 AMfinishesPrimary outcome:
IdentifiesAutomaticallya set of NZdeletes bibliographic recordslinkedfromtosets created by two scheduled Alma identification jobs, then deletes theCommunitysetZoneif(CZ)thewithdeletenojobNZ inventory and emails details for review and potential deletion.succeeds.Who receives results:
atWRLCNZ Managersaavedra@wrlc.org
Why this exists
OverThis time,workflow helps keep the Network Zone cancleaner accumulateby automating a follow-up step after scheduled Alma jobs identify bibliographic records that:that are no longer used in the Network Zone. Instead of requiring staff to manually locate the set, run the delete job, confirm the results, and remove the set afterward, LibOW handles those steps automatically.
What it does
- Watches
AreforlinkedcompletedtoAlma jobs. - Checks whether the
CommunitycompletedZonejob(CZ),is one - of
Havetwonospecific scheduled Network Zoneinventory,identificationandjobs. - If
Arethe job does notusedmatch,bythememberworkflowinstitutions.stops.
Thesethe recordsjob maymatches, beit candidatesretrieves the completed job’s details.
Detects thebibliographic set created byathatseparate Alma identification job,job.- Runs
Bibliographic Records job on that set.RetrievesAlma’sitsDeletedetails, Sends an email with the
setdeleteIDjoband record count,results.
completes successfully, the workflow deletes the set.Provides a link toIf thecontrolleddeletedeletionjobworkflow.- If the delete job does not complete successfully, the set is not deleted.
This separates identification from deletion, creating a manual approval checkpoint.
WhatWhere it does
runs
- Alma
RunsIZ(s):everyNetworktwoZoneweeks./ NZ Production - Systems
Lookstouched:backAlmaoverAPIs; Gmail - Credentials referenced: NZ Production Alma APIs; Generic LibOW Gmail credentials
How it works
Logic overview
- If the
previous 13 days. Retrieves instances of a specificcompleted Alma jobthatmatchesidentifiesoneunused NZ titles linked to CZ.Checks for both:COMPLETED_SUCCESSCOMPLETED_FAILED
IDs:Filters forof thecorrecttwo configured scheduled jobname.
The workflow
job, runs the delete bibliographic records job, emails the results, and deletes the set if the delete job succeeds.Locatesretrieves theitemizedjob instance details, finds the set created by thatjob.- If
match:RetrievesthefullcompletedsetAlmadetailsjob(includingdoesrecordnotcount).
The workflow does nothing. - If
Sendstheandelete bibliographic records job succeeds:
The workflow deletes the set. - If the delete bibliographic records job does not succeed:
The workflow sends the emailwith:results but does not delete the set.
Artifacts produced
- Email
Set name Set IDRecord countCreation dateDirect linknotification to theDeleteNZBibManagerSetapproval form
Takes no further action unless manual deletion is approved.
Where it runs
with:
- Job
Alma IZ(s):AlmaNetwork Zone
name - Job
Systems touched:Alma APIs (job instances and set retrieval)IDGmail (notification email)
Status - Submit
Reports / queries used:None
Credential referenced:
NZ Production – Alma APIs – Read & Writetime- End
Gmail Credentials – Generic LibOW
How it works
Logic overview
1. Scheduled Trigger
Runs every two weeks:Mondaytime- Set
8:30 AM
sizeCalculates:Date 13 days agoToday’s date
These define the job instance search window.
2. Retrieve Identification Job Instances
The workflow retrieves instancesNumber of Almarecords job:
S31366584960004101
Date range:
13 days ago → todaydeleted
It explicitly checks both statuses:
COMPLETED_SUCCESSCOMPLETED_FAILED
This ensures no run is missed due to job outcome.
⚠️ If the job ID changes, this workflow will stop functioning.
3. Filter for Correct Job
A Filter node ensures only jobs whose name contains:
“Identify records that are not used in the Network - NZ titles linked to CZ, no NZ inventory”
If Alma job naming changes, this filter may fail.
4. Retrieve Set Created by Job
The workflow:
Retrieves job instance details.Searches for sets where:name ~ job counter value
Assumes:Set type =ITEMIZEDContent type =BIB_MMS
It then retrieves full set information, including:
Set IDSet namenumber_of_membersCreated date
⚠️ Assumes set naming convention includes job counter value.
5. Send Notification Email
An email is sent to the WRLC Consortial NZ Manager
Email includes:
Set NameRecord CountDateSet IDDirect URL to theDelete NZ Bib Setworkflowform
The email clearly states:
If no action is taken, no deletion will occur.
Deletion requires manual approval via the separate workflow.
If results exist
A qualifying set is found.Email is sent with deletion approval link.No records are deleted automatically.
If no results
If no job instances exist in date range:No email is sent.
If job runs but produces no set:No deletion notification occurs.
If job ID or naming changes:Workflow may fail silently to identify sets.
Artifacts produced
Email notification to NZ Manager.No sets created by this workflow.No deletion job submitted.No files generated.
Relationship to other workflows
This workflow depends on:
An Alma scheduled job that creates the identification set.This workflow sends notification and approval link.TheDelete NZ Bib Setworkflow, which performs the actual deletion after manual approval.
This workflow only performs identification and notification.