kowal.info

WFirma – Magento 2 integration

Composer package kowal/wfirma · repository version 1.3.26

Product page

WFirma – Magento 2 integration — kowal.co

Description

Kowal_WFirma integrates a Magento 2 store with wFirma for invoicing and warehouse operations. It supports automation of document creation, data synchronization, and multistore environments.

For whom

For accounting, order management and warehouse teams transferring invoices and stock documents from Magento to wFirma.

Features

  • Automated creation/export of documents in wFirma based on Magento data.
  • Multistore support (mapping Magento stores to wFirma companies/accounts).
  • Warehouse documents (e.g., PW, RW, PZ, WZ, MM) and bulk operations.
  • Multi-currency support for invoice export.
  • Warehouse mapping: Magento ↔ wFirma.
  • Scenarios such as PRO FORMA and picking/packing with automatic WZ after shipping.

Invoices / sales documents

  • Export invoices from Magento to wFirma (manual or automated).
  • PRO FORMA scenarios (depending on configuration).
  • Document numbering/series mapping (including multi-series setups).

Warehouse & logistics

  • Generate warehouse documents: PW, RW, PZ, WZ, MM.
  • Map Magento warehouses to wFirma warehouses.
  • Picking/packing flows: after shipping, automatic creation of WZ is possible.
  • Production scenarios: generate PW to a selected warehouse based on a production flow.

Data sync (Magento ↔ wFirma)

  • Import customers/contractors from wFirma into Magento.
  • Import products from wFirma into Magento (with optional product creation).
  • Update prices and stock levels from wFirma to Magento (configurable).

Installation

Install via Composer

  1. (Optional) Add VCS repositories (if you install packages directly from repos):
composer config repositories.wfirma vcs https://github.com/kowalco/wfirma
  1. Install the package:
composer require kowal/wfirma
php bin/magento setup:upgrade
php bin/magento cache:flush

Configuration

Path: Kowal → wFirma Integration → Settings

Key configuration areas:

1) General settings

  • Enable/disable document generation in wFirma
  • Order statuses eligible for export
  • Document options (e.g., invoice/receipt, PRO FORMA, OSS)
  • Auto-settle invoices
  • Sending invoices (via wFirma or via the store)

2) Stock synchronization

  • Select Magento warehouses to update
  • Select wFirma warehouses as the source of stock
  • Default warehouse for picking (WZ) and reservations

3) Product attribute mapping

  • EAN attribute mapping
  • Unit-of-measure attribute mapping

4) API configuration

Modes available (per product page):

  • OAuth (client_id, client_secret, callback_url, tokens)
  • API keys (access_key, secret_key, app_key)

5) Documents, production, printers, messages

  • Statuses for production/picking/packing flows
  • Label printer settings + mapping admin users to printers
  • Editable customer message when the invoice PDF is not yet available

Email integration (invoice link / PDF)

You can add the invoice link block to an email template:

{{block class='Kowal\WFirma\Block\InvoiceLink' area='frontend' invoice_id=$invoice.entity_id template='Kowal_WFirma::invoicelink.phtml'}}

Additional notes (per product page):

  • The wFirma invoice ID is stored in sales_invoice.wfirma
  • Invoice PDFs are stored in var/invoices

CLI commands

Export invoices:

php bin/magento kowal_wfirma:exportinvoices

Import customers:

php bin/magento kowal_wfirma:importcustomers

Import products:

php bin/magento kowal_wfirma:importproducts

CRON

The module provides a cron job:

  • kowal_wfirma_exportinvoice – runs every 2 minutes and exports Magento invoices that have not yet been sent to wFirma.

Requirements / notes

  • Magento 2 (standard Magento 2 module)
  • Composer installation (recommended)

The package requires kowal/base and includes the kowal/module-email and kowal/module-attributesquery components.

FAQ

Does it support multistore and multiple wFirma companies?

Yes — it supports mapping per store_id and exporting to one or multiple companies in wFirma.

Are warehouse documents supported (PW/RW/PZ/WZ/MM)?

Yes.

Does it support multiple currencies?

Yes — invoice export supports currencies and conversion according to configuration.

Verify the installation

bin/magento module:status Kowal_WFirma

Use a test order to verify the document reference and compare the gross total and VAT rates with the document in wFirma.

On a multistore installation, also verify that the document belongs to the wFirma company mapped to the test order’s store.

Components included in WFirma – Magento 2 integration