You need to sign in to do that
Don't have an account?
Hitesh 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.
If yes, can you please help in understanding on how the dataset will be fetched from the latter paths.
You can upload it from a local file path. Please refer this
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.
I am having the exact same issue did you find an answer to this issue?
Thanks!
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 = system.now().addMinutes(1000);
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);