RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

ShiftController

Controller Class for Shifts

Constructor

new ShiftController()

Source

Methods

static

create(siteId, createData) → {Promise.<ShiftModel>}

Create a Shift [POST /packhouse/sites/{siteId}/shifts]

Parameters

  • siteId number

    The Site ID

  • createData ShiftController.CreateData

    The Shift Create Data

Returns

  • Promise.<ShiftModel>

Source

static

createComment(siteId, id, content) → {Promise.<ShiftController.CommentItem>}

Create a Comment [POST /packhouse/sites/{siteId}/shifts/{id}/comments]

Create a Comment for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

  • content string

    The Content of the New Comment

Returns

  • Promise.<ShiftController.CommentItem>

Source

static

deleteOneComment(siteId, id, commentId) → {Promise.<boolean>}

Delete a Comment [DELETE /packhouse/sites/{siteId}/shifts/{id}/comments/{commentId}]

Delete a Comment for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

  • commentId string

    The Comment ID

Returns

  • Promise.<boolean>

Source

static

getAll(siteId, queryParametersopt) → {Promise.<Array.<ShiftModel>>}

List all Shifts [GET /packhouse/sites/{siteId}/shifts]

Parameters

  • siteId number

    The Site ID

  • queryParameters ShiftController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<ShiftModel>>

Source

static

getComments(siteId, id) → {Promise.<Array.<ShiftController.CommentItem>>}

Retrieve Comments [GET /packhouse/sites/{siteId}/shifts/{id}/comments]

Retrieves Comments for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

Returns

  • Promise.<Array.<ShiftController.CommentItem>>

Source

static

getOneComment(siteId, id, commentId) → {Promise.<ShiftController.CommentItem>}

Retrieve a Comment [GET /packhouse/sites/{siteId}/shifts/{id}/comments/{commentId}]

Retrieves Comments for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

  • commentId string

    The Comment ID

Returns

  • Promise.<ShiftController.CommentItem>

Source

static

getScoreHistory(siteId, id) → {Promise.<Array.<ShiftController.ScoreHistoryItem>>}

Retrieve a Shift's Score History [GET /packhouse/sites/{siteId}/shifts/{id}/scoreHistory]

Retrieves the Score History for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

Returns

  • Promise.<Array.<ShiftController.ScoreHistoryItem>>

Source

static

getScoreMetrics(siteId, id) → {Promise.<ShiftController.ShiftScoreMetrics>}

Retrieve a Shift Score Metrics [GET /packhouse/sites/{siteId}/shifts/{id}/scoreMetrics]

Retrieves the Score Metrics for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

Returns

  • Promise.<ShiftController.ShiftScoreMetrics>

Source

static

getSummaryReport(siteId, id) → {Promise.<ShiftController.ShiftSummaryReport>}

Retrieve a Shift Summary Report [GET /packhouse/sites/{siteId}/shifts/{id}/summaryReport]

Retrieves a Summary Report for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

Returns

  • Promise.<ShiftController.ShiftSummaryReport>

Source

static

getSummaryReportPdf(siteId, id) → {Promise.<boolean>}

Retrieve a Shift Summary Report PDF [GET /packhouse/sites/{siteId}/shifts/{id}/summaryReportPdf]

Retrieves a Summary Report PDF for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

Returns

  • Promise.<boolean>

Source

static

update(siteId, id, updateData) → {Promise.<ShiftModel>}

Update a Shift [PATCH /packhouse/sites/{siteId}/shifts/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

  • updateData ShiftController.UpdateData

    The Shift Update Data

Returns

  • Promise.<ShiftModel>

Source

static

updateOneComment(siteId, id, commentId, content) → {Promise.<ShiftController.CommentItem>}

Update a Comment [PATCH /packhouse/sites/{siteId}/shifts/{id}/comments/{commentId}]

Update a Comment for a Shift

Parameters

  • siteId number

    The Site ID

  • id string

    The Shift ID

  • commentId string

    The Comment ID

  • content string

    The Updated Content for the Comment

Returns

  • Promise.<ShiftController.CommentItem>

Source

Type Definitions

CommentItem

A CommentItem Type

Type

  • Object

Properties

  • id string

    The Comment ID

  • userAccount ShiftController.UserAccount
  • content string <nullable>

    The Content of the Comment

  • createdTimestamp Date <nullable>

    When the Comment was Created

  • updatedTimestamp Date <nullable>

    When the Comment was last Updated

Source

CreateData

The Create Data for a Shift

Type

  • Object

Properties

  • packingLineId string

    The Packing Line ID this Shift is associated with

  • createdTimestamp Date <optional>

    When this Shift was Created

  • type string

    The Type of Shift

  • lineManagerName string <optional>
    <nullable>

    The Name of the Line Manager for this Shift

  • binsTippedTarget number <optional>
    <nullable>

    The Target Number of Bins to Tip for this Shift

  • initialClass1Manning number <optional>
    <nullable>

    DEPRECATED The Initial Number of People working in all Areas except Class 2 for this Hour

  • initialClass2Manning number <optional>
    <nullable>

    DEPRECATED The Initial Number of People working in the Class 2 Area for this Hour

  • readyTimestamp Date <optional>
    <nullable>

    When this Shift was Ready for Packing

  • startTimestamp Date <optional>
    <nullable>

    When this Shift was Started

  • finishTimestamp Date <optional>
    <nullable>

    When this Shift was Finished

  • publishTimestamp Date <optional>
    <nullable>

    When this Shift was Published

  • satisfactionRating number <optional>
    <nullable>

    An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift

  • keyCelebration string <optional>
    <nullable>

    An Optional Key Celebration the Line Manager and Team experienced during this Shift

  • keyChallenge string <optional>
    <nullable>

    An Optional Key Challenge the Line Manager and Team experienced during this Shift

  • handoverNotes Array.<ShiftController.ShiftHandoverNote> <optional>

    DEPRECATED An Optional Array of Handover Notes for this Shift

  • areaNotes Array.<ShiftController.ShiftAreaNote> <optional>

    An Optional Array of Notes for this Shift

  • schedule ShiftController.ShiftSchedule

    The Schedule for this Shift

  • scoreWeightings ShiftController.ShiftScoreWeightings <optional>
    <nullable>

    The Score Weightings used for this Shift. Represented as a Number between 0.0 and 1.0

Source

CustomQualityMetricItem

A CustomQualityMetricItem Type

Type

  • Object

Properties

  • id string

    The ID of this Custom Quality Metric Item

  • name string

    The Name of this Custom Quality Metric Item

  • type string

    The Display Type for this Custom Quality Metric Item

  • value number

    The Actual Value for this Custom Quality Metric Item

  • target number <nullable>

    The Target Value for this Custom Quality Metric Item

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Shift is associated with

  • type string <optional>

    The Type of Shift

  • lineManagerName string <optional>
    <nullable>

    The Name of the Line Manager for this Shift

  • createdTimestampBegin Date <optional>

    Filter by the Timestamp when Shifts were Created. Results Greater than or Equal to Timestamp

  • createdTimestampEnd Date <optional>

    Filter by the Timestamp when Shifts were Created. Results Less than or Equal to Timestamp

  • startTimestampBegin Date <optional>

    Filter by the Timestamp when Shifts were Started. Results Greater than or Equal to Timestamp

  • startTimestampEnd Date <optional>

    Filter by the Timestamp when Shifts were Started. Results Less than or Equal to Timestamp

  • finishTimestampBegin Date <optional>

    Filter by the Timestamp when Shifts were Finished. Results Greater than or Equal to Timestamp

  • finishTimestampEnd Date <optional>

    Filter by the Timestamp when Shifts were Finished. Results Less than or Equal to Timestamp

  • updateTimestampBegin Date <optional>

    Filter by the Timestamp when Shifts were last Updated. Results Greater than or Equal to Timestamp

  • updateTimestampEnd Date <optional>

    Filter by the Timestamp when Shifts were last Updated. Results Less than or Equal to Timestamp

Source

ShiftSchedule

A ShiftSchedule Type

Type

  • Object

Properties

  • startTime string

    When the Shift is Scheduled to Start

  • endTime string

    When the Shift is Scheduled to End

  • breaks Array.<ShiftController.ShiftScheduleBreak>

    An Array of Scheduled Breaks for the Shift

Source

ShiftScoreMetrics

A ShiftScoreMetrics Type

Type

  • Object

Properties

  • scoreActual number

    The Actual Score represented as a Percentage

  • traysPerHourActual number

    The Actual Tray Equivalents per Hour

  • traysPerHourTarget number <nullable>

    The Target Tray Equivalents per Hour

  • costPerTrayActual number

    The Actual Cost per Tray Equivalent represented in cents

  • costPerTrayTarget number <nullable>

    The Target Cost per Tray Equivalent represented in cents

  • qualityR600IdealActual number

    The Actual Quality R600 Ideal Samples represented as a Percentage

  • qualityR600IdealTarget number <nullable>

    The Target Quality R600 Ideal Samples represented as a Percentage

  • customQualityMetrics Array.<ShiftController.CustomQualityMetricItem>

    An Array of Custom Quality Metric Items for the Shift

Source

ShiftScoreWeightings

A ShiftScoreWeightings Type

Type

  • Object

Properties

  • class1TraysPerHour number

    The Score Weighting for Class 1 Trays Per Hour

  • costPerTray number

    The Score Weighting for Cost per Tray

  • qualityR600Ideal number

    The Score Weighting for Quality R600 Ideal

  • customQualities Array.<ShiftController.ShiftScoreWeightingsCustomQuality>

    An Array of Score Weightings for Custom Qualities

Source

ShiftSummaryReport

A ShiftSummaryReport Type

Type

  • Object

Properties

  • shiftId string

    The ID of this Shift

  • shiftType string

    The Type of Shift

  • isoWeek number

    The ISO Week when this Shift was Created

  • startTimestamp Date

    Start Timestamp of the Shift

  • finishTimestamp Date <nullable>

    Finish Timestamp of the Shift

  • lineManagerName string <nullable>

    Name of the Line Manager for the Shift

  • qualityManagerName string <nullable>

    Name of the Quality Manager for the Shift

  • hourlyEntries Array.<ShiftHourlyEntryModel>

    An Array of Hourly Entries for the Shift

  • hourlyEntryInteractionActual number

    Actual Number of Hourly Entry Interactions

  • hourlyEntryInteractionExpected number <nullable>

    Expected Number of Hourly Entry Interactions

  • hourlyEntryInteractionScore number <nullable>

    Hourly Entry Interaction Score based on Expected vs Actual Interactions

  • downtimeEvents Array.<DowntimeEventModel>

    An Array of Downtime Events that occurred during the Shift

  • focusMeetings Array.<ShiftFocusMeetingModel>

    An Array of Focus Meetings held during the Shift

  • focusMeetingsHeld number

    Number of Focus Meetings Held

  • focusMeetingsExpected number <nullable>

    Expected Number of Focus Meetings to Hold

  • focusMeetingsScore number <nullable>

    Focus Meeting Score based on Expected vs Held

  • growerChangeMeetings Array.<ShiftGrowerChangeMeetingModel>

    An Array of Grower Change Meetings held during the Shift

  • growerChangeMeetingsHeld number

    Number of Grower Change Meetings Held

  • growerChangeMeetingsExpected number <nullable>

    Expected Number of Grower Change Meetings to Hold

  • growerChangeMeetingsScore number <nullable>

    Grower Change Meeting Score based on Expected vs Held

  • associatedPackruns Array.<PackrunModel>

    An Array of Packruns that were Active during the Shift

  • associatedVarietyIds Array.<string>

    An Array of Variety IDs associated with this Shift

  • associatedVarietyCodes Array.<string>

    An Array of Variety Codes associated with this Shift

  • associatedGrowingMethodIds Array.<string>

    An Array of Growing Method IDs associated with this Shift

  • associatedGrowingMethodCodes Array.<string>

    An Array of Growing Method Codes associated with this Shift

  • qualitySummary ShiftQualitySummaryModel <nullable>

    The Quality Summary for this Shift

  • binsTippedTarget number

    Target number of Bins to Tip for the Shift

  • totalBinsTipped number

    Total Bins Tipped for the Shift

  • binsTippedPerHour number

    Rate of Bins Tipped per Hour

  • binsTippedPerHourExcludingDowntime number

    Rate of Bins Tipped per Hour excluding Downtime

  • totalProductionTime number

    Total Production Time for the Shift (exludes Breaks) represented as Seconds

  • totalScheduledBreakTime number

    Total Scheduled Break Time for the Shift represented as Seconds

  • totalDowntime number

    Total Downtime for the Shift represented as Seconds

  • totalDowntimePercentage number

    Total Downtime Percentage for the Shift

  • downtimeEventsCount number

    Number of Downtime Events that occurred during the Shift

  • downtimeEventsAverageDuration number <nullable>

    Average Duration of all Downtime Events for the Shift represented as Seconds

  • class1ManningTarget number <nullable>

    Target Number of People that should be working in all Areas except Class 2 for the Shift

  • averageClass1Manning number <nullable>

    Average Number of People working in all Areas except Class 2 for the Shift

  • class1ManningPercentage number <nullable>

    The Manning Percentage of all Areas except Class 2 for the Shift

  • class2ManningTarget number <nullable>

    Target Number of People that should be working in the Class 2 Area for the Shift

  • averageClass2Manning number <nullable>

    Average Number of People working in the Class 2 Area for the Shift

  • class2ManningPercentage number <nullable>

    The Manning Percentage of the Class 2 Area for the Shift

  • totalManningTarget number <nullable>

    Overall Target Number of People that should be working for the Shift

  • averageTotalManning number <nullable>

    Overall Average Number of People working for the Shift

  • totalManningPercentage number <nullable>

    The Overall Manning Percentage for the Shift

  • costPerManningUnitHour number <nullable>

    The Average Cost per Person working in all Areas for the Shift

  • totalHoursWorked number

    Total Hours Worked for the Shift (excludes Breaks)

  • totalHoursWorkedExcludingDowntime number

    Total Hours Worked excluding Downtime for the Shift

  • totalHoursPaid number

    Total Hours Paid for the Shift (factors in Breaks)

  • class1TotalManningCost number <nullable>

    Total Cost to Staff all Areas except Class 2 for the Shift

  • class2TotalManningCost number <nullable>

    Total Cost to Staff the Class 2 Area for the Shift

  • class1DowntimeManningCost number <nullable>

    Total Cost of Staff consumed by Downtime in all Areas except Class 2 for the Shift

  • class2DowntimeManningCost number <nullable>

    Total Cost of Staff consumed by Downtime in the Class 2 Area for the Shift

  • class1CostPerTrayTarget number <nullable>

    The Target Cost per Class 1 Tray Equivalent after Adjustment (Class 1 %, Layered %, Soft-Sort %) for the Shift

  • class1CostPerTrayActual number <nullable>

    The Actual Cost per Class 1 Tray Equivalent for the Shift

  • class2CostPerTrayActual number <nullable>

    The Actual Cost per Class 2 Tray Equivalent for the Shift

  • totalClass1Trays number

    The Total Number of Class 1 Tray Equivalents Packed for the Shift

  • totalClass2Trays number

    The Total Number of Class 2 Tray Equivalents Packed for the Shift

  • class1TraysPerHour number <nullable>

    The Actual Number of Class 1 Tray Equivalents Packed per Hour including Downtime for the Shift

  • class1TraysPerHourExcludingDowntime number <nullable>

    The Actual Number of Class 1 Tray Equivalents Packed per Hour excluding Downtime for the Shift

  • class1TraysPerHourExcludingDowntimeTarget number <nullable>

    The Target Number of Class 1 Tray Equivalents that should be Packed after Adjustment (Manning %, Class 1 %, Layered %, Soft-Sort %) for the Shift

  • class1TraysPerManHour number <nullable>

    The Actual Number of Class 1 Tray Equivalents Packed per Person per Hour including Downtime for the Shift

  • class1TraysPerManHourExcludingDowntime number <nullable>

    The Actual Number of Class 1 Tray Equivalents Packed per Person per Hour excluding Downtime for the Shift

  • class2TraysPerHour number <nullable>

    The Actual Number of Class 2 Tray Equivalents Packed per Hour including Downtime for the Shift

  • class2TraysPerHourExcludingDowntime number <nullable>

    The Actual Number of Class 2 Tray Equivalents Packed per Hour excluding Downtime for the Shift

  • class2TraysPerManHour number <nullable>

    The Actual Number of Class 2 Tray Equivalents Packed per Person per Hour including Downtime for the Shift

  • class2TraysPerManHourExcludingDowntime number <nullable>

    The Actual Number of Class 2 Tray Equivalents Packed per Person per Hour excluding Downtime for the Shift

  • class1LayeredPercentageTarget number <nullable>

    The Target Percentage of Total Tray Equivalents that should be Layered for the Shift

  • class1LayeredPercentage number <nullable>

    The Actual Percentage of Total Tray Equivalents that are Layered for the Shift

  • class1BulkPercentage number <nullable>

    The Actual Percentage of Total Tray Equivalents that are Bulk for the Shift

  • averageClass1Percentage number <nullable>

    The Average Class 1 Percentage for all Packruns Active during this Shift

  • qualityR600IdealSamplesTarget number <nullable>

    The Target Percentage of Quality R600 Samples that should be Ideal for the Shift

  • qualityR600IdealSamplesActual number <nullable>

    The Actual Percentage of Quality R600 Samples that were Ideal for the Shift

  • customQualityData Array.<ShiftController.ShiftSummaryReportCustomQualityItem>

    An Array of Custom Quality Data Items for the Shift

  • satisfactionRating number <nullable>

    An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift

  • keyCelebration string <nullable>

    An Optional Key Celebration the Line Manager and Team experienced during this Shift

  • keyChallenge string <nullable>

    An Optional Key Challenge the Line Manager and Team experienced during this Shift

  • class1TraysPerHourScorePercentage number <nullable>

    The Weighted Score Percentage for Class 1 Tray Equivalents per Hour

  • class1TraysPerHourScoreWeighting number <nullable>

    The Score Weighting for Class 1 Tray Equivalents per Hour represented as a Number between 0.0 and 1.0

  • class1TraysPerHourTargetMet boolean

    Whether the Class 1 Tray Equivalents per Hour Target was Met for the Shift

  • class1CostPerTrayScorePercentage number <nullable>

    The Weighted Score Percentage for Class 1 Cost per Tray Equivalent

  • class1CostPerTrayScoreWeighting number <nullable>

    The Score Weighting for Class 1 Cost per Tray Equivalent represented as a Number between 0.0 and 1.0

  • class1CostPerTrayTargetMet boolean

    Whether the Class 1 Cost per Tray Equivalent Target was Met for the Shift

  • qualityR600IdealSamplesScorePercentage number <nullable>

    The Weighted Score Percentage for Quality R600 Ideal Samples

  • qualityR600IdealSamplesScoreWeighting number <nullable>

    The Score Weighting for Quality R600 Ideal Samples represented as a Number between 0.0 and 1.0

  • qualityR600IdealSamplesTargetMet boolean

    Whether the Percentage of R600 Ideal Samples Target was Met for the Shift

  • calculatedScore number <nullable>

    The Final Calculated Score for the Shift

Source

ShiftSummaryReportCustomQualityItem

A ShiftSummaryReportCustomQualityItem Type

Type

  • Object

Properties

  • id string

    The ID of this Custom Quality Item

  • name string

    The Name of this Custom Quality Item

  • type string

    The Metric Type for this Custom Quality Item

  • value number <nullable>

    The Actual Value for this Custom Quality Data Item

  • target number <nullable>

    The Target for this Custom Quality Data Item

  • scorePercentage number <nullable>

    The Weighted Score Percentage for this Custom Quality Data Item

  • scoreWeighting number <nullable>

    The Score Weighting for this Custom Quality Data Item

  • targetMet boolean

    Whether the Target was Met for this Custom Quality Data Item

Source

UpdateData

The Update Data for a Shift

Type

  • Object

Properties

  • packingLineId string <optional>

    The Packing Line ID this Shift is associated with

  • createdTimestamp Date <optional>

    When this Shift was Created

  • type string <optional>

    The Type of Shift

  • lineManagerName string <optional>
    <nullable>

    The Name of the Line Manager for this Shift

  • binsTippedTarget number <optional>
    <nullable>

    The Target Number of Bins to Tip for this Shift

  • initialClass1Manning number <optional>
    <nullable>

    DEPRECATED The Initial Number of People working in all Areas except Class 2 for this Hour

  • initialClass2Manning number <optional>
    <nullable>

    DEPRECATED The Initial Number of People working in the Class 2 Area for this Hour

  • readyTimestamp Date <optional>
    <nullable>

    When this Shift was Ready for Packing

  • startTimestamp Date <optional>
    <nullable>

    When this Shift was Started

  • finishTimestamp Date <optional>
    <nullable>

    When this Shift was Finished

  • publishTimestamp Date <optional>
    <nullable>

    When this Shift was Published

  • satisfactionRating number <optional>
    <nullable>

    An Optional Rating between 1 and 10 on how Satisfied the Line Manager was with this Shift

  • keyCelebration string <optional>
    <nullable>

    An Optional Key Celebration the Line Manager and Team experienced during this Shift

  • keyChallenge string <optional>
    <nullable>

    An Optional Key Challenge the Line Manager and Team experienced during this Shift

  • handoverNotes Array.<ShiftController.ShiftHandoverNote> <optional>

    DEPRECATED An Optional Array of Handover Notes for this Shift

  • areaNotes Array.<ShiftController.ShiftAreaNote> <optional>

    An Optional Array of Notes for this Shift

  • schedule ShiftController.ShiftSchedule <optional>

    The Schedule for this Shift

  • scoreWeightings ShiftController.ShiftScoreWeightings <optional>
    <nullable>

    The Score Weightings used for this Shift. Represented as a Number between 0.0 and 1.0

Source