Sample Data Add-On
The Sample Data add-on builds a connected PunchOut example in Magento. It provides OCI and cXML buyer profiles, customers, products, returned-cart data, inbound purchase orders and completed outbound documents. This is useful for demonstrations, administrator training and integration checks where an empty installation would hide how the records relate to each other.
The package contains fixed public sample credentials. Install it only in a local, demo or staging environment. Never install it in production.
- Composer package:
mageb2b/punchout-sample-data - Magento module:
MageB2B_PunchoutSampleData - Required base module:
MageB2B_Punchout
Install the package
composer config bearer.repo.softwaresilo.io <token>
composer config repositories.softwaresilo composer https://repo.softwaresilo.io/
composer require mageb2b/punchout-sample-data:*
php bin/magento module:enable MageB2B_PunchoutSampleData
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean config
The data patch runs during setup:upgrade. A default Store View must exist before it runs.
What the fixture set contains
The add-on creates a small demo catalog with an office chair, a docking station, a laptop stand and safety gloves. It also creates a procurement customer with billing and shipping addresses.
Three buyer profiles exercise different identity and order paths:
| Profile | Purpose |
|---|---|
| OCI | Authenticated OCI shopping session and cart return |
| cXML with fixed customer | cXML setup, cart return and inbound order for the customer assigned to the buyer profile |
| cXML with customer mapping | Resolves the customer from the end-user email and can create the customer when the buyer profile permits it |
The fixture graph includes both a successful and a rejected cXML OrderRequest. The successful request is connected to a Magento order, invoice and shipment. The rejected request contains an unknown supplier part ID and therefore has no Magento order. Completed replay protection, trace entries and outbound invoice and shipment queue records are also included.
The add-on enables PunchOut sandbox mode at Default Config only when no stored default value exists. It also supplies sample supplier credentials and a flat-rate shipping setup. Existing Default Config values are not overwritten, and more specific website or Store View configuration continues to take precedence.
Where to inspect the data
The add-on has no separate Admin page. Use the standard Magento and PunchOut areas:
- Punchout > Buyers for the OCI and cXML profiles
- Punchout > Trace for setup, transfer, inbound-order and rejection stages
- Punchout > Inbound Orders for the accepted and rejected purchase orders
- Punchout > Document Queue for completed invoice and shipment documents
- Customers > All Customers for the procurement customer and addresses
- Catalog > Products for the demo products
- Sales > Orders for the connected order, invoice and shipment
This separation is intentional. The sample records exercise the same screens and relations used by a real implementation.
Verify the installation
Run the supplied verifier after installation:
php bin/magento sampledata:verify:punchout
It checks the customer, addresses, category, products, buyer profiles, mappings and settings. It also follows the lifecycle from the transferred context and returned cart through accepted and rejected inbound orders, Magento sales records, replay protection, trace stages and the two completed document-queue entries.
A non-zero exit code means the fixture set is incomplete. Read the reported item before resetting anything. A missing base product or buyer profile can make several later lifecycle checks fail at once.
Repeated installation
The installer uses stable sample identifiers and can run more than once without duplicating the fixture graph. Existing sample buyer profiles are updated. Existing customers, products and categories with the sample identifiers are reused or skipped as appropriate.
The standard mapping templates are shared module data. They are synchronized before the PunchOut fixtures are installed and are not treated as disposable sample records.
Reset the fixtures
Create a database backup first if anyone has edited the sample records or attached other work to them. Then run:
php bin/magento sampledata:reset:punchout
The command asks for confirmation and defaults to No. It targets the known sample customer, catalog records, buyer profiles and lifecycle identifiers. Unrelated PunchOut data and shared mapping templates remain in place. Sample configuration is removed only while its current value still matches the value installed by the package.
To install the fixtures again:
php bin/magento setup:upgrade
php bin/magento sampledata:verify:punchout
The reset can be repeated safely when part of the sample set is already missing.
Troubleshooting
Verification reports several missing lifecycle records
Start with the first missing customer, product, buyer profile or returned-cart record. Later order, invoice, shipment and queue records depend on those earlier fixtures. Review the preceding setup:upgrade output and Magento logs before running reset.
The sample configuration differs from this guide
The installer does not replace existing Default Config values, and website or Store View values can override them. Check the effective configuration scope before assuming the fixture is incomplete.
Reset leaves a configuration value in place
This protects later administrator changes. The reset removes a sample setting only when the current stored value is still exactly the installed sample value. Review and remove a deliberately changed setting manually if the environment no longer needs it.
The rejected order has no Magento order
That is expected. It intentionally references an unknown supplier part ID so the error path, trace and inbound-order record can be inspected without creating a sales order.