Skip to Content
AutomationsActions

Documents

Find a customer's documents, change their type or status and print them

Last updated on

With these actions you work with a customer's documents, such as an insurance proof of payment. The type and the expiry date of a document are in the document details. In a flow you read them as {document.userMetadata.documentType} and {document.userMetadata.insuranceExpiryDate}.

Find document

Finds a customer's newest document. The step has two exits: Found and Not found.

FieldWhat you fill in
CustomerThe id of the customer, for example {document.customerId} or {customer.id}. Required
TypeFor example Insurance payment proof. Leave empty for any type
Skip archived documentsOn by default
Only documents that have not expiredThe expiry date must be after now. Documents without an expiry date then do not count. Off by default

If several documents match, the step takes the newest. Via Found, later steps can use {foundDocument.id}, {foundDocument.name}, {foundDocument.status}, {foundDocument.userMetadata.documentType} and {foundDocument.userMetadata.insuranceExpiryDate}.

This way you can check, for example, when an insurance has expired, whether the customer already has a new, valid proof of payment: search with Type Insurance payment proof and Only documents that have not expired on, and only continue via Not found.

Update document

Changes the type of a document, or archives or restores it. Empty fields stay as they are.

FieldWhat you fill in
DocumentThe id of the document. {document.id} by default. Required
New typeChoose Leave as it is to keep the type
StatusActive or Archived. Choose Leave as it is to keep the status

A type that requires an expiry date, such as Insurance payment proof, fails if the document has no expiry date. The action returns {updatedDocument.id}.

Print document

Prints a PDF on the A4 printer, or shows it on the tablet at reception. That can be a stored document or a link to a PDF.

FieldWhat you fill in
DocumentThe id of a stored document, or a link to a PDF that starts with https:// or http://. {document.id} by default. After a signed SEPA mandate, use {mandateAgreement.signedDocumentId}. Required
WhereA4 printer (default), Receipt printer or Tablet

Keep in mind:

  • A stored document must be a PDF. A photo or another file makes the step fail
  • The receipt printer prints tickets and invoices, not a PDF. If you choose Receipt printer, the step always fails. Choose A4 printer or Tablet
  • Every run prints the document again, even if the same document was already printed before
  • You set up the printers under Print settings

To print an invoice, use Print invoice.

Was this page helpful?

On this page