Skip to main content

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?: YesLikely yesoperatesinferred on Almafrom Network Zone bibliographictag records

    and NZ Production credentials
  • Runs on: Alma Network Zone (NZ)

  • Trigger: ScheduledRuns whenever runsan everyAlma twojob weeks on Monday at 8:30 AM

    finishes
  • Primary outcome: IdentifiesAutomatically a set of NZdeletes bibliographic records linkedfrom tosets created by two scheduled Alma identification jobs, then deletes the Communityset Zoneif (CZ)the withdelete nojob NZ inventory and emails details for review and potential deletion.

    succeeds.
  • Who receives results: WRLC NZ Manager

    at saavedra@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

    Arefor linkedcompleted toAlma jobs.

  • Checks whether the Communitycompleted Zonejob (CZ),

    is
  • one
  • of

    Havetwo nospecific scheduled Network Zone inventory,identification and

    jobs.
  • If

    Arethe job does not usedmatch, bythe memberworkflow institutions.

    stops.
  • If

    Thesethe recordsjob maymatches, beit candidatesretrieves the completed job’s details.

  • Searches Alma for cleanup.the Thisitemized workflow does not delete records directly. Instead, it:

    • Detects thebibliographic set created by athat separate Alma identification job,

      job.
    • Runs

      RetrievesAlma’s itsDelete details,

      Bibliographic Records job on that set.
    • Sends an email with the setdelete IDjob and record count,

      results.
    • Provides a link toIf the controlleddelete deletionjob workflow.

      completes successfully, the workflow deletes the set.
    • If the delete job does not complete successfully, the set is not deleted.

    This separates identification from deletion, creating a manual approval checkpoint.


    What

    Where it does

    runs
    • Alma

      RunsIZ(s): everyNetwork twoZone weeks.

      / NZ Production
    • Systems

      Lookstouched: backAlma overAPIs; 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 job thatmatches identifiesone unused NZ titles linked to CZ.

    • Checks for both:

      • COMPLETED_SUCCESS

      • COMPLETED_FAILED

    • Filters forof the correcttwo configured scheduled job name.

      IDs:

      The
    • workflow
    • Locatesretrieves the itemizedjob instance details, finds the set created by that job.

      job, runs the delete bibliographic records job, emails the results, and deletes the set if the delete job succeeds.
    • If

      Retrievesthe fullcompleted setAlma detailsjob (includingdoes recordnot count).

      match:

      The workflow does nothing.
    • If

      Sendsthe andelete bibliographic records job succeeds:
      The workflow deletes the set.

    • If the delete bibliographic records job does not succeed:
      The workflow sends the email with:

      results but does not delete the set.

    Artifacts produced

    • Email

      Set name

    • Set ID

    • Record count

    • Creation date

    • Direct linknotification to the Delete NZ BibManager Set approval form

  • Takes no further action unless manual deletion is approved.


  • Where it runs

    with:
    • Job

      Alma IZ(s):

      • Alma Network Zone

      name
    • Job

      Systems touched:

      • Alma APIs (job instances and set retrieval)

        ID
      • Gmail (notification email)

      Status
    • Submit

      Reports / queries used: None

    Credential referenced:

    • NZ Production – Alma APIs – Read & Write

      time
    • End

      Gmail Credentials – Generic LibOW


    How it works

    Logic overview

    1. Scheduled Trigger

    • Runs every two weeks:

      • Monday

        time
      • Set

        8:30 AM

      size
    • Calculates:

      • Date 13 days ago

      • Today’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 → today

        deleted

    It explicitly checks both statuses:

      • COMPLETED_SUCCESS

      • COMPLETED_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 = ITEMIZED

        • Content type = BIB_MMS

    It then retrieves full set information, including:

      • Set ID

      • Set name

      • number_of_members

      • Created 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:

    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.
    • The Delete NZ Bib Set workflow, which performs the actual deletion after manual approval.

    This workflow only performs identification and notification.