diff --git a/assets/guides/workflow-run-job-from-editor.png b/assets/guides/workflow-run-job-from-editor.png new file mode 100644 index 0000000..ea11b2f Binary files /dev/null and b/assets/guides/workflow-run-job-from-editor.png differ diff --git a/assets/guides/workflow-run-job-from-entry.png b/assets/guides/workflow-run-job-from-entry.png new file mode 100644 index 0000000..c0d8eb0 Binary files /dev/null and b/assets/guides/workflow-run-job-from-entry.png differ diff --git a/assets/guides/workflow-run-job-from-table.png b/assets/guides/workflow-run-job-from-table.png new file mode 100644 index 0000000..5c20752 Binary files /dev/null and b/assets/guides/workflow-run-job-from-table.png differ diff --git a/assets/guides/workflow-run-select-filled.png b/assets/guides/workflow-run-select-filled.png new file mode 100644 index 0000000..f1a926d Binary files /dev/null and b/assets/guides/workflow-run-select-filled.png differ diff --git a/assets/guides/workflow-run-select.png b/assets/guides/workflow-run-select.png new file mode 100644 index 0000000..9e2176a Binary files /dev/null and b/assets/guides/workflow-run-select.png differ diff --git a/assets/guides/workflows-run-selected-entry.png b/assets/guides/workflows-run-selected-entry.png new file mode 100644 index 0000000..8629c86 Binary files /dev/null and b/assets/guides/workflows-run-selected-entry.png differ diff --git a/guides/pl-ksef.mdx b/guides/pl-ksef.mdx index 99b3c75..4342501 100644 --- a/guides/pl-ksef.mdx +++ b/guides/pl-ksef.mdx @@ -465,23 +465,30 @@ Once you've configured the import, sync, and registration workflows, the [Cron a #### Manual import -If you need to import invoices outside of the automatic cron schedule, you can manually trigger imports using the Invopop API. - - - Manual import with workflow arguments is only available via API. The Console UI does not currently support passing custom arguments to workflow jobs. - +If you need to import invoices outside of the automatic cron schedule, you can manually trigger imports from the [Console](/guides/workflows#running-from-the-console) or via the API. **Import a single invoice** -To import a specific invoice from KSeF: +To import a specific invoice from KSeF, you need: - - - - **KSeF Number**: The unique invoice identifier (e.g., `1234567890-20260120-ABCD1234-EF`) - - **Supplier NIP**: The Polish Tax ID of the invoice issuer - +- **KSeF Number**: The unique invoice identifier (e.g., `1234567890-20260120-ABCD1234-EF`) +- **Supplier NIP**: The Polish Tax ID of the invoice issuer - + + + 1. Navigate to **Workflows** and find your **KSeF Import Invoice** workflow + 2. Click **Run** from the workflow editor or the `...` menu in the workflow list (see [Running from the Console](/guides/workflows#running-from-the-console)) + 3. Leave the document field empty — the import workflow will create a new silo entry automatically + 4. Fill in the **Arguments**: + + | Key | Value | + |-----|-------| + | `ksef-number` | `1234567890-20260120-ABCD1234-EF` | + | `nip` | `1234567890` | + + 5. Click Run workflow + + Use the [Create a Job endpoint](/api-ref/transform/jobs/create-a-job-post): ```bash @@ -496,21 +503,33 @@ To import a specific invoice from KSeF: } }' ``` + + - The invoice will be downloaded from KSeF, converted to GOBL, and stored in your silo. - - +The invoice will be downloaded from KSeF, converted to GOBL, and stored in your silo. **Import multiple invoices by date range** -To import all invoices received within a specific time period: +To import all invoices received within a specific time period, you need: - - - Decide the date range you want to sync (from and upto dates). - +- The **party silo entry** for the supplier whose invoices you want to sync +- The **date range** (`from` and `upto`) to process - + + + 1. Navigate to **Workflows** and find your **KSeF Sync Received Invoices** workflow + 2. Click **Run** from the workflow editor or the `...` menu in the workflow list + 3. In the **Select a document** field, search for and select the party (supplier) entry + 4. Fill in the **Arguments**: + + | Key | Value | + |-----|-------| + | `from` | `2026-01-01T00:00:00Z` | + | `upto` | `2026-01-31T23:59:59Z` | + + 5. Click Run workflow + + Use the [Create a Job endpoint](/api-ref/transform/jobs/create-a-job-post) with your sync workflow: ```bash @@ -526,10 +545,10 @@ To import all invoices received within a specific time period: } }' ``` + + - The sync workflow will query KSeF for all invoices received in that date range and create individual import jobs for each invoice found. - - +The sync workflow will query KSeF for all invoices received in that date range and create individual import jobs for each invoice found. Use single invoice import to bring in a specific invoice immediately after receiving notification from a supplier. Use date range sync to backfill invoices or to import historical invoices from before the cron subscription was active. diff --git a/guides/workflows.mdx b/guides/workflows.mdx index 22ae16f..5893bae 100644 --- a/guides/workflows.mdx +++ b/guides/workflows.mdx @@ -117,6 +117,63 @@ Workflows in Invopop can be executed through the following methods: Workflows are executed on _silo entries_ (such as invoices or suppliers), this action creates a _job_. When a job is run, the silo entry will be updated with any changes or attachments generated during processing. The status of a job can be seen in the silo entry's activity tab, or in the **Workflows** → **History** section accessible from the left sidebar. +### Running from the Console + +There are three ways to run a workflow from the Console: + +#### From a silo entry + +While viewing an invoice, supplier, or other silo entry, click Run Workflow in the top toolbar. + + +Run Workflow button in the silo entry toolbar + + +This opens a panel where you search for and select the workflow to run. The current entry is used as the document automatically. + + +Workflow selection panel from a silo entry + + +Click Run Workflow to create the job. This method does not support passing arguments — the job runs with the selected entry only. + +#### From the workflow editor or list + +You can also start a run from the workflow side: + +- **From the workflow editor**: Click the **Run** button in the top bar while viewing a workflow. + + +Run button in the workflow editor + + +- **From the workflow list**: Click the `...` menu on any workflow row and select **Run**. + + +Run option in the workflow list menu + + +Both options open a panel where you configure the job inputs: + + +Run workflow panel with document and arguments fields + + +- **Select a document**: Search for and select an existing silo entry (invoice, supplier, etc.) to process. +- **Arguments**: Provide string key-value pairs that will be passed to the workflow steps. The specific keys and values depend on the workflow — for example, a KSeF import workflow might expect a `ksef-number` and `nip` argument. + +A job requires **at least one** of these: a document or arguments. You can also provide both. For example, a sync workflow may need a party document selected _and_ date range arguments. + + +Run workflow panel with a document and arguments filled in + + +Click Run workflow to create the job. + + + When a job is run with arguments only and no document selected, the workflow will typically create a new silo entry or fetch an existing one based on the arguments provided. For example, an import workflow receiving a document identifier as an argument will download the document and create a corresponding silo entry automatically. + + ## Error Handling Any step that causes an error (`KO`) from which the job can't recover, and is not handled through a condition, will trigger the error handling flow. To enable this section, tap on **Handle Errors** at the bottom of the workflow creation screen, then add steps into this area which you want to execute when the job fails (often times setting the entry's state to `Error` and possibly sending a notification).