It is used to build a one page view of all the sites preferences within a SFCC instance.
- Go to Administration > Site Development > Open Commerce API Settings
- Select Type : Data
- Select Context : Global
- Settings for default client id (Change the client id if required)
{
"_v":"21.3",
"clients":[
{
"client_id":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"resources":[
{
"resource_id":"/system_object_definitions/**",
"methods":[
"get"
],
"read_attributes":"(**)",
"write_attributes":"(**)"
},
{
"resource_id":"/site_preferences/**",
"methods":[
"post"
],
"read_attributes":"(**)",
"write_attributes":"(**)"
}
]
}
]
}
npm install sfcc-1page-preferences -g
sfcc-1page-preferences [options]
Sample command when installed globally
sfcc-1page-preferences -h=<hostname> -c=<clientId> -p=<clientPassword>
OR
sfcc-1page-preferences --hostname=<hostname> --clientId=<clientId> --clientPassword=<clientPassword>
May skip clientId and clientPassword when they are default aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--help Generate help message -h, --hostname Hostname of the SFCC Business Manager instance -c, --clientId OCAPI client ID -p, --clientPassword OCAPI client password
Default clientId and clientPassword (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) will be used if it is not provided.