Considerations for splitAssignmentToResourceRequest API
The splitAssignmentToResourceRequest API is a global API that allows you to automate the process of splitting multiple assignments into resource requests.
- The request parameter includes details about the assignments and resource requests. It also provides you with an option to clone skills and schedules from an assignment. If you select additional fields, they will also be included in the request details.
- The response parameter provides information about the assignment and resource request if the splitting process is successful. If any assignments fail to split, the response will include partial success messages for the successfully split records and error messages for the failed records, complete with details on each failed record.
To add additional field details in the request parameter, there is a sequential order to fetch the values in the RequestDetail parameter. The methods required to add additional fields for the splitAssignmentToResourceRequest API are as follows:
| Sl. No. | Class | Name | Function |
|---|---|---|---|
| 1 | SplitAssignmentToResourceRequestRequest | setAdditionalFields | This method allows you to set the additional fields. |
| 2 | SplitAssignmentToResourceRequestRequest | getAdditionalFields | This method allows you to get additional fields. The returned list of AdditionalField must be used to provide values in RequestDetail. |
| 3 | RequestDetail | AdditionalFieldApiWithValues | This property allows you to provide values for the additional fields created using the setAdditionalFields method. |
Depending on the request parameters provided to run the API, the response parameter returns details of the assignment and resource requests if the assignment was split successfully with the success message. The API also returns a partial success message containing the assignment IDs when at least one assignment from the request was split successfully. However, when the following criteria are unmet, the API returns an error message with the assignment IDs in response.
| Request Parameter | Case Scenarios |
|---|---|
| Record-Level Error | |
| Assignment ID | When the Assignment ID in the request parameter is duplicated. |
| Start Date, End Date, and Resource Role | When the mandatory fields Start Date, End Date, and Resource Role values are not specified. |
| Region, Practice, and Group | None of the Region, Practice, or Group values is specified. |
| RPG, Project ID, Resource ID, and Suggested Resource | When either of these request parameters is inactive or invalid. |
| Project and Opportunity |
If both the project and opportunity values are specified, the opportunity in the request is not the same as that on the project. |
| Currency | If the additional field contains the currency and its value differs from the currency on the project. |
| Requested Hours | When the value in requested hours is less than zero. |
| Start Date | When the resource request's start date exceeds the assignment's end date or is outside the assignment's start and end date range. |
| Additional Field (Date Type) | When a Date type field is added in the Additional Field, the date format does not match YYYY-MM-DD. |
| Additional Field (Datetime Type) | When a Datetime type field is added in the Additional Field, the datetime value format does not match YYYY-MM-DD HH:MM:SS. |
| Timecard and Expense | When an assignment is already associated with a timecard or expense for the specified start date. |
| Global Error | |
| Request Details | When there is no value specified in the request parameter. |
| Permission-Related Error | When FLS permission is missing for splitting the assignment to the resource request. |
| Additional Field | When fields added in the Additional Field Set are duplicated in the request parameter. |
This API considers the following scenarios:
- Auto calculates the requested hours using the start date and end date of the assignment.
- If the CloneSchedule property is set to true for the new resource request, the preferred schedule for the new resource request is similar to the assignment's existing schedule.
- If the resource request's end date exceeds the assignment's end date, the new schedule considers the current assignment's end date. However, the new resource request has the end date added in the request parameter.
- If the CloneSkills property is set to true and there are skills associated with the resource request on the assignment, the skills are cloned.
SECTIONS