Tutorials
Document AI Tutorials

AI Flows - Initial Setup Guide

overview this guide provides a detailed overview of setting up salesforce flows to process files using cloudfiles document ai this setup is to be used as a pre cursor to perform actual querying to get results from ai in order to ask a natural language query to cloudfiles ai, you first need to process the document and receive a processed document id the file to be processed can be either a salesforce upload or it may be uploaded in external storages cloudfiles provides functionlity to process both types of uploads, albeit in a slightly different manner read the sections below carefully pre requisites ensure the following before starting cloudfiles installed in salesforce available on salesforce appexchange check out installation docid\ rfxciqrbejmpsmbczexam and configuration docid\ amnhmxwixyngnaxerbkwd and to know more active subscription or trial ensure access to cloudfiles document ai processing files using cloudfiles document ai in order t o query your files using ai, we first need to process the document this prepares the document so that it can be sent to ai for querying you will need to create 2 separate flows the first flow will trigger when the upload is done and will send the uploaded file to ai for processing the second flow will trigger when the document has finished processing and can now be queried process new document flow this flow sends any new file uploads for processing processing is an asynchronous operation and may take some time to complete document processing complete flow this flow executes when the document has been processed this is the flow in which you will actually add the query & response logic to create these flows, first decide if you want to process a salesforce file upload or an external storage file upload based on this, refer to one of the below articles in order to setup the flows for salesforce file uploads if you are uploading files into the salesforce files or notes & attachments section, refer to process salesforce files docid\ pwajwa0qo pxgqneurlln article in order to setup the initial flows for external storage uploads if you are uploading files into external storages such as sharepoint or google drive, refer to process external files docid\ duofur0kdddm4yki6dpzr article in order to setup the initial flows once you are finished with the relevant article, you should have the below two flows ready in your org here's a screenshot of how these flows will look like check the next section on how to use these flows further in order to get responses from ai when a new salesforce file is uploaded or attached onto the records when a new file is uploaded in an external storage through the cloudfiles lwc first decide whether you want to work with salesforce files or external files and based on that, use either the process salesforce files docid\ pwajwa0qo pxgqneurlln or the process external files docid\ duofur0kdddm4yki6dpzr article in order to setup the 2 flows querying the document using ai once you have the above flows setup, you are ready to start querying the document and getting responses this is done using the 'query document' flow action in order to see how this action can be used to achieve specific goals, refer to our detailed tutorials listed in the document ai tutorials docid\ k89awfijxxjssysaajwcr article this tutorial only helps setup the initial flows to make the document ready for ai in order to actually use ai to get responses, checkout other tutorials