Max.svmx_shift_information_manager(Map<String, Object> params)
|
Parameter Name
|
Parameter Type
|
Validation
|
Description
|
||
|---|---|---|---|---|---|
|
resources
|
String
|
Required, comma-separated
|
Comma-separated list of resource IDs. Salesforce and Service Board UUIDs are supported.
|
||
|
startDate
|
String
|
Required, UTC format
|
Start date and time of the query range.
|
||
|
endDate
|
String
|
Required, UTC format
|
End date and time of the query range.
|
||
|
isDaily
|
boolean
|
Optional, defaults to false
|
Specifies whether to truncate returned shift information based on working hours for the relevant day or preserve shift segment definition values.
|
||
|
isExternalID
|
boolean
|
Optional, defaults to false
|
Specifies whether to use external resource IDs. If set to true, Salesforce IDs are output in returned data.
|
||
|
truncateStartEnd
|
boolean
|
Optional, defaults to true
|
Defines whether to truncate first and last shift segment durations with specified start and end dates and times.
|
||
|
ignoreNoConfigSegment
|
boolean
|
Optional, defaults to false
|
Specifies whether to ignore segment durations with a type of _No_Config.
|
|
Response Detail
|
Possible Value
|
Notes
|
|---|---|---|
|
success
|
true or false
|
Indicates whether requests were processed successfully.
|
|
error
|
Error message with details
|
Details include validation errors and unexpected internal errors.
|
|
data
|
List of duration values
|
Nodes have the following attributes:
• id: Shift Exception record IDs. Optional, and available only when current duration values originate from shift exception records.
• resourceId: Salesforce IDs or UUIDs for technicians.
• startDate: Start date and time for the duration.
• endDate: End date and time for the duration.
• type: Shift segment type. Includes No_Config when no durations are configured, and Holiday for holiday durations.
• isAvailable: Whether the current duration is available.
|
{
"success": true,
"data": [
{
"resourceId": "ddeb094d-426c-4e31-9bd3-a4934d69c6de",
"startDate": "2020-03-30T00:00:00.000Z",
"endDate": "2020-03-30T09:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
},
{
"resourceId": "ddeb094d-426c-4e31-9bd3-a4934d69c6de",
"startDate": "2020-03-30T09:00:00.000Z",
"endDate": "2020-03-30T17:00:00.000Z",
"type": "Work",
"isAvailable": true
},
{
"resourceId": "ddeb094d-426c-4e31-9bd3-a4934d69c6de",
"startDate": "2020-03-30T17:00:00.000Z",
"endDate": "2020-03-31T00:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
}
]
}
|
|
If ignoreNoConfigSegment is set to true, only the 0900 to 1700 duration is returned.
|
POST/shiftInformation
// Call Shift Information API in groovy:
def params = [:]
params.with {
resources = 'f5e41031-fde7-4278-a7b3-320b33ab99c1'
startDate = '2020-03-23T00:00:00.000Z'
endDate = '2020-03-24T00:00:00.000Z'
isDaily = false
truncateStartEnd = false
}
def shiftInfo = Max.svmx_shift_information_manager(params) // Call the shift information operation from groovy
{
"resources": "50f15de5-47fc-44d6-9b3c-66cc10522841",
"startDate": "2020-04-01T00:00:00.000Z",
"endDate": "2020-04-03T00:00:00.000Z"
}
{
"success": true,
"data": [
{
"resourceId": "50f15de5-47fc-44d6-9b3c-66cc10522841",
"startDate": "2020-04-01T00:00:00.000Z",
"endDate": "2020-04-01T09:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
},
{
"resourceId": "50f15de5-47fc-44d6-9b3c-66cc10522841",
"startDate": "2020-04-01T09:00:00.000Z",
"endDate": "2020-04-01T17:00:00.000Z",
"type": "Work",
"isAvailable": true
},
{
"resourceId": "50f15de5-47fc-44d6-9b3c-66cc10522841",
"startDate": "2020-04-01T17:00:00.000Z",
"endDate": "2020-04-02T09:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
},
{
"resourceId": "50f15de5-47fc-44d6-9b3c-66cc10522841",
"startDate": "2020-04-02T09:00:00.000Z",
"endDate": "2020-04-02T17:00:00.000Z",
"type": "Work",
"isAvailable": true
},
{
"resourceId": "50f15de5-47fc-44d6-9b3c-66cc10522841",
"startDate": "2020-04-02T17:00:00.000Z",
"endDate": "2020-04-03T00:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
}
]
}
{
"resources": "a1a4P00000EqeflQAB",
"startDate": "2020-04-01T00:00:00.000Z",
"endDate": "2020-04-03T00:00:00.000Z",
"isExternalID": true
}
{
"success": true,
"data": [
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-01T00:00:00.000Z",
"endDate": "2020-04-01T09:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-01T09:00:00.000Z",
"endDate": "2020-04-01T17:00:00.000Z",
"type": "Work",
"isAvailable": true
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-01T17:00:00.000Z",
"endDate": "2020-04-02T09:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-02T09:00:00.000Z",
"endDate": "2020-04-02T17:00:00.000Z",
"type": "Work",
"isAvailable": true
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-02T17:00:00.000Z",
"endDate": "2020-04-03T00:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
}
]
}
{
"resources": "a1a4P00000EqeflQAB",
"startDate": "2020-04-01T00:00:00.000Z",
"endDate": "2020-04-03T00:00:00.000Z",
"isDaily": true,
"isExternalID": true
}
{
"success": true,
"data": [
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-01T00:00:00.000Z",
"endDate": "2020-04-01T09:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-01T09:00:00.000Z",
"endDate": "2020-04-01T17:00:00.000Z",
"type": "Work",
"isAvailable": true
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-01T17:00:00.000Z",
"endDate": "2020-04-02T00:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-02T00:00:00.000Z",
"endDate": "2020-04-02T09:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-02T09:00:00.000Z",
"endDate": "2020-04-02T17:00:00.000Z",
"type": "Work",
"isAvailable": true
},
{
"resourceId": "a1a4P00000EqeflQAB",
"startDate": "2020-04-02T17:00:00.000Z",
"endDate": "2020-04-03T00:00:00.000Z",
"type": "_No_Config",
"isAvailable": false
}
]
}