This tool allows you to create service requests in bulk in Oracle Field Service Cloud (OFSC) by reading data from a CSV file.
- .NET 8.0 SDK or higher
- Copy
appsettings.example.jsontoappsettings.jsonand configure your credentials:
{
"clientId": "your_client_id@your_ofsc_instance",
"clientSecret": "your_client_secret",
"endpoint_ofsc_service_requests": "https://your_ofsc_instance.fs.ocs.oraclecloud.com/rest/ofscCore/v1/serviceRequests"
}The input CSV file must contain the following columns:
activityId: Activity ID (integer)requestType: Request type (string, e.g.: "SR1", "IR")
Example (input.example.csv):
activityId,requestType
111473354,SR1
111473355,DRQ
111473356,IRdotnet run <input_file.csv> <output_file.csv>Example:
dotnet run input.csv output_{0}.csvThe {0} placeholder in the output file name will be replaced by a timestamp.
The output CSV file contains the following fields:
activityId: Processed activity IDrequestType: Sent request typerequestId: Created service request ID (if successful)status: Operation status ("Success", "Error XXX", "Exception")errorMessage: Error message (if there was any problem)created: Service request creation date and time (format: YYYY-MM-DD HH:MM:SS)
This tool uses the Oracle Field Service API:
- Endpoint:
POST /rest/ofscCore/v1/serviceRequests - Authentication: Basic Auth (clientId:clientSecret)
- Documentation: https://docs.oracle.com/en/cloud/saas/field-service/cxfsc/op-rest-ofsccore-v1-servicerequests-post.html
- The tool processes requests sequentially with a small delay between each one to avoid overwhelming the API
- Errors are captured and logged in the output file for later review
- The output file is always generated, even if there are errors
- The
datefield is automatically set to today's date (YYYY-MM-DD format) in each request