How do I set up the File upload step?

Collect PDFs, images or office files from visitors; optionally read the details inside, save them to variables and let the visitor confirm them.

What is it for?

The “File upload” step asks the visitor for one or more files: an invoice, a contract, a photo of an ID card or a product, a CV and so on. The visitor drags and drops or picks the file; on a phone they can also use the camera, if the phone's file picker offers it. If you want, the details inside the file (a name, date, amount, number…) are read and saved to variables for you to use in later steps.

The step is in the “Collecting details” category of the palette.

Setting up the step

  1. Add a “File upload” step to the canvas and write in the “On-screen text” what the visitor should upload.
  2. In “Accepted files”, pick one or more types: PDF, Image, Word, Excel, PowerPoint, Text. PDF and Image are selected by default, and at least one type must stay selected. Visitors can only upload the types you choose; the system knows which files belong to each type.
  3. Enter the “Maximum size per file (MB)” (up to 20 MB, 10 MB by default) and the “Maximum number of files that can be uploaded” (up to 10, 1 by default).

HEIC photos and Office files with macros aren't accepted.

The names of the uploaded files are saved to the step's variable (for example {file1}); use it in later steps' texts with “Insert variable”.

Uploaded files are kept for 90 days. During that time you can download them from the conversation details; after that they're deleted automatically. Uploads that never get attached to a record are deleted after 1 day.

Reading the details inside the file

Turn on “Read the details inside the file” and the details you choose are read from the file and saved to variables. Scanned PDFs and photos are read too. While reading is on, older Word (.doc), Excel (.xls) and PowerPoint (.ppt) files aren't accepted; the visitor is asked to save the file in the newer format. With reading on, the “Card no.” field type isn't offered. Reading uses credits.

  1. On the step panel's “Fields” tab, add each detail to read with “Add field”. The “Field name” is the detail's name (for example Invoice date); pick the “Field type” (for example “Question / text”, “Date”, “Amount”, “Number”, “Single choice”) and tick “Required” if the detail must be there. The “Variable name” is the variable the detail is saved to; use it in later steps as {invoice_date}. Writing in the field's “Description” box where and how the detail appears in the file makes it easier to find; when the details are shown to the visitor, the description also appears under the field.
  2. “Which document should be uploaded?”: describe what should be uploaded, for example “the front of an ID card”. If the file doesn't match, the result is “Different document”. Leave it empty to skip this check.
  3. “Show the details read to the visitor”: when it's on, the visitor sees the details read, fixes them if needed and confirms. When it's off, they're saved to variables directly; a detail that breaks the field's “Validation rule” (for example a 10-digit ID number) counts as not found, and if a required detail isn't found, the result is “Missing details”.

With reading on, add at least one detail or fill in “Which document should be uploaded?”; if both are empty, the editor warns you.

If a “Summary and confirmation” step comes later in the agent, the details read appear there too and the visitor can correct them. See the Summary and confirmation step.

Exits and failed reading

With reading off, the step has a single exit: once the files are sent, the flow moves on to the next step.

With reading on, the step has one success exit and four failure exits on the canvas, and you can connect each to a different step:

  • “Success”: the file was read and the details were saved. If it isn't connected, the flow ends here.
  • “Unreadable”: nothing could be read from the file (for example a blurry photo or an empty page).
  • “Missing details”: a required detail wasn't found in the file.
  • “Different document”: the file doesn't match what you wrote in “Which document should be uploaded?”.
  • “Couldn't read”: reading wasn't possible at that moment; trying again a little later may work.

If a failure exit is connected, the flow goes to that step and the reason is said before the step's text. To have the reason appear somewhere inside the text, write {fileError} there. If a failure exit isn't connected, the visitor stays on the step, sees the reason and uploads a new file.

The reason sentences are ready-made and said in the visitor's language; for “Missing details”, the details that wasn't found is listed. To add something to the reason, connect the failure exit to a “Message” step and write your sentence there; for example “Take the photo in good light with the whole card visible.”

Where do I see the results?

Open a conversation from the “Conversations” list on the agent's “Analytics” tab. The files are in the “Uploaded files” section of the “Data” tab on the right, each with a button to download it. The details read from the files appear among the conversation's answers.

The uploaded file is kept even when the conversation went down a failure exit, so you can see a photo that couldn't be read.

Tip: try the setup first in “Preview” with a file of your own.

Related articles

Was this article helpful?

Agenola and our partners use cookies to improve the site and show you relevant ads. We count which of our ads bring visitors without using your name or email; anything more only happens if you allow it. Privacy Policy(opens in a new tab)