Create and Run Jobs
You do bulk operation tasks, such as submitting product orders, by creating and running jobs using the bulkJob REST API.
With this API, you can create and submit product orders in bulk across party accounts. To provide the input for creating and running the jobs, you can use the job templates.
Here are some points to consider before you get started with bulk operation tasks:
You must be a back-office specialist to perform this task. See the Create Users and Assign Roles chapter in this guide for more information.
You must integrate Buying Experience with Oracle Content Management (OCM). For instructions, see the Integrate with Oracle Content Management topic in this guide.
Create a folder in Oracle Content Management (OCM) for storing the job templates. You can then add the confidential application that you created in the Oracle Identity Cloud Service as a contributor or owner for the download access.
Download the template named Product Order (Excel file) from My Oracle Support. This template is available in Oracle Digital Experience for Communications Buying Experience (2730574.1) on My Oracle Support at https://support.oracle.com.
Here's how you create and run the job:
-
Create a copy of the job template and enter the information in the Accounts and Product Order worksheets. You need all the fields in both the sheets to run the bulk operation tasks on product orders.
Let's see what you can enter in the Accounts sheet:
-
Owner Account Number: Specify the owner account number.
-
Service Account Number: Specify the service account number.
-
Billing Account Number: Specify the billing account number.
Let's see what you can enter in the Product Order sheet:
-
Sequence: Enter a unique integer value to identify each row in the Product Order Sheet (Subsequent rows have to be populated with integers starting from 1).
-
Action: Enter the type of operation you want to perform on the product offering. Here's the valid value: Add.
-
Product Offering Name: Enter the name of the product offering that you're planning to purchase.
-
Product Offering Type: Enter the type of the product offering for each row entry. Here are the valid Values:
-
Accessory
-
Charge
-
Commercial Bundle
-
Device
-
Package
-
Service Bundle
-
Service
-
-
Is Add On: Specify whether the product offering is an add-on or not. Here are the valid values: Y and N.
Note:All these values are case-sensitive.
-
-
Upload the file to the folder you created in your OCE cloud instance. Ensure that you make note of the unique document ID of the uploaded file. You need it in the later steps.
-
Call the bulkJob API using the input payload provided in the Buying Experience REST API guide. You can run this cURL command or use a REST API client to call the bulkJob API:
curl -H 'Authorization: Bearer <accessToken>' https://<hostName>/cx/industry/bulk-api/v1/bulkJob/ -X POST -H "Content-Type: application/json" -d @sc-data.json
Your payload must include the entity name and document ID of the file you uploaded in step 2.
Here's the sample payload for bulk operations:
{ "entityName": "ProductOrder", "document": { "documentId": "DB14B64C188D90924E926451295F5EDCCD607B5115C7", "version": 1 } }
The version here is optional. If not provided, the application downloads the latest version. You need to provide this value only when you want to download a previous version.
Here's the sample Product Order sheet for the two scenarios supported for bulk operations on product orders:
-
Purchase of a single package: In the Account sheet, you include all the default components for a given package in the product orders for each account entry.
Sequence
Action
Product Offering Name
Product Offering Type
Is Add On
1
Add
Package ABC
Package
N
-
Purchase of a single package with optional root-level product offerings as add-ons (with default quantity as 0): In the Account sheet, you include all the default components of this package, along with optional product offerings as add-ons, in the product orders for each account entry.
Sequence
Action
Product Offering Name
Product Offering Type
Is Add On
1
Add
Package ABC
Package
N
2
Add
Streaming Service 1
Service
Y
3
Add
Voice Roaming
Service
Y
Job Process Flow
The application uses the unique document ID to download the file. It then validates the file type, structure, and file content, and creates the job for running bulk operations job. Once you create the job, the application processes the job asynchronously and sends a response with the basic details. It includes information such as job ID, entity name, created on, status, and file name.
You can also get the status of the jobs you created by calling the get by ID method of the bulkJob API. Once the application processes the job and creates all the orders for the provided accounts, it updates the job with product order IDs. You can then call the bulkJob API using the GET by ID method to view the following job details along with the product order information:
-
jobId
-
entityName
-
createdOn
-
startedOn
-
completedOn
-
status
-
filename
-
result
You can find these details for each account number that you provided in your input. The result is always a link. You can click this link or call the API to get the actual results.