---
title: 'WFirma – Magento 2 integration'
url: 'https://info.srv.kowal.co/docs/magento/modules/kowal-wfirma'
markdown: 'https://info.srv.kowal.co/docs/magento/modules/kowal-wfirma.md'
lang: en
date: '2026-11-30'
description: 'Export invoice data from Magento to wFirma, map each store to the right company and manage warehouse documents. Check the settings for multi-currency invoices.'
taxonomy:
  category:
    - docs
    - Magento
    - Modules
  tag:
    - wFirma
    - Invoices
    - Warehouse
    - Integrations
    - Multistore
    - Cron
    - CLI
---

# WFirma – Magento 2 integration

Composer package **`kowal/wfirma`** · repository version **1.3.26**

## Product page

[WFirma – Magento 2 integration — kowal.co](https://kowal.co/magento-module-magento-store-integration-with-wfirma-invoicing-and-inventory-management)

## 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):

```bash
composer config repositories.wfirma vcs https://github.com/kowalco/wfirma
```

2. Install the package:

```bash
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:

```twig
{{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:

```bash
php bin/magento kowal_wfirma:exportinvoices
```

Import customers:

```bash
php bin/magento kowal_wfirma:importcustomers
```

Import products:

```bash
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

```sh
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

 [ **wFirma · Email** The bundled Kowal Email helper sends a templated diagnostic message through Magento’s mail transport when called by integration code. ](https://info.srv.kowal.co/docs/magento/modules/kowal-wfirma/email) [ **wFirma · Attributes Query** Provide product attribute lookup and write helpers used by the wFirma integration to update Magento catalog data by SKU. ](https://info.srv.kowal.co/docs/magento/modules/kowal-wfirma/attributesquery)

---

## Navigation

- Parent: [Magento 2 Extensions](https://info.srv.kowal.co/docs/magento/modules.md)
- Previous: [Analytics](https://info.srv.kowal.co/docs/magento/modules/kowal-analytics.md)
- Next: [Add to Cart Description](https://info.srv.kowal.co/docs/magento/modules/kowal-addtocart-description.md)
- Children:
  - [wFirma · Email](https://info.srv.kowal.co/docs/magento/modules/kowal-wfirma/email.md)
  - [wFirma · Attributes Query](https://info.srv.kowal.co/docs/magento/modules/kowal-wfirma/attributesquery.md)
