Settings and errors
This article contains reference points for specific JSON settings and error codes within the Client Center.
If a setting is not explicitly added in the definition of the Client Center website, its rule will not be enforced.
To apply a setting, you need to restart the website using the Instance Manager.
IsNewOrderEnabled setting
By default, the ability to create new orders in the Client Center is disabled.
To enable it, you have to apply the necessary JSON setting in the website's definition.
Enter the following value in the Settings field:
{"NewOrderDocumentType": "DocumentType.Id","IsNewOrderEnabled": true}
Note
DocumentType.EntityName must be equal to "SalesOrders"
For example:
{"NewOrderDocumentType": "85493adb-ac4e-4b3c-89bc-590c4b22404c","IsNewOrderEnabled": true}
If only one of the JSON settings is set or the ID doesn't match any sales order document type, an error code CC008 or CC009 is displayed.
IsOrdersEnabled setting
By default, the Orders section of the Client Center is enabled.
To disable it, enter the following value in the Settings field:
{"IsOrdersEnabled": false}
OrderDocumentTypes setting
This setting defines which document types are shown in the Orders module.
To include a type to be shown, enter its ID in the Settings field. Multiple types can be specified - simply separate them by a comma.
"OrderDocumentTypes": ["DocumentType1.Id", "DocumentType2.Id", "DocumentTypeN.Id"]
If a value for this setting is not specified, all document types in the module are displayed.
InvoiceDocumentTypes setting
This setting defines which document types are shown in the Invoices module.
To include a type to be shown, enter its ID in the Settings field. Multiple types can be specified - simply separate them by a comma.
"InvoiceDocumentTypes": ["DocumentType1.Id", "DocumentType2.Id", "DocumentTypeN.Id"]
If a value for this setting is not specified, all document types in the module are displayed.
HideLines setting
Document lines are visible by default both in the Billing and the Orders sections of the Client Center.
To hide them, enter the following value in the Settings field:
{"HideLines": true}
HideCustomerProducts setting
Customer products are visible by default in the My Products tab during the creation of a new order in the Client Center.
To hide the products and this tab, enter the following value in the Settings field:
{"HideCustomerProducts": true}
HideDistributionChannel setting
Products linked to a customer's default distribution channel are visible by default during the creation of a new order in the Client Center.
To hide the products and this tab, enter the following value in the Settings field:
{"HideDistributionChannel": true}
DefaultStore setting
You can set a default store for every new order created in the Client Center. This is a prerequisite when you want to see the actual availability when adding quantities of a product to the order, as long as an AvailabilityMax setting is also in place.
To set a default store, enter the following value in the Settings field:
{"DefaultStore": "ID"}
where ID is the identifier of the store (e.g. 00002).
AvailabilityMax setting
This setting defines the maximum product (stock) quantity to be displayed directly in the Availability column when creating a new order. It is also a prerequisite for availability to be shown as a whole, provided a DefaultStore is also present.
For instance, if the Max threshold is set to "100", but 200pcs of a product are requested, the user will need to call a sales representative to confirm if the quantity is present. This will be necessary regardless if the actual availability is larger or smaller than the one requested.
The AvailabilityMax value is taken from the ATPBase field in the AvailableToPromise report, using the row where:
- Store = DefaultStore
- Product = Current Product
- EnterpriseCompany = current Client Center’s WebSite.EnterpriseCompany
- FromDate = latest date ≤ today
To enforce the rule, enter the following value in the Settings field:
{"AvailabilityMax": <number>}
where
SiteChannel setting
Each Client Center has its own distribution (site) channel.
If a custom distribution channel is not explicitly defined, the Client Center is automatically assigned a distribution channel with code "CC" and name "Client Center". When products are linked to this channel, they will appear as part of a tab carrying that channel's name in the New Order module.
Site channels can be overridden by specifying the code value of another distribution channel in the Settings field:
"SiteChannel": "DistributionChannel.Code"
where DistributionChannel.Code is the code of the channel (e.g. "CC").
Note
Settings are applied in a key-value pair JSON format in the Settings field of the Client Center website definition.
Error exception codes
CC002
The logged user is not defined as a Person.
Please define Person object for this user to use the Client Center.
CC003
Parent party of the logged user is empty.
Please set parent party to the company on behalf of which the user is entering Client Center.
CC004
The parent party is not defined as a customer.
It should be customer in order to use Client Center.
CC005
The Client Center is not setup correctly - Enterprise Company is not set in the definition of the web site.
Please set Enterprise company accordingly.
CC006
The parent party does not have customer agreement for the enterprise company of the Client Center.
Create customer agreement for this party.
CC007
ServicedByEnterpriseCompanyLocation is null.
Please set ServicedByEnterpriseCompanyLocation to the asigned ParentParty.Customer for this user.
CC008
Not well formatted JSON string.
CC009
Incorrect setup of Client Center - the option NewOrderDocumentType is set, but DocumentType is null.
CC010
The logged-in user does not have a defined role.
Please add the user to the Crm_Customer_External_Access table and assign an appropriate role.