Account Management
General summary
In this document we will provide information about how and when the account service is available for usage,the account provides information about a POC (Point of Connection/Consumption), such as address, contact and credit data, among others. It is a representation of the Customer and even a great part of the configuration for its establishment.
Account Placement
The account creation has no requirements related to other services, meaning the relay will be the entry for both the existing ERP accounts and the new ones created by BEES platform, for its creation it should be only necessary fill the required fields of this relay. Below are the description of how to access and interact with the relay
Load limits
Regardless the robustness infrastructure the Bees platform has, it is necessary to limit the size of payload in 1 Mb per request, related to security and performance reasons. This number could be grater if the payload is compressed. Check the limit number per entity below:
Architecture
Above are the explanation of the fields in the json payload for a good account to fit in the BEES.
The account, representing a POC, is informed by the ERP used in the specific Zone containing information about the Customer. It also contains some attributes of the Customer, like the delivery window and main payment method. For more details look up for the whole service in the links that will be shown later in this document.
Highlight fields
Below are described which fields or attributes are important to have for a valid account:
It's important the account to have a valid set of information in order to further services work properly.
Set as an Account, it does not process or have other functionality beyond the scope of an account other than represent its main configuration, payment methods and others.
Entites are linked by the following fields:
Accounts - DeliveryScheduleId should be relationed to DeliveryWindows - _id
Account data details
Account information related to:
Minimum / maximum order: To set how to calculate the minimum and maximum order rule, send the objects inside the account payload:
"maximumOrder": {
"paymentMethods": "CASH",
"type": "PRODUCT_QUANTITY",
"value": 20
},
"minimumOrder": {
"paymentMethods": "CASH",
"type": "PRODUCT_QUANTITY",
"value": 20
}
The types could be:
- PRODUCT_QUANTITY
- ORDER_VOLUME - It requires that all items should have the unit of measurement in liters.
- ORDER_TOTAL
- SKU_DEFINED - It requires that all items should have minimum quantity informed.
Account Deletion
The account deletion is a resource available in the account relay, it is accessed in the same endpoint as the account, passing the id of the account in the path of this endpoint.
Previously the link would be accessed by the POST method of the http protocol, the difference now is the method, being the DELETE method.
Credit Management
The following statement describes how the information are shown, not necessarily included in the platform the order described, in fact the platform receives the information references of an account separately of the representation of its delivery window, and credit if the payment method has credit attribute.
Credit configuration for account is inserted after the account is created, in the /credits endpoint in the relay, in which the field accountId is used to reference its configuration to the account, and the other fields are used as a configuration for the credit, where is it listed here:
“available”;
“balance”;
“consumption”;
“overdue”;
“paymentTerms”;
“total”.
Where each one of the fields represent the current status of the account credit.
Load limits
Regardless the robustness infrastructure the Bees platform has, it is necessary to limit the size of payload in 1 MB per request, related to security and performance reasons. This number could be greater if the payload is compressed. Check the limit number per entity below:
Delivery Window Management
The delivery window is the date and schedule configuration for deliveries of the account. It is not required for the account creation, but it is highly recommended the creation of the delivery window configuration for next steps.
Only not expired delivery windows will be retrieved by the API. The attribute checked is expirationDate.
The alternative attribute:
To create a regular delivery window the alternative attribute must be sent as false.
{
"alternative": false,
"deliveryScheduleId": "00112939399",
"endDate": "9999-12-30",
"expirationDate": "9999-12-30T23:59:59Z",
"id": "004940332",
"startDate": "9999-12-30"
}
To create a non-regular delivery date (or flexible delivery date): the attribute has to be set as true
{
"alternative": true,
"deliveryScheduleId": "00112939399",
"endDate": "9999-12-30",
"expirationDate": "9999-12-30T23:59:59Z",
"id": "004940332",
"startDate": "9999-12-30"
}
Load limits
Regardless the robustness infrastructure the Bees platform has, it is necessary to limit the size of payload in 1 MB per request, related to security and performance reasons. This number could be grater if the payload is compressed. Check the limit number per entity below: