Skip to content

Workflow cookbook

Each example is a complete workflow, with its scripts or with cards alone such as Capture, Parallel approval or Wait for. A test checks every workflow on every change to Acriva with the same check as publishing, and runs every script with its page’s cases in the sandbox, so the code and the result always match. When an example reads a data source or a data table, each case gives the source’s answer and the table’s rows: the test calls no real source. How scripts work is under Customize and program workflows.

  • Allocation from a data table: Before an incoming invoice goes to approval, the Set field step with “Take values from a data table” sets its cost center and G/L account from the data table kostenstelleJeLieferant: from the row whose key is the invoice’s vendor, with no script.
  • Approval by an approval matrix: Who approves an incoming invoice is in the data table freigabematrix: each row names a stufe (level), a freigeber (a role or a member’s email address), a limit and optionally a kostenstelle (cost center).
  • Check a price against the price list: Compares an invoice’s unit price with the price list in a data table.
  • Check invoice against contract: Before the approval, the card “Check invoice” with “Check invoice against contract” checks an incoming invoice against its vendor’s contract, with no script and no AI: among the contracts of the type “Contract” it looks for the one whose “Counterparty file” is the file of the invoice’s confirmed vendor, wherever the contract is filed, and checks its status, its term on the invoice date and the gross total against the “Contract value” per period (“Value per”) with a 5 % tolerance.
  • Check the IBAN and the VAT ID: The script recomputes the check digits of an incoming invoice’s IBAN and checks that the VAT ID has the right form.
  • Check the mandatory details: Before an incoming invoice goes to approval, the card “Check invoice” with “Check mandatory details” checks, as a hint and no legal review, the mandatory details of § 14 (4) UStG, with no script and no AI call: that the invoice number, the invoice date, the gross total, the net and tax lines, the vendor’s and the recipient’s name and address, the delivery or service date, the quantity and kind of the goods or services, the tax number (without a VAT ID) and, on an invoice without tax, a tax exemption or reverse-charge note are there, and that the sum, the VAT ID’s format, the IBAN, the currency and a price reduction it mentions are plausible.
  • Check the order number: Checks an invoice’s order number against the order system through a data source.
  • Check the project budget: Checks an invoice in a project’s file against the project’s remaining budget from a data table.
  • Compute and declare a field: The workflow adds the field discount amount to incoming invoices, and its script computes it: 2 % of the gross total, rounded to the cent.
  • Contract closing: When a contract arrives, the workflow sets its “Contract status” to “In review”, with no script.
  • Convert a foreign currency into euros: Converts the amount of a foreign-currency invoice into euros with the exchange rate from a data source.
  • Cost center and creditor account from the ERP: Fetches the vendor’s cost center and creditor account from the ERP through a data source.
  • Cost center from the vendor: Invoices of known vendors get their cost center and G/L account from a table in the script.
  • Cost center mapping from a data table: Sets the cost center and the G/L account from a mapping table that accounting keeps as a data table.
  • Decide before the notice deadline: The workflow starts with “Deadline due” when the reminder of a contract’s “Notice deadline” comes, by default 90 days before it; Acriva calculates the deadline from the term, the notice period and the renewal and again after each renewal, and the workflow then starts again for the new deadline.
  • Detect reverse charge: A custom AI action asks, with the answer shape Yes or no, whether an invoice is a reverse-charge invoice.
  • Discount reminder: One day after an incoming invoice is approved, the script checks whether its early-payment discount still applies.
  • Escalate overdue approvals: When an invoice’s approval lies idle, Acriva reminds the cost center’s responsible person after 2 working days and hands the task to the management after 5; you set this on the approval itself, because no step runs while a task is open.
  • File by a field: After the approval, the script files an incoming invoice into its vendor’s file, which it finds by the vendor number.
  • File into the vendor’s file: Every incoming invoice lands in its vendor’s file: the Filing step with “By field” looks for the file of the file type vendor whose unique key field vendorName holds the invoice’s vendor, with no script.
  • Four eyes above a threshold: Above €5,000 a second approval by a different person follows; the script points it out on the first.
  • Have a contract signed: When a contract arrives, the card Send for signature sends it in order to the requesting person as “Auftraggeber” and to the contract partner as “Auftragnehmer”, with a simple electronic signature (SES) and 14 days to sign, with no script.
  • Have the cost center entered: Before an invoice goes to approval, accounting adds the cost center and the invoice number: the Capture task can only be completed once both required fields are filled in.
  • Normalize vendor names: The same vendor often appears differently on invoices: once as “TELEKOM DEUTSCHLAND GMBH”, once as “Telekom Deutschland GmbH”.
  • Notice deadline from the end date: When a contract arrives whose field Notice deadline is empty, the step Set field sets it to 90 days before the End date, without a script; a deadline the AI read from the contract stays.
  • Obligation reminder: An obligation is a deadline a person adds to a contract, with a title, a due date and an owner, such as “Submit proof of maintenance”, also repeating monthly or yearly.
  • Order match: The card “Check invoice” with “Order match” looks for the order with the incoming invoice’s order number and compares the gross totals with a 2 % tolerance and the vendor, with no script and no AI.
  • Plausibility and a summary for the approval: Before the cost center’s responsible person approves an invoice, the plausibility check compares the VAT ID and the IBAN with the vendor’s master data and last invoice, and the gross amount with the last invoice (a deviation over 30 %).
  • Prepare booking fields: The workflow adds the fields booking text and G/L account and fills them as soon as an invoice arrives: the booking text from the vendor and the invoice number in at most 60 characters, as DATEV takes it, and the G/L account from a table in the script.
  • Read the fields again after a correction: If accounting rejects an invoice, the person who uploaded it corrects it, for example with a new version from the vendor.
  • Reminder before the due date: The cost center’s responsible person first reviews an incoming invoice, then accounting approves the payment.
  • Report missing fields: When an incoming invoice lacks its invoice number, invoice date, due date or gross total, the script notifies accounting and names the missing details.
  • Route by amount: The management approves an incoming invoice over €500, the cost center’s responsible person one up to €500.
  • Route by cost center: An invoice’s cost center decides who approves: purchasing approves cost centers starting with 41, sales those starting with 43, accounting all others.
  • Route by vendor: The IT approves invoices of IT vendors such as Telekom or Dell, the cost center’s responsible person all others.
  • Split by document type: A workflow without a document type that you start by hand on any document: accounting approves an incoming invoice, the management reviews a contract, and accounting acknowledges every other document.
  • Tag by keyword: When an invoice’s vendor or purpose mentions Bahn, Hotel or Lufthansa, it gets the tag Reisekosten; Telekom, Vodafone or Miete (rent) give Fixkosten.
  • Two of three approve: A new contract goes to the management, accounting and purchasing at once.
  • Vendor master data from an Excel list: Reads a vendor’s creditor account, payment terms and block from a data table uploaded from an Excel list.
  • Wait for the delivery note: After the approval, the workflow waits with Wait for up to 7 days for a delivery note of the same vendor.
  • Watch the Skonto deadline: Before an incoming invoice goes to approval, the card “Watch the Skonto deadline” reads its Skonto terms, the invoice’s own or else the vendor’s, with no script and no AI.