# Create and process bulks with SAP ODM using CDQ services. **Overview** This guide provides a step-by-step process on how to interact with the SAP ODM using CDQ services. It covers how to create and process data in bulk, specifically focusing on bulk lookup and bulk fetch operations. The provided instruction is based on below API documentation: 1. [Bulk Fetch](/apis/sap-odm-api/api-v3/bulk-fetch) 2. [Bulk Lookup](/apis/sap-odm-api/api-v3/bulk-lookup) **Scenario** In this instruction you will learn how to: 1. Create a Bulk Lookup and Read a Bulk Lookup, 2. Create a Bulk Fetch and Read a Bulk Fetch, 3. Handle response statuses. ## Step 1: Create a Bulk Lookup To create a bulk lookup, you need to send a request to the SAP ODM using the **Create Bulk Lookup** endpoint. The request should contain the tasks you want to perform in bulk. 1. Use the **Create Bulk Lookup** endpoint to send the request, 2. Select the **Create Bulk Business Partner Lookup with Tasks** example, 3. Click the **Send** button. 1. Check the details of the response. If the response status is 200, you will receive a response similar to the below example: ```json { "id": "065fda25-e594-4472-a5fc-f51c38f2f40e", "createdAt": "2024-02-23T10:49:09.651857409Z", "createdBy": "f1241873-7f01-41fa-b1c5-e747b630da61", "status": { "technicalKey": "RUNNING" }, "featuresOn": ["SHOW_DEBUG_INFO"] } ``` The first important attribute is `technicalKey` of the response `status`. Status `RUNNING` means that the bulk is still in progress. Copy the `id` of the bulk and use it in the next step. Do not start the next bulk job until the previous one is finished. To check the status of the bulk, go to the next step. If a status other than 200 is returned, go to [Developer Guidelines](/documentation/developer-guidelines/#status-and-error-codes) to check extended descriptions. ## Step 2: Read a Bulk Lookup To read a bulk lookup, you need to send a request using the **Read Bulk Lookup** endpoint. 1. Use the **Read Bulk Lookup** endpoint to send the request, 2. Paste the `id` of the bulk received in the previous step and paste it to the `id` field in the parameters, 3. Click the **Send** button. 1. Check the details of the response. If the response status is 200, you will receive a response similar to the below example: ```json { "id": "f90b3fd3-ef5a-4909-9c67-a3648b69dcd1", "createdAt": "2024-02-23T11:34:44.940Z", "finishedAt": "2024-02-23T11:34:45.528Z", "createdBy": "f1241873-7f01-41fa-b1c5-e747b630da61", "status": { "technicalKey": "FINISHED" }, "progress": 100, "results": [{ "total": 55, "limit": 10, "startAfter": "RVtH+Q==", "nextStartAfter": "RVtH8w==", "values": [], "debugInfo": {}, "id": "65d882d57c7b4014524c7814" }], "nextStartAfter": "MA%3D%3D" } ``` The first important attribute is `technicalKey` of the response `status`. Status `FINISHED` means that the bulk is finished and the bulk lookup results are available in the `results` attribute in the `value`. Explore it for Business Partners Data. You have successfully created and processed a bulk lookup. If a status other than 200 is returned, go to [Developer Guidelines](/documentation/developer-guidelines/#status-and-error-codes) to check extended descriptions. ## Step 3: Create a Bulk Fetch To create a bulk fetch, you need to send a request to the SAP ODM using the **Create Bulk Fetch** endpoint. The request should contain the tasks you want to perform in bulk. 1. Use the **Create Bulk Fetch** endpoint to send the request. 2. Select the **Create Bulk Business Partner Fetch with Tasks** example. 3. Click the **Send** button. 1. Check the details of the response. If the response status is 200, you will receive a response similar to the below example: ```json { "id": "058d20f2-6138-4b73-bf2b-bed6adeb6e34", "createdAt": "2024-02-23T11:45:32.396046663Z", "createdBy": "f1241873-7f01-41fa-b1c5-e747b630da61", "status": { "code": 200, "technicalKey": "OK", "details": [{ "id": 200000006, "message": "The bulk is currently being executed.", "technicalKey": "BULK_RUNNING" }] }, "featuresOn": ["SHOW_DEBUG_INFO"] } ``` The first important attribute is `technicalKey` of the response `status`. Status `RUNNING` means that the bulk is still in progress. Copy the `id` of the bulk and use it in the next step. Do not start the next bulk job until the previous one is finished. To check the status of the bulk, go to the next step. If a status other than 200 is returned, go to [Developer Guidelines](/documentation/developer-guidelines/#status-and-error-codes) to check extended descriptions. ## Step 4: Read a Bulk Fetch To read a bulk fetch, you need to send a request using the **Read Bulk Fetch** endpoint. 1. Use the **Read Bulk Fetch** endpoint to send the request, 2. Paste the `id` of the bulk received in the previous step and paste it to the `id` field in the parameters, 3. Click the **Send** button. 1. Check the details of the response. If the response status is 200, you will receive a response similar to the below example: ```json { "id": "058d20f2-6138-4b73-bf2b-bed6adeb6e34", "createdAt": "2024-02-23T11:45:32.396Z", "finishedAt": "2024-02-23T11:45:32.464Z", "createdBy": "f1241873-7f01-41fa-b1c5-e747b630da61", "status": { "code": 200, "technicalKey": "OK", "details": [{ "id": 200000007, "message": "The bulk has been executed successfully.", "technicalKey": "BULK_FINISHED", "jsonRecord":{} }] }, "progress": 100, "results": [], "nextStartAfter": "MA%3D%3D" } ``` The first important attribute is `technicalKey` of the response `status`. Status `FINISHED` means that the bulk is finished and the bulk fetch results are available in the `results` attribute in the `value`. Explore it for Business Partners Data. You have successfully created and processed a bulk fetch. If a status other than 200 is returned, go to [Developer Guidelines](/documentation/developer-guidelines/#status-and-error-codes) to check extended descriptions. ## Your opinion matters! We are constantly working on providing an outstanding user experience with our products. Please share your opinion about this tutorial!