Console Commands

It is possible to use a console command to reconnect or remove the account. This process can be handy when your deployments are automated. From 7.6.0 it is also possible to clear Nosto message queues with a console command. This might be helpful in debugging.

3.0.0

Getting tokens from the Nosto Admin Panel.

Getting Store View Scope Code From Magento's Backend

Since you need a different Nosto account for each store view, you need to get the store scope code. You can find in: Stores -> All stores

Click on your store view:

Copy the value from de code field

Using the Console Command to Reconnect Your Existing Nosto Account

Using the interactive mode

  • Open the terminal and head to you Magento installation path directory

    You can run:

    bin/magento nosto:account:connect and enter the interactive mode, where you will input the required tokens.

Using the non-interactive mode

In order to use this command with non-interactive installation scripts, you can also pass all the parameters via the command line arguments.

Example of non-interactive command:

bin/magento nosto:account:connect \
--account-id=NOSTO_ACCOUNT_NAME \
--sso_token=SSO_TOKEN \
--products_token=PRODUCTS_TOKEN \
--settings_token=SETTINGS_TOKEN \
--rates_token=RATES_TOKEN \
--apps_token=APPS_TOKEN \
--scope-code=STORE_VIEW_SCOPE_CODE --no-interaction

Using the Console Command to Remove Nosto account from your store view

This command is used to disconnect an existing account from your store.

Using the interactive mode

  • Open the terminal and head to you Magento installation path directory

    You can run:

    bin/magento nosto:account:remove and enter the interactive mode, where you will input the store view scope code.

Using the non-interactive mode

In order to use this command with non-interactive installation scripts, you can also pass the parameter via the command line arguments.

Example of non-interactive command:

bin/magento nosto:account:remove \
--scope-code=STORE_VIEW_SCOPE_CODE --no-interaction

Using the Console To Clear Messages on RabbitMQ

  • Open the terminal in your Magento root directory and run

    bin/magento nosto:clear:message-queue

This will clear all messages on both update and delete queues.

Last updated