AccountImport URL
This URL imports a business account in XML format into .
URL structure
- https:// host_name/path
- The fully qualified name of your and the configuration path.
Before you issue this URL, you must be logged in to . You can log in to using the Logon command. For more information about the Logon command, see the related reference below.
Parameter values
&, <, >, ', \
- fileName
- Required: The name of the XML file that you want to import as a business account. The XML file
must be validated with the B2BTrading DTD.
The XML file that is being imported must exist in the location that is specified in the configuration file, and the file must be validated with the B2BTrading DTD or Package.xsd.
The location for the business account XML file to be imported is specified in the XMLPath attribute of the Trading tag in the configuration file. For example, if the configuration file contains the following lines:
<Trading DTDFileName="B2BTrading.dtd" DTDPath="/trading/dtd" XMLPath="/trading/xml" XSDPath="/trading/xsd" />
The business account XML file to be imported using This URL must be in WC_eardir /xml/trading/xml.
- xsd
- Required: Specifies whether the account XML is in DTD or XSD format. Use true to specify the account XML is in XSD format, otherwise use false.
- validate
- Specifies whether the account XML must be validated by the XML parser. Valid values for this
parameter are true and false. Use
true to have the account validated. Use
false to prevent the account from being validated by the XML parser.
If this parameter is not specified, a value of true is assumed.
- URL
- Required: The URL to be called when the command completes successfully.
Example
The following example imports an account:
https://myhostname/webapp/wcs/stores/servlet/
AccountImport?fileName=myaccountfile.xml&xsd=false&URL=StoreCatalogDisplay?storeId=512&catalogId=512
Behavior
This URL imports a business account into the database from an XML file. Before you import the business account, the command checks to ensure the business account that is being imported meets the following conditions:
- The business account XML file must conform to the B2BTrading DTD or Package.xsd
- The business account owner must be an organization
- The name of the business account must be unique for the account owner
- The current user must have the necessary rights to create a business account for the account owner
- The account must have only one Account Holder participant, and it must be an organization
- The business account must have only one Seller participant, and it must be an organization
- The business account must have only one Buyer Contact participant, and it must be a user
- If the Seller Contact participant is part of the business account, the Seller Contact participant must be an organization or a user
- If a Buyer participant is part of the business account, the Buyer participant must be a descendant of the Account Holder participant
- The business account must not specify any terms and conditions except the following terms:
- DisplayCustomization
- Invoice
- Payment
- PurchaseOrder
Exception conditions
The following exceptions may be thrown by this comment:
- _ERR_ACCOUNT_CMD_EXEC will be thrown if an unclassified application problem occurs during the processing of the business account.
- _ERR_ACCOUNT_CREATE will be thrown if an unclassified application problem occurs during the processing of the business account.
- _ERR_ACCOUNT_PARTICIPANT_GENERIC_ERROR will be thrown if an unclassified application problem occurs during the processing of a certain participant.
- _ERR_ACCOUNT_PARTICIPANT_INVALID_ROLE will be thrown if the business account specifies an invalid participant role.
- _ERR_ACCOUNT_PARTICIPANT_INVALID_MEMBER_TYPE will be thrown if the business account specifies an invalid member type for a certain participant.
- _ERR_ACCOUNT_PARTICIPANT_INVALID_MULTIPLICITY will be thrown if the business account specifies an invalid number of participants for a certain participant role.
- _ERR_ACCOUNT_PAYMENT_TC_CREDIT_POLICY_ONLY will be thrown if the payment term and condition references a payment business policy other than the Credit business policy.
- _ERR_ACCOUNT_PO_TC_GENERIC_ERROR will be thrown if an unclassified application problem occurs during the processing of a certain purchase order term and condition.
- _ERR_ACCOUNT_PO_TC_INVALID_PO_NUMBER will be thrown if a purchase order term and condition specifies an invalid purchase order number.
- _ERR_ACCOUNT_RESOLVE_OWNER_ID will be thrown if the command is unable to resolve the Account Owner element into a member ID.
- _ERR_ACCOUNT_RESOLVE_PARTICIPANT_MEMBER_ID will be thrown if the command is unable to resolve a participant into a member ID.
- _ERR_ACCOUNT_RESOLVE_STORE_OWNER_ID will be thrown if the command is unable to resolve the Store Owner element into a member ID.
- _ERR_ACCOUNT_RESOLVE_STORE_ID will be thrown if the command is unable to resolve the store ID.
- _ERR_ACCOUNT_TC_GENERIC_ERROR will be thrown if an unclassified application problem occurs during the processing of a term and condition.
- _ERR_ACCOUNT_TC_NOT_SUPPORTED will be thrown if the business account specifies an unsupported term and condition.
- _ERR_DUPLICATED_ACCOUNT_NAME will be thrown if the name of the business account is not unique for the Account Owner.