post https://{hostname}/api/v1/work/team_segments/multi_upsert
This operation creates or updates activity team segments from a third party source for multiple teams.
Service limit
A service limit constrains the number of identifiers and teams that can be processed in a single request.
- The Number of Identifiers and Teams cannot exceed 25.
Refer to the Limits topic for more information.
The associated Access Control Points are WFA_WORK_INTEGRATION_API, WFA_EDIT_TEAM_ACTIVITY_EVENTS, WFA_ACCEPT_TEAM_ACTIVITY_EVENTS, and WFA_REMOVE_ACCEPTANCE_TEAM_ACTIVITY_EVENTS.
Example call
In this operation's request, you must specify an ID or qualifier for an existing activity team segment to perform an update. If no existing activity team segment is specified, the passed activity team segment will be created.
Example request
[
{
"teamSegment": {
"team": {
"id": 1,
"qualifier": "Team A"
},
"activity": {
"id": 201,
"qualifier": "ActivityDump1"
},
"startTimezone": {
"id": -10,
"qualifier": "UTC"
},
"endTimezone": {
"id": -10,
"qualifier": "UTC"
},
"laborCategories": [
{
"laborCategoryDef": {
"id": 9,
"qualifier": "Contract Code"
},
"laborCategoryEntry": {
"id": 56,
"qualifier": "Fed-101"
}
},
{
"laborCategoryDef": {
"id": 10,
"qualifier": "Project Code"
},
"laborCategoryEntry": {
"id": 63,
"qualifier": "Cargo 1"
}
},
{
"laborCategoryDef": {
"id": 11,
"qualifier": "Shift"
},
"laborCategoryEntry": {
"id": 151,
"qualifier": "Afternoon Shift"
}
}
],
"costCenter": {
"id": 1,
"qualifier": "CC_Production"
},
"workRule": {
"id": 67,
"qualifier": "Admin Assistant"
},
"orgJob": {
"id": 514,
"qualifier": "Acme Company/System Administrator"
},
"emptyTransfer": false,
"direct": true,
"eventType": {
"id": 0
},
"closable": false,
"startDateTime": "2021-08-19T01:00:00",
"endDateTime": "2021-08-19T04:00"
},
"acceptAction": "ACCEPT",
"teamResults": [
{
"fieldDefinition": {
"id": 3,
"qualifier": "Scrapped Units"
},
"resultCode": {
"id": 8,
"qualifier": "No"
}
},
{
"fieldDefinition": {
"qualifier": "Scrapped Units"
},
"resultCode": {
"qualifier": "Yes"
},
"childResults": [
{
"fieldDefinition": {
"id": -29
},
"decimalResult": 1.0
},
{
"fieldDefinition": {
"qualifier": "Failure Code"
},
"resultCode": {
"qualifier": "QMAT"
}
},
{
"fieldDefinition": {
"qualifier": "Details"
},
"textResult": "1"
}
]
}
]
}
]
Example response
[
{
"teamSegment": {
"id": 171,
"team": {
"id": 1,
"qualifier": "Team A"
},
"activity": {
"id": 201,
"qualifier": "ActivityDump1"
},
"dataSource": {
"id": 5803,
"qualifier": "Princeton, Charles",
"displayName": "Team Segment Editor",
"functionalAreaName": "CharlesPrinceton/Team Segment Editor",
"name": "Princeton, Charles"
},
"startDateTime": "2021-08-19T01:00:00",
"endDateTime": "2021-08-19T04:00:00",
"startTimezone": {
"id": -10,
"qualifier": "UTC"
},
"endTimezone": {
"id": -10,
"qualifier": "UTC"
},
"laborCategories": [
{
"laborCategoryDef": {
"id": 9,
"qualifier": "Contract Code"
},
"laborCategoryEntry": {
"id": 56,
"qualifier": "Fed-101"
}
},
{
"laborCategoryDef": {
"id": 10,
"qualifier": "Project Code"
},
"laborCategoryEntry": {
"id": 63,
"qualifier": "Cargo 1"
}
},
{
"laborCategoryDef": {
"id": 11,
"qualifier": "Shift"
},
"laborCategoryEntry": {
"id": 151,
"qualifier": "Afternoon Shift"
}
}
],
"costCenter": {
"id": 1,
"qualifier": "CC_Production"
},
"workRule": {
"id": 67,
"qualifier": "Admin Assistant"
},
"orgJob": {
"id": 514,
"qualifier": "Acme Company/System Administrator"
},
"emptyTransfer": false,
"direct": true,
"eventType": {
"id": 0
},
"createdDateTime": "2021-12-21T06:18:23",
"updatedDateTime": "2021-12-21T06:18:23",
"missingResults": false,
"mismatchedResults": true,
"accepted": true,
"closable": false,
"deleted": false
},
"teamResults": [
{
"id": 87,
"activityTeamSegmentId": 171,
"fieldDefinition": {
"id": 3,
"qualifier": "Scrapped Units"
},
"resultCode": {
"id": 8,
"qualifier": "No"
},
"createdDateTime": "2021-12-21T06:18:23",
"updatedDateTime": "2021-12-21T06:18:23",
"dataSource": {
"id": 5803,
"qualifier": "Princeton, Charles",
"displayName": "Team Segment Editor",
"functionalAreaName": "CharlesPrinceton/Team Segment Editor",
"name": "Princeton, Charles"
},
"effectiveDateTime": "2021-12-21T06:18:23"
},
{
"id": 88,
"activityTeamSegmentId": 171,
"fieldDefinition": {
"id": 3,
"qualifier": "Scrapped Units"
},
"resultCode": {
"id": 9,
"qualifier": "Yes"
},
"createdDateTime": "2021-12-21T06:18:23",
"updatedDateTime": "2021-12-21T06:18:23",
"dataSource": {
"id": 5803,
"qualifier": "Princeton, Charles",
"displayName": "Team Segment Editor",
"functionalAreaName": "CharlesPrinceton/Team Segment Editor",
"name": "Princeton, Charles"
},
"effectiveDateTime": "2021-12-21T06:18:23",
"childResults": [
{
"id": 89,
"activityTeamSegmentId": 171,
"fieldDefinition": {
"id": -29,
"qualifier": "_Quantity Scrapped"
},
"decimalResult": 1.0,
"createdDateTime": "2021-12-21T06:18:23",
"updatedDateTime": "2021-12-21T06:18:23",
"dataSource": {
"id": 5803,
"qualifier": "Princeton, Charles",
"displayName": "Team Segment Editor",
"functionalAreaName": "CharlesPrinceton/Team Segment Editor",
"name": "Princeton, Charles"
},
"effectiveDateTime": "2021-12-21T06:18:23"
},
{
"id": 90,
"activityTeamSegmentId": 171,
"fieldDefinition": {
"id": 4,
"qualifier": "Failure Code"
},
"resultCode": {
"id": 10,
"qualifier": "QMAT"
},
"createdDateTime": "2021-12-21T06:18:23",
"updatedDateTime": "2021-12-21T06:18:23",
"dataSource": {
"id": 5803,
"qualifier": "Princeton, Charles",
"displayName": "Team Segment Editor",
"functionalAreaName": "CharlesPrinceton/Team Segment Editor",
"name": "Princeton, Charles"
},
"effectiveDateTime": "2021-12-21T06:18:23"
},
{
"id": 91,
"activityTeamSegmentId": 171,
"fieldDefinition": {
"id": 5,
"qualifier": "Details"
},
"textResult": "1",
"createdDateTime": "2021-12-21T06:18:23",
"updatedDateTime": "2021-12-21T06:18:23",
"dataSource": {
"id": 5803,
"qualifier": "Princeton, Charles",
"displayName": "Team Segment Editor",
"functionalAreaName": "CharlesPrinceton/Team Segment Editor",
"name": "Princeton, Charles"
},
"effectiveDateTime": "2021-12-21T06:18:23"
}
]
}
]
}
]