Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Commands

The console command of the plugin with all options and the Shopware commands that help with installation, operation and troubleshooting.

This page is meant for administrators and agencies. It describes the console command of the plugin and the Shopware commands you need in connection with the search. You run all commands in the main folder of your shop.

The Shopware commands are Shopware standard, their options are not part of the plugin. If in doubt, bin/console <command> --help shows the options of your Shopware version.

The plugin's command: backfill revenue

The plugin brings exactly one command of its own:

bin/console cogi-insightsearch:suite-backfill

What it is for

The command backfills orders and revenue via the search once as daily totals for the cogi Commander. This makes sense for orders from the time before the Commander was installed. You can read more about the Commander under Feedback, support and Commander.

Prerequisite

The cogi Commander must be installed and active. Otherwise the command stops and reports that the Commander is not active. The right order is:

  1. Install and activate the Commander.

  2. Start the backfill.

  3. After that, the Commander takes over the further data itself.

Options

Option
Effect
Default

--from=YYYY-MM-DD

First day from which orders are backfilled

all orders

--force

Runs the backfill again although it has already run

off

Examples:

Good to know

  • If the backfill runs a second time without --force, the command reports on which date it already ran and does nothing.

  • Use --force only as long as the Commander has not taken over anything yet. Otherwise values are counted twice.

  • The date for --from must be in the format YYYY-MM-DD, for example 2026-01-01. Otherwise the command stops with an error message.

  • The period ends on the day on which the running route via events began. This way nothing is counted twice.

  • At the end the command reports how many orders it read, how many rows it wrote and which period it covers.

Shopware commands in this context

Installation and update

Command
Effect

bin/console plugin:refresh

Lets Shopware detect the plugin after the files have been placed

bin/console plugin:install --activate CogiInsightSearch

Installs and activates the plugin

bin/console plugin:update CogiInsightSearch

Updates the plugin and runs database adjustments

bin/console cache:clear

Clears the Shopware cache

bin/console theme:compile

Rebuilds the theme so that changes in the storefront become visible

If you install the plugin through the extension manager in the admin, the first three commands are not needed.

The commands for installation and update in order:

Background processing (worker)

Command
Effect

bin/console messenger:consume async low_priority

Starts a worker. It works through the jobs of the queue, for example push packages and messages about cart and order.

bin/console messenger:stop-workers

Tells running workers to end. A service such as Supervisor or systemd restarts them.

For permanent operation, start the worker as a service and give it limits:

When which command is worth it:

  • After a plugin update: messenger:stop-workers, so that the workers load the new code.

  • Push is stuck or statistics stay empty: Check whether a worker is running. More on this under Push and live synchronisation.

Scheduled tasks

Command
Effect

bin/console scheduled-task:register

Registers the scheduled tasks, including those of the plugin

bin/console scheduled-task:run

Works through the scheduled tasks permanently (as a service or by cron)

bin/console scheduled-task:run-single <task>

Starts a single task immediately

The tasks of the plugin are named:

Technical name
Effect

cogi_insightsearch.push_indexing

Daily push of all push indexes

cogi_insightsearch.push_finalize

Monitoring of stuck runs

cogi_insightsearch.keepalive

Connection check

cogi_insightsearch.delta_push

Live synchronisation

cogi_insightsearch.order_backfill

Catching up on orders of the last 7 days

Example: you have the monitoring check a stuck push run immediately, without waiting 10 minutes:

You find an overview of the tasks with their interval under Push and live synchronisation.

Reading and setting configuration

Command
Effect

bin/console system:config:get CogiInsightSearch.config.enableSearch

Reads a configuration value, here the switch "Enable search"

bin/console system:config:set CogiInsightSearch.config.<key> <value>

Sets a configuration value

An important case is the copy of a shop to staging. If an already connected shop was copied 1:1, the copy carries the same connection as the original and would write into its search index and statistics. In that case, empty both keys in the copy:

Then run through the setup in the plugin again and create an index of its own. Do not deactivate or uninstall the plugin in the copy beforehand, otherwise the original is logged out. More on this under Stage and Live.

Indexes and product export

Command
Effect

bin/console dal:refresh:index

Rebuilds the Shopware indexes, for example after large imports

bin/console product-export:generate

Generates the product export file (the feed) immediately. --help shows the options.

Two notes on this:

  • Pull feed: With the setting "Generate in the background", changes only appear when Shopware regenerates the export. You can trigger the export with product-export:generate. Afterwards, re-import the product data in the "Sources" area.

  • Live synchronisation: The plugin notes changes that Shopware reports when rebuilding the indexes. A very large rebuild can queue many entries. If they exceed 20,000, the queue is discarded and the next complete push takes over everything.

Which command helps when?

Situation
Command

Plugin newly installed or updated

plugin:install --activate or plugin:update, then cache:clear

Worker with old code

messenger:stop-workers

Storefront settings have no effect

cache:clear, for theme changes theme:compile

Push stops

Check the worker, scheduled-task:run-single cogi_insightsearch.push_finalize

Feed shows old data

product-export:generate, then "Re-import product data"

Staging copy writes into the original

Empty both keys with system:config:set

Old orders missing in the Commander

cogi-insightsearch:suite-backfill

Further reading

Push and live synchronisationTroubleshootingStage and live

Last updated