function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Frederick H LaneFrederick H Lane 

Question on Trailhead - Import Accounts Using Bulk API and Workbench

My error message on this challenge is; "Challenge Not yet complete... here's what's wrong: 
Could not find at least 500 Account records with the Name like 'Bulk Company'."

My steps are;
1. Import the account records and save in csv format
2. Logged into workbench and linked to my dev org
3. In REST explorer I uploaded the job
     HTTP method POST
    URI textbox:  /services/data/v41.0/jobs/ingest  (also tried API version 42)
    Request header text;
Content-Type: application/json; charset=UTF-8
Accept: application/json
    Request body text; 
{
"operation" : "insert",
"object" : "Account",
"contentType" : "CSV",
"lineEnding" : "CRLF"
}
4. Execute
5. Note the job ID
6. Add the data to the job;
 HTTP method PUT
    URI textbox:  /services/data/v41.0/jobs/ingest/7500O00000Bo5AUQAZ/batches
    Request header text;
Content-Type: text/csv
Accept: application/json
    Request body text; 
"Name" "Sample Bulk API Account 1"
"Sample Bulk API Account 2"
"Sample Bulk API Account 3"
"Sample Bulk API Account 4"
    etc until 500
7. Execute
8. Close the job
 HTTP method PATCH
    URI textbox:  /services/data/v41.0/jobs/ingest/7500O00000Bo5AUQAZ
    Request header text;
Content-Type: application/json; charset=UTF-8
Accept: application/json
Body text;
{
"state" : "UploadComplete"
}
9. Execute

Check the challenge
 



 
SandhyaSandhya (Salesforce Developers) 
Hi,

Did you check in the org if there is 'Bulk Company' account from accounts tab. Also make sure that you are connecting the same org where you imported accounts.

Click the dropdown in 'Launch' in the trailhead challenge and see which org is connected.If you have imported in developer edition then choose 'Log in with  Developer Edition' from 'Launch' and connect your org.

If this helps you, please mark it as solved so that it will be available for others as a solution.

Best Regards,
Sandhya
Frederick H LaneFrederick H Lane
Thanks for your time Sandya.

Surely they wouldn't give a sample data set without including the required company name? Did you look at my steps taken and Workbench requests, header code etc? I also explained in my text that I linked to my Dev org playground. I also tried a different org. And, the response from the challenge seems to suggest it has found the data set but not the 'Bulk Company'. I think, in my Get request, that I must stipulate in some way that I want a list of 500 rather than 4(as per the Trailhead example)? If so, how do I do that? 
Narapa Naidu PulipatiNarapa Naidu Pulipati

Hello Frederick,
I feel you have gone wrong in step 6.

User-added image

In step 6 You have inserted only 4 accounts in Request body text as explained in trailhead.Instead you need to click the blue link  ("these account records" ) above the green button as shown in image and download the csv file.

Inside the csv file you have 500 accounts with Bulk Company. Copy All the 500 accounts and paste it in the Request body Text.Be careful to append inverted commas for all the names while copying them into Request body text. Because the names in csv file do not come with inverted commas.

After copying these 500 company names with inverted commas.and you repeat all your other steps.I think your problem will be solved.

All the best:)

rajasekhar tandasarajasekhar tandasa
If Still have issue please check existing triggres which will prevent to insert record's into Account object
Salesforce GenieSalesforce Genie
I also had similar issue trying to complete the challenge, I was skipping the step to close the job. Salesforce will start processing the job only when the status of the job changes from Open to UploadComplete.
Ankit Gupta 305Ankit Gupta 305

Hi Frederick, please go through the link below. It will definitely help you in passing your challenge.

https://getawayposts.com/trailhead-module-import-accounts-using-bulk-api-and-workbench

Maren Dangut 8Maren Dangut 8
this is the steps I follow: on the workbench, I goto data --> INSERT --->  upload the CSV provided.
all the contact were uploaded 
pedro campospedro campos
Um modo de resolver seria criar uma conta de forma manual mesmo, ou subir através da da API outra conta para compeltar, acredito que passo 499 contas, mas assim irá resolver!! pode tentar essas duas manerias 
Yassine MidiYassine Midi
hello,
if you want to import the csv file you must use :
{
"operation" : "insert",
"object" : "Account",
"contentType" : "CSV",
"lineEnding" : "LF"
}


And the 500 accounts will be imported
Mateus MalvezziMateus Malvezzi

Its late, but I hope this helps someone...
When I tried, the original file provided by the challenge in notepad had all values with double quotes, I guess thats the problem.
Open the file in excel, just save it and follow the steps (postman) again. It worked for me