products Commands
-
Prepare product data files for import.
commerce:products:import
Prepare product data files for import.
Examples for commerce:products:import
sfdx commerce:products:import --store-name test-store
Command Syntax
sfdx commerce:products:import[
--json][
--loglevelLOGLEVEL][
-vTARGETDEVHUBUSERNAME][
-uTARGETUSERNAME][
--apiversionAPIVERSION][
-cPRODUCTS-FILE-CSV][
-fDEFINITIONFILE][
-oTYPE][
-nSTORE-NAME][
-y]
Parameters
--jsonOptional
Format output as JSON.
Type: boolean
--loglevelLOGLEVELOptional
The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.
Type: enum
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn
-v|--targetdevhubusernameTARGETDEVHUBUSERNAMEOptional
A username or alias for the target Dev Hub org. Overrides the default Dev Hub org.
Type: string
-u|--targetusernameTARGETUSERNAMEOptional
A username or alias for the target org. Overrides the default target org.
Type: string
--apiversionAPIVERSIONOptional
Override the API version used for API requests made by this command.
Type: string
-c|--products-file-csvPRODUCTS-FILE-CSVOptional
The csv file containing products to import. Pass in empty value to do product-less import.
Type: string
Default value: ~/.commerce/examples/csv/Alpine-small.csv
-f|--definitionfileDEFINITIONFILEOptional
Config file.
Type: filepath
Default value: ~/.commerce/config/store-scratch-def.json
-o|--typeTYPEOptional
The type of store you want to create.
Type: string
Permissible values are: b2c, b2b
Default value: b2c
-n|--store-nameSTORE-NAMERequired
Name of the site to create.
Type: string
Default value: 1commerce
-y|--promptOptional
If there is a file difference detected, prompt before overwriting file.
Type: boolean