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
Hitesh Jain 21Hitesh Jain 21 

Can the csvpath for uploading dataset for Einstein Intent be a local path or static resource relative path?

While uploading the dataset, we provide a path of the csv file in Einstein Intent . Can this csv path be a local path or any Static resource relative url?
If yes, can you please help in understanding on how the dataset will be fetched from the latter paths.
Naveen KNNaveen KN
Hi Hitesh, I am not sure about the local path. You can upload the document to the google drive and get the reference link to create the dataset. Follow the video for reference
Hitesh Jain 21Hitesh Jain 21
Thanks for the reply.. I would like to keep my dataset private either in my org (in static resource or Documents) and then can I use this resource link as csvpath?
Naveen KNNaveen KN
I haven't tried that option yet. As per my knowledge it should work. Make sure you get the complete link of the static resource to add the dataset. Please try that option and let us know here for future reference.
Naveen KNNaveen KN
One more thing is make the static resource to public for your testing if you are trying to create the dataset with curl statements
Raj VakatiRaj Vakati
Hi Hitesh , 
You can upload it from a local file path.  Please refer this 
curl -X POST -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" -H "Content-Type: multipart/form-data" -F "data=@C:\Users\rvakati\Desktop\New folder\SFDC Intent\case_routing_intent.csv" -F "type=text-intent"

Jaya Koti MuleJaya Koti Mule
Hi Hitesh,

I am also working on the same issue, to load the dataset csv file from the salesforce through Static Resources, Documents, files or Content documentation. I didn't find any luck with the above options. Please let us know if you are successful with uploading the data from salesforce to einstein. 
Savya Saachi Verma 2Savya Saachi Verma 2
Hi Jaya,
I am having the exact same issue did you find an answer to this issue?

Jaya Koti MuleJaya Koti Mule

Hi Verma,
I have successfully uploaded the csv file from salesforce.through ContentDistribution object. Please follow the steps.
1. Upload the csv file to the Files/ContentVersion object.
2. Create a Content Distribution record from the ContentVersion record.
3. Query the ContentDownloadUrl field from the Created Content Distribution record. The url value of the ContentDownloadUrl  can send to the Einstein Intent.

PseudoCode :

ContentVersion CV = [SELECT Id FROM ContentVersion where ContentDocumentId =: contentDocumentId and isLatest = true];
        ContentDistribution CD = new ContentDistribution();
        CD.ContentVersionId = CV.Id;
        CD.Name = 'Einstein Intent - ' + name;
        CD.PreferencesAllowOriginalDownload = true;
        CD.PreferencesLinkLatestVersion = true;
        CD.ExpiryDate =;
        CD.PreferencesExpires = true;
        CD.PreferencesNotifyOnVisit = false;
        CD.PreferencesNotifyRndtnComplete = false;
        insert CD;
        ContentDistribution CD2 = [SELECT Id, ContentDownloadUrl FROM ContentDistribution where Id =: CD.Id];
        system.debug('ContentDownloadUrl :'+CD2.ContentDownloadUrl);