Don't get Bulk Write API to work
Hi everyone,
I'm facing current problem.
I have csv files (+500 row) which I push into a custom module (each row is one entry).
Uploading of the file was easy but I don't get the 2. step "WriteCreate Bulk Write Job" to work.bulk. I always get this error code
{"code":"INVALID_REQUEST","details":{},"message":"unable to process your request. please verify whether you have entered proper method name, parameter and parameter values.","status":"error"}
Here my code:
- //uploadZip is the invoke of https://content.zohoapis.com/crm/v6/upload
- fileID = uploadZip.get("details").get("file_id");
- bulkMap = Map();
- bulkMap.put("operation","insert");
- bulkMap.put("ignore_empty",true);
- resourceList = List();
- resourceMap = Map();
- resourceMap.put("type","data");
- moduleMap = Map();
- moduleMap.put("api_name","CustomModuleXYZ");
- resourceMap.put("module",moduleMap);
- resourceMap.put("file_id",fileID);
- fileNameList = List();
- fileNameList.add(filenname);
- resourceMap.put("file_names",fileNameList);
- fieldMappingList = List();
- importDateiNameMap = Map();
- importDateiNameMap.put("api_name","Name");
- importDateiNameMap.put("index",0);
- fieldMappingList.add(importDateiNameMap);
- gridSupplyMap = Map();
- gridSupplyMap.put("api_name","FieldX");
- gridSupplyMap.put("index",16);
- fieldMappingList.add(gridSupplyMap);
- gridWithdrawalMap = Map();
- gridWithdrawalMap.put("api_name","FieldY");
- gridWithdrawalMap.put("index",17);
- fieldMappingList.add(gridWithdrawalMap);
- usageMap = Map();
- usageMap.put("api_name","FieldZ");
- usageMap.put("index",18);
- fieldMappingList.add(usageMap);
- ownerConsumptionMap = Map();
- ownerConsumptionMap.put("api_name","FieldXY");
- ownerConsumptionMap.put("index",20);
- fieldMappingList.add(ownerConsumptionMap);
- pvEnergyMap = Map();
- pvEnergyMap.put("api_name","FieldXZ");
- pvEnergyMap.put("index",64);
- fieldMappingList.add(pvEnergyMap);
- //default field values link to the related file upload
- dataImportMap = Map();
- dataImportMap.put("api_name","LookupField1");
- dataImportMap.put("find_by","id");
- dataImportDVMap = Map();
- dataImportDVMap.put("value",dataImportID);
- dataImportMap.put("defaultValue",dataImportDVMap);
- fieldMappingList.add(dataImportMap);
- resourceMap.put("field_mappings",fieldMappingList);
- resourceList.add(resourceMap);
- bulkMap.put("resource",resourceList);
- info "bulkMap: " + bulkMap;
- createBulkAction = invokeurl
- [
- url :"https://www.zohoapis.eu/crm/bulk/v6/write"
- type :POST
- parameters:bulkMap
- connection:"bulkconnection"
- ];
- info "bulk:" + createBulkAction;
Does someone has an idea how to solve my problem
Best
Markus
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.