Bulk update activities
/rest/ofscCore/v1/activities/custom-actions/bulkUpdate
This operation is used to synchronize data from an external system to Oracle Field Service. The operation performs the following actions:
- Attempts to find an activity in Oracle Field Service based on the key fields provided in the request. Note that past activities (on yesterday and earlier) are not visible for the function.
- Creates a new activity, if no match is found or updates the existing activity, if a match is found.
- Updates the related objects of an activity, if the objects are present in the request. The following objects are updated:
- Customer inventories
- Required inventories
- Resource preferences
- Activity links
The updates are made in the order of the activity items in the request.
This operation is executed as multiple transactions where in each transaction may succeed or fail. The response contains a list of results which includes the success or failure of each transaction and the reason for failure (if applicable).
Restrictions:
Moving between dates is supported only for individual segments of a segmentable activity. This function doesn't support moving a whole segmentable activity to a new date.
The following restrictions apply while updating multiple activities simultaneously:
- Maximum size of the decoded HTTP request is 5 MB.
- File properties cannot be set.
Request
objectBulk Update Request-
activities(required):
array Activities
Title:
ActivitiesThe list of activity properties. -
updateParameters(required):
object Bulk Update Parameters
Title:
Bulk Update ParametersThe parameters that determine the action to be performed on an existing activity in Oracle Field Service.
arrayActivitiesobjectBulk Update Parameters-
fallbackResourceId:
string
Title:
Fallback Resource IDThe resource ID used as a spare resource, if assigning an activity to a specified resource fails during activity creation. -
identifyActivityBy:
string
Title:
identifyActivityByAllowed Values:[ "activityId", "apptNumber", "apptNumberPlusCustomerNumber", "apptNumberPlusIbAssetId" ]The logic used to identify the items in the 'activities' array.
- If the value of the parameter is 'activityId', then each activity item in the 'activities' array has to contain an 'activityId' field.
- If the 'activityId' field is specified, but activity with the same ID is not found in Oracle Field Service, then the 'Not found' error is returned for the activity item.
- If an activity is found, then the existing activity is updated.
- To make sure a new activity is created, you can set activityId to null.
- If the value of the parameter is 'apptNumber', then each activity item in the 'activities' array has to contain an 'apptNumber' field.
- If the 'apptNumber' field is specified, but activity with the same apptNumber is not found in Oracle Field Service, then a new activity is created with the specified apptNumber.
- If an activity is found, then the existing activity is updated.
- If the value of the parameter is 'apptNumberPlusCustomerNumber', then each activity item in the 'activities' array has to contain the 'apptNumber' and 'customerNumber' fields.
- If both the fields are specified, but activity with the same apptNumber and customerNumber is not found in Oracle Field Service, then a new activity is created with the specified fields.
- If an activity is found, then the existing activity is updated.
- If the value of the parameter is 'activityId', then each activity item in the 'activities' array has to contain an 'activityId' field.
-
ifExistsThenDoNotUpdateFields:
array If Exists Then Do Not Update Fields
Title:
If Exists Then Do Not Update FieldsThe fields are not updated, if the activity already exists in Oracle Field Service. -
ifInFinalStatusThen(required):
string
Title:
If In Final Status ThenAllowed Values:[ "doNothing", "createNew", "updateExisting" ]The parameter specifies the action to be performed for an existing activity with the final status. Activity in a final status means that the activity exists in Oracle Field Service and can have one of the following statuses, 'completed', 'cancelled', 'notDone'. Note that past activities are not visible for the function and not considered as "existing" in this context.'doNothing' means that the API should not perform any actions when an activity is found with a final status.
'createNew' means that the API should ignore the existing activity and create a new one, when an activity is found with a final status. 'The parameter cannot be set to 'createNew' when the 'identifyActivityBy' parameter is set to 'activityId'.
'updateExisting' means that the API should update an existing activity, when an activity is found with a final status.
-
inventoryPropertiesUpdateMode:
string
Title:
Inventory Properties Update ModeAllowed Values:[ "keepProperties", "eraseProperties" ]The processing mode for updating the properties of each inventory item in the 'inventories' array. The possible values of this parameter are:
- keepProperties: The specified inventory properties are updated and the properties that are not specified are retained.
- eraseProperties: The specified inventory properties are replaced and the properties that are not specified are erased. This is the default value of the parameter.
object-
activityId:
integer
Title:
Activity IDThe unique identifier of the activity in Oracle Field Service. -
date:
string
Title:
DateThe date for which the activity is scheduled. If a Null value is specified, then it means that the activity is not scheduled for any date. -
inventories:
object Customer Inventories
Title:
Customer InventoriesThe collection of customer inventories assigned to the activity. -
linkedActivities:
object Linked Activities
Title:
Linked ActivitiesThe array of linked activity objects which contain the link direction keys for the linked activity key fields and are defined in the identifyActivityBy and link type parameters. Note that activities in the past may only be used in links if "activityId" is specified for the identifyActivityBy. -
requiredInventories:
object Required Inventories of Activity
Title:
Required Inventories of ActivityThe schema of the request body object for this operation. -
resourceId:
string
Title:
Resource IDThe resource ID to which the activity is assigned. -
resourcePreferences:
object Resource Preferences
Title:
Resource PreferencesThe collection of resource preferences that can be assigned to an activity.
-
object
Activity Properties
Title:
Activity PropertiesThe properties of the specified activity.
objectCustomer InventoriesobjectLinked Activities-
items:
array Items
Title:
ItemsThe list of linked activity objects for the linked activity key fields.
objectRequired Inventories of Activity-
items:
array Items
Title:
ItemsThe collection of required inventories for the specified activity.
objectResource Preferences-
items:
array Items
Title:
ItemsThe array of required preferences for the specified activity.
objectActivity Properties-
accessSchedule:
string
Title:
Access ScheduleThe schedule (that is, the set of time intervals or access hours, two intervals per week day) when the asset or the activity location is accessible. Work must start and complete during this interval. It is generally not possible to work beyond the access hours. Maximum field length is 1020.Access Schedule Field Format
This field is a string, which contains an inner json object (encoded as a string). For example, "accessSchedule": "{\"schedule\":[{\"daysOfWeek\":[\"Mon\",\"Tue\"],\"hours\":[[\"07:00\",\"12:00\"]]}]}"The inner json object has the following schema:
{
"type": "object",
"properties": {
"schedule": {
"type": "array",
"items": {
"type": "object",
"properties": {
"daysOfWeek": {
"type": "array",
"items": {
"type": "string",
"enum": [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" ]
}
},
"hours": {
"type": "array",
"items": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
},
"exceptDates": {
"type": "array",
"items": { "type": "string" }
}
}
} -
activityFlow:
string
Title:
Activity FlowActivity flow label -
activityType:
string
Title:
Activity TypeThe label of the activity type. Based on the activity type, predefined company-specific rules are applied while processing an activity. Predefined company-specific rules cover the following:
- The resources to which the activities can be assigned.
- The activity processing details.
- The interaction of the activity with different modules of Oracle Field Service.
-
apptNumber:
string
Title:
Appt NumberThis field may be used by integrations to store the identifier of the activity in the origin system. This field has no business significance in Oracle Field Service and may be left empty. Maximum field length is 40. -
city:
string
Title:
CityThe city of the customer where the activity is scheduled. This field is used for geocoding and must contain a valid address. Maximum field length is 60. If a longer value is sent it will be truncated. -
country_code:
string
Title:
Country CodeThe code of the country where the activity is scheduled. -
customerCell:
string
Title:
Customer CellThe customer's cell phone number. From version 17.2.1, the phone number is saved in Oracle Field Service with the '+' symbol. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342. In versions before 17.2.1, the phone number is saved as 12342342342. Maximum field length is 240. If a longer value is sent it will be truncated. -
customerEmail:
string
Title:
Customer EmailThe email address of the customer. Maximum field length is 320. If a longer value is sent it will be truncated. -
customerName:
string
Title:
Customer NameThe name of the customer. Maximum field length is 420. If a longer value is sent it will be truncated. -
customerNumber:
string
Title:
Customer NumberThe account number of the customer. This parameter is used by integrations as a placeholder for the external identifier of the Account ID in the application. This parameter has no business significance in Oracle Field Service and can be left empty. Maximum field length is 40. If a longer value is sent it will be truncated. -
customerPhone:
string
Title:
Customer PhoneThe regular (land) phone number of the customer. From version 17.2.1, the phone number is saved in Oracle Field Service with the '+' symbol. For example, if you enter the phone number as +1(234)234-23_42, it is saved in Oracle Field Service as +12342342342. In versions before 17.2.1, the phone number is saved as 12342342342. Maximum field length is 240. If a longer value is sent it will be truncated. -
duration:
integer
Title:
DurationEstimated activity duration in minutes. The duration specified in request will only be applied if the 'Calculate activity duration using statistics' checkbox is unchecked for the Activity Type of the activity being created/updated. For segmentable activities this field is only used when a new activity is created. To change the length of the segmentable activities use the field "multidayTimeToComplete" instead. -
ibAssetId:
integer
Title:
ibAsset IdThe identifier of the installed based asset the activity is linked to. Optional field. Foreign key to CSE_ASSETS_B.ASSET_ID in Fusion. -
language:
string
Title:
LanguageThe preferred language of the customer. This parameter returns two-character code (e.g. "en") in API responses. To obtain ISO code of the language (e.g. "en-US") read the "languageISO" parameter. In the requests this parameter accepts both formats (e.g. "en" or "en-US"). It is recommended to use ISO format. The language codes listed on: Supported Language Codes. -
languageISO:
string
Title:
Language ISOThe preferred language of the customer. This parameter is only present in the responses and will be ignored if it is present in a request. To update language use the parameter "language". The language codes listed on: Supported Language Codes. -
latitude:
number
Title:
LatitudeMinimum Value:-90Maximum Value:90The geographic coordinates that specify the location of the activity. -
longitude:
number
Title:
LongitudeMinimum Value:-180Maximum Value:180The geographic coordinates that specify the location of the activity. -
multidayActivityStatus:
string
Title:
Segmentable Activity StatusThe status of the segmentable activity. Considered only if passed along with segment data, otherwise ignored. -
multidayTimeToComplete:
integer
Title:
Time To Complete a Segmentable ActivityThe total duration of the segmentable activity. This parameter is ignored for non-segmentable activities. When master activity gets a final status (multidayActivityStatus is set to completed, notdone or cancelled) the parameter multidayTimeToComplete is also ignored and the remaining time is set to 0. Maximum value is 599995. -
pjfProjectElementId:
integer
Title:
pjfProject Element IdThe identifier of the project task the activity is linked to. Optional field. Foreign key to PJF_PROJ_ELEMENTS_B.PROJ_ELEMENT_ID in Fusion. -
pjfProjectId:
integer
Title:
pjfProject IdThe identifier of the project the activity is linked to. Optional field. Foreign key to PJF_PROJECTS_ALL_B.PROJECT_ID in Fusion. -
points:
integer
Title:
PointsMinimum Value:0Maximum Value:65535The cost of the activity in 'points'. This parameter is intended for use by the Routing module. -
postalCode:
string
Title:
Postal CodeThe postal code of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 60. If a longer value is sent it will be truncated. -
reminderTime:
integer
Title:
Reminder TimeThe number of minutes before the activity start time the customer must be notified of the activity. -
serviceWindowEnd:
string
Title:
Service Window EndThe time when the service window ends for the activity. The time is displayed in 'HH:MM:SS' format.If the activity type feature 'SLA and Service window use customer time zone' is enabled, then the service window is accepted in the time zone of the customer. If it is not enabled, then the Service Window is accepted in the time zone of the resource to which the activity is currently assigned.
If the activity is later assigned to another resource and the activity type feature 'SLA and Service window use customer time zone' is enabled, then the Service Window is recalculated so that the fields are not changed in the customer's time zone, but they are changed in the time zone of the new resource.
-
serviceWindowStart:
string
Title:
Service Window StartThe time when the service window starts for the activity. The time is displayed in 'HH:MM:SS' format.If the activity type feature 'SLA and Service window use customer time zone' is enabled, then the service window is accepted in the time zone of the customer. If it is not enabled, then the Service Window is accepted in the time zone of the resource to which the activity is currently assigned.
If the activity is later assigned to another resource and the activity type feature 'SLA and Service window use customer time zone' is enabled, then the Service Window is recalculated so that the fields are not changed in the customer's time zone, but they are changed in the time zone of the new resource.
-
setPositionInRoute:
object Set Position in Route
Title:
Set Position in RouteThe value of this element determines the position of the activity in the route. If this element is present then activity will be put to specified position in route. The parameter is optional, if it is absent then the value "position: byServiceWindow" is used. -
setTravelTime:
object Set Travel Time
Title:
Set Travel TimeThe objects used to set the travel time of the activity. The travel time is set only if the specified previousActivity/previousActivityId is ordered before the activity for which the travel time is set. -
slaWindowEnd:
string
Title:
Sla Window EndThe time when the service level agreement (SLA) window ends. The time is displayed in 'YYYY-MM-DD HH:MM:SS' format.
If the activity type feature 'SLA and Service window use customer time zone' is enabled, then the SLA is accepted in the time zone of the customer. If it is not enabled, then the SLA is accepted in the time zone of the resource to which the activity is currently assigned.
If the activity is later assigned to another resource and the activity type feature 'SLA and Service window use customer time zone' is enabled, then the SLA is recalculated so that the fields are not changed in the customer's time zone, but they are changed in the time zone of the new resource.
-
slaWindowStart:
string
Title:
Sla Window StartThe time when the service level agreement (SLA) window starts. The time is displayed in 'YYYY-MM-DD HH:MM:SS' format.
If the activity type feature 'SLA and Service window use customer time zone' is enabled, then the SLA is accepted in the time zone of the customer. If it is not enabled, then the SLA is accepted in the time zone of the resource to which the activity is currently assigned.
If the activity is later assigned to another resource and the activity type feature 'SLA and Service window use customer time zone' is enabled, then the SLA is recalculated so that the fields are not changed in the customer's time zone, but they are changed in the time zone of the new resource.
-
stateProvince:
string
Title:
State ProvinceThe state or province of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 60. If a longer value is sent it will be truncated. -
status:
string
Title:
StatusAllowed Values:[ "cancelled", "completed", "suspended", "started", "pending", "notdone" ]The status of the activity. As a technician works through the activity, the status changes. The actions that are available for an activity are based on this status.
A newly created activity has the status as 'pending', it can then be changed to 'cancelled' or 'started'. The status of an activity can be changed to 'complete', 'notdone', or 'suspended' only if it has the status as 'started'.
-
streetAddress:
string
Title:
Street AddressThe street address of the customer. This field is used for geocoding and must contain a valid address. Maximum field length is 240. If a longer value is sent it will be truncated. -
svcWorkOrderId:
integer
Title:
svcWorkOrder IdThe identifier of the fusion service work order the activity is linked to. Optional field. Foreign key to SVC_WORK_ORDERS.WO_ID in Fusion. -
teamResourceId:
string
Title:
Team Resource IDThe identifier of the team resource for a teamwork activity. -
timeDeliveredEnd:
string
Title:
Time Delivered EndThe end time of the technician's arrival interval as communicated to the customer. The value is used by routing optimization engine to reduce changes to arrival time, so it is important to keep the value actual. This time is displayed in 'YYYY-MM-DD HH:MM:SS' format in the time zone of the resource to which the activity is assigned. -
timeDeliveredStart:
string
Title:
Time Delivered StartThe start time of the technician's arrival interval as communicated to the customer. The value is used by routing optimization engine to reduce changes to arrival time, so it is important to keep the value actual. This time is displayed in 'YYYY-MM-DD HH:MM:SS' format in the time zone of the resource to which the activity is assigned. -
timeOfBooking:
string
Title:
Time of BookingThe time when the customer booked the activity. The time is displayed in the time zone of the customer. -
timeSlot:
string
Title:
Time SlotThe time slot during which the activity is completed. Time Slot also indicates the service window for the activity. This time is displayed in the time zone of the resource to which the activity is assigned. -
timeZone:
string
Title:
Time ZoneThe name of the customer's time zone. This parameter accepts both Oracle Field Service time zone names (for example, Eastern) and IANA standard time zone names (for example, America/New_York). It is recommended that you specify IANA names. For a list of supported time zones, see Supported Time Zones.This parameter is optional and defaults to the time zone of the resource to which the activity is assigned.
Zones. -
wieWorkOrderId:
integer
Title:
wieWorkOrder IdThe identifier of the maintenance work order the activity is linked to. Optional field. Foreign key to WIE_WORK_ORDERS_B.WORK_ORDER_ID in Fusion. -
wieWorkOrderOperationId:
integer
Title:
wieWorkOrderOperation IdThe identifier of the maintenance work order operation the activity is linked to. Optional field. Foreign key to WIE_WO_OPERATIONS_B.WO_OPERATION_ID in Fusion.
array-
Array of:
object Inventory
Title:
InventoryThe inventory that is installed or deinstalled at the customer's site during an activity, including custom properties
objectInventoryobjectInventory-
activityId:
integer
Title:
Activity IDThe activity ID to which the inventory is assigned.If the status for the inventory is set to resource, then the activity ID is not returned.
-
exchangedInventoryId:
integer
Title:
Exchanged Inventory IDThe inventory ID that is returned when the resource exchanges an inventory with another resource. -
inventoryId:
integer
Title:
Inventory IDThe unique identifier of the inventory in Oracle Field Service. -
inventoryType:
string
Title:
Inventory TypeThe inventory type specified in the request. -
quantity:
number
Title:
QuantityThe quantity of inventory specified in the request. -
resourceId:
string
Title:
Resource IDThe resource ID to which the inventory is assigned or the resource ID to which the activity (that has the inventory assigned to it) is assigned. -
serialNumber:
string
Title:
Serial NumberThe serial number specified in the request.
arrayItemsobject-
fromActivity:
object Activity Link
Title:
Activity LinkThe link between the activity key fields and the link properties. -
toActivity:
object Activity Link
Title:
Activity LinkThe link between the activity key fields and the link properties.
objectActivity Link-
activityId:
integer
-
apptNumber:
string
-
customerNumber:
string
-
linkType:
string
Title:
Link TypeThe type of the link between activities.The link types must be configured in the Oracle Field Service Manage application. The label (but not the "reverseLabel") of a link template to be used to link the activities. It is referred as "Link to the second activity" in the Link templates configuration in the Oracle Field Service application.
-
maxIntervalValue:
integer
Minimum Value:
0Maximum Value:65535The maximum time interval (in minutes) between subsequent linked activities, for the links that define the relative order of the activities. This parameter can only be sent if it is configured as "Adjustable" in the link template configuration. If the parameter is missing in the request, the value from the template wil be used. -
minIntervalValue:
integer
Minimum Value:
0Maximum Value:65535The minimum time interval (in minutes) between subsequent linked activities, for the links that define the relative order of the activities. This parameter can only be sent if it is configured as "Adjustable" in the link template configuration. If the parameter is missing in the request, the value from the template wil be used.
arrayItems-
Array of:
object Required Inventory
Title:
Required InventoryThe array of required inventory item objects assigned to the specified activity.
objectRequired Inventory-
inventoryType(required):
string
Title:
Required Inventory TypeThe required inventory type for the specified activity. -
model(required):
string
Title:
Required Inventory ModelThe required inventory model for the specified activity. -
quantity(required):
number
Title:
Required Inventory QuantityThe required quantity of inventory for the specified activity.
arrayItems-
Array of:
object Resource Preference
Title:
Resource PreferenceThe resource preference of an activity.
objectResource Preference-
preferenceType(required):
string
Title:
Preference TypeAllowed Values:[ "required", "preferred", "forbidden", "warehouse" ]The type of resource preference for the activity.- preferred - the resource is preferred while routing.
- required - the activity can only be assigned to a required resource.
- forbidden - the activity cannot be assigned to the specified resource.
- warehouse - inventory may be installed from the specified resource
-
resourceId:
string
Title:
Resource IDThe unique identifier of the resource in Oracle Field Service.
objectSet Position in Route-
activityId:
integer
Title:
Activity IDThe unique identifier of some pending ordered activity in the target route. It is used along with the 'afterActivity' value of the 'position' parameter so that to put one activity in the position after another. -
position(required):
string
Title:
PositionAllowed Values:[ "first", "last", "notOrdered", "byServiceWindow", "afterActivity" ]The position of the activity in the route.
objectSet Travel Time-
position(required):
string
Title:
PositionAllowed Values:[ "first", "afterActivity" ]The expected position of the activity in a route.To adjust the travel time of an activity, specify the location from where the travel is starting. The location can be the start of the route or another activity. This information is used when activities are reordered or moved while performing a sequence of operations.
-
previousActivity:
object Previous Activity
Title:
Previous ActivityThe objects in this array are used instead of the 'previousActivityId' parameter to find activities when internal IDs cannot be used. For example, it is used for the bulkUpdate operation.The 'previousActivity' activity array contains two items: 'apptNumber' and 'customerNumber'. The parameter 'apptNumber' is mandatory. The parameter 'customerNumber' is only required when the 'bulkUpdate/identifyActivityBy' option is set to 'apptNumberPlusCustomerNumber'.
The operation returns an error if the system is unable to find any activity using the specified 'apptNumber' and 'customerNumber' values.
-
previousActivityId:
integer
Title:
Previous Activity IDThe identifier of a previous activity that requires travel time calculation.If an activity doesn't require traveling (for example, calling your manager), then the identifier of the activity cannot be used as the 'Travel previous activity ID'. In such case, it is assigned to an ID of a previous activity that required travel.
This parameter is mandatory when the value of the parameter 'position' is 'afterActivity'.
Note: The operation does not return any error if the adjustment cannot be made because the specified 'previousActivityId' doesn't correspond to a real-time activity. This can be detected by verifying the 'travelTime' value returned.
-
source:
string
Title:
SourceAllowed Values:[ "manual", "external" ]The origin of the travel time data. The following are the allowed values:- manual - indicates that the travel time value is entered manually by a user.
- external - indicates that the travel time value is estimated based on the statistics or street-level routing service results.
-
travelTime(required):
integer
Title:
Travel TimeMinimum Value:0Maximum Value:65535The travel time for the specified activity.
objectPrevious ActivityThe 'previousActivity' activity array contains two items: 'apptNumber' and 'customerNumber'. The parameter 'apptNumber' is mandatory. The parameter 'customerNumber' is only required when the 'bulkUpdate/identifyActivityBy' option is set to 'apptNumberPlusCustomerNumber'.
The operation returns an error if the system is unable to find any activity using the specified 'apptNumber' and 'customerNumber' values.
arrayIf Exists Then Do Not Update Fields-
Array of:
string
Title:
Property NameThe activity property name that need not be updated.
Response
- application/json
200 Response
objectBulk update response-
results:
array Results
Title:
ResultsThe list of results in the order of the activity items in the request.
arrayResults-
Array of:
object Result
Title:
ResultThe result item of the Bulk Update operation.
objectResult-
activityKeys:
object Activity Keys
Title:
Activity KeysThe activity key fields used to create or update the activity. If the key fields are not known, then the list is not returned. For example, the Bulk Update operation is not successful, if a key field is not specified. -
errors:
array Errors
Title:
ErrorsThe list of errors that occurred during the Bulk Update operation. -
operationsFailed:
array Operations Failed
Title:
Operations FailedThe failed operations during the Bulk Update operation. -
operationsPerformed:
array Operations Performed
Title:
Operations PerformedThe successful operations during the Bulk Update operation. -
warnings:
array Warnings
Title:
Warnings
objectActivity Keys-
activityId:
string
Title:
Activity IDThe unique identifier of the activity in Oracle Field Service. -
apptNumber:
string
Title:
Appt NumberThis field may be used by integrations to store the identifier of the activity in the origin system. This field has no business significance in Oracle Field Service and can be left empty. Maximum field length is 40. -
customerNumber:
string
Title:
Customer NumberThe account number of the customer. This field is used by integrations as a placeholder for the external identifier of the Account ID in the application. This parameter has no business significance in Oracle Field Service and can be left empty. Maximum field length is 40. -
ibAssetId:
integer
Title:
IB Asset IdIB Asset Id in Fusion environment
arrayErrors-
Array of:
object Error
Title:
ErrorAn object containing details of the specific failed operation.
arrayOperations Failed-
Array of:
string
Title:
OperationThe name of the failed operation.
arrayOperations Performed-
Array of:
string
Title:
OperationThe name of the successful operation.
arrayWarnings-
Array of:
object Warning
Title:
WarningAn objected that represents a particular warning.
objectError-
errorDetail:
string
Title:
Error detailThe details of the error. -
operation:
string
Title:
OperationThe operation that caused the error.
objectWarning-
code:
integer
Title:
Warning's codeThe code of the warning. -
message:
string
Title:
Warning's messageThe description of the warning.
Default Response
object-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to bulk update activities by submitting a POST request on the REST resource using cURL.
Note:
This request creates a new activity with apptNumber="XS3453456" if it doesn't exist (if the activity is not marked for the same day or future, it will not be recognized as existing by the system). If the activity with apptNumber "XS3453456" exists in the system (if the activity is marked for the same day or for a future day) it will be updated, unless it is in the status 'completed' (which means no changes will be performed according to the "ifInFinalStatusThen": "doNothing" option).The request also updates the activity with the list of customer inventories (in the Inventories section), list of required inventories for that activity ("requiredInventories" section), creates links to other activities ("linkedActivities" section), and updates resource preference information ("resourcePreferences" section).
- for the "fromActivity" item: A link is created from the activity "A0001" to the activity "XS3453456" with the link type "start-after". This indicates that the activity "XS3453456" should be started after the activity "A0001".
- for the "toActivity" item: A link is created from the activity "XS3453456" to an activity "B0002" with the link type "start-after". This indicates that the activity "B0002" should be started after the activity "XS3453456".
curl -X 'POST' \
-u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
-H 'Content-Type: application/json' \
--data-binary '{
"updateParameters": {
"identifyActivityBy": "apptNumber",
"ifInFinalStatusThen": "doNothing"
},
"activities": [
{
"apptNumber": "XS3453456",
"resourceId": "33011",
"date": "2017-06-09",
"activityType": "9",
"timeZone": "America/New_York",
"language": "en-US",
"inventories": {
"items": [
{
"inventoryType": "RG6BLK",
"inventory_model": "Z222",
"quantity": 10
},
{
"inventoryType": "RG6BLK",
"inventory_model": "X333",
"quantity": 5
}
]
},
"requiredInventories": {
"items": [
{
"inventoryType": "NS",
"model": "A22",
"quantity": 10
},
{
"inventoryType": "NS",
"model": "B22",
"quantity": 10
}
]
},
"linkedActivities": {
"items": [
{
"fromActivity": {
"apptNumber": "A0001",
"linkType": "start-after"
}
},
{
"toActivity": {
"apptNumber": "B0002",
"linkType": "start-after"
}
}
]
},
"resourcePreferences": {
"items": [
{
"resourceId": "testActivityCustomAcQYNWZCUYYP",
"preferenceType": "preferred"
},
{
"resourceId": "testActivityCustomAcCKIVJZFSSB",
"preferenceType": "preferred"
}
]
}
}
]
}'
https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/activities/custom-actions/bulkUpdate'
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx/1.2.7 Date: Fri, 18 Mar 2016 02:26:36 GMT Content-Type: application/json; charset=utf-8 Connection: close
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"results": [
{
"operationsPerformed": [
"updateProperties"
],
"activityKeys": {
"activityId": 4225270,
"apptNumber": "testApptNumber",
"customerNumber": ""
}
}
],
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore//v1/activities/custom-actions/bulkUpdate"
}
]
}