@springtree/eva-core
Version:
The EVA core typings
118 lines (112 loc) • 5.32 kB
TypeScript
declare module EVA.FTH {
/**
* Set the expected due date for the baby on the order. When `DueDate` == null it will be removed.
*/
export interface FTHSetDueDateOnOrder {
OrderID: number;
DueDate?: string;
}
/**
* Get the expected due date for the baby on the order.
*/
export interface FTHGetDueDateForOrder {
OrderID: number;
}
export interface FTHGetDueDateResponse {
DueDate?: string;
Error: EVA.Core.ServiceError;
}
/**
* Imports the WishLists from the supplied Excel file.
*
* Checks for duplicates, so can be ran on the same file as much as you'd like. Do not run this service more than once at any one time.
*
* #Parameters
*
* * `Email` determines if an email is sent to the newly created users, containing login information (CustomerCreated stencil).
* * `Data` is the Excel you want to import. We're very strict on its contents and format, be sure to check out the notes below!
*
* # Procedure
*
* Upon completing the list of customers, orders and order lines, all data will be submitted to the database and the customers will receive a
* CustomerCreated template email. If anything up to this point went wrong, an error will be thrown and nothing is imported. When it is successful,
* an email (ImportWishListsResult stencil) containing a backup of login information is sent to your emailaddress - treat it thoughtfully!
*
* After customers, orders and order lines are processed, then all payments are processed onto the these imported orders. This will create and increment
* the WishList customer's UserCard. If anything goes wrong, an error will be thrown and the payments are not imported - any prior data that was
* processed, will remain, though.
*
* Take note;
*
* * There should be 3 sheets inside this single Excel file, called `Klanten`, `Orders` and `Aanbetalingen` - the order does not matter
* * These sheets should have 1 and exactly 1 header row - the actual contents of this row is not used
* * Double-check the columns are at the indicated position, see the list below - the actual name of the column in the header does not matter
* * This import will take ALL LINES and insert them as NEW, OPEN WISH LIST ITEMS. If the files contain shipped lines, or wish lists from babies that are already delivered, they too will be imported as new, open lines, and the customers will be notified (when `Email` is true)
* * The CustomerCreated template currently appears to contain no link or information for the user to log in, so you may want to create a specific template within the Geboortelijst OU containing the Password/Token and correct URL's to the Geboortelijst website.
*
* A payment is determined to be unique by the combination of columns `SCHENKER`, `TYPE`, `LIJN` and `BETAAL_DATUM`. Once this combination of fields was
* imported and processed onto a UserCard and WishList funding, it can NO LONGER BE CHANGED. When processed again, it will be skipped without any
* changes.
*
* Note we have no (NONE, NOT ANY) information on if this payment is actually done, or if these numbers are valid. It feels scary, but if we must,
* we must - just be aware. Make sure that every payment inside the Excel is checked, double-checked and double-double-checked.
*
* # Details
*
* * The order import will determine the OU using the `/MEC` and `/GEN` suffixes and ignore the address and `Organisatie` columns.
* * The order line import will map the `BackendID` column to a product `BackendID` and crash if none exists.
* * The order line import will ignore `UnitPrice` and `Discount` columns, we take the price as set in EVA.
* * The order line import does not remove lines that are present in EVA but not in the latest Excel.Quantities are updated, though!
*
* # Columns
*
* These are the columns and their expected place numbers of the Excel columns per sheet. First column (A in Excel) is 1.
*
* ## Klanten
*
* * Initials = 1
* * FirstName = 2
* * LastName = 3
* * Gender = 4
* * EmailAddress = 5 (cannot be empty)
* * PhoneNumber = 6
* * Nickname = 10
* * BackendRelationID = 11 (cannot be empty, must be unique in sheet)
* * LanguageID = 12
* * AddressedTo = 13
* * Street = 14
* * HouseNumber = 15
* * ZipCode = 16
* * City = 17
* * BabyBirthDate = 18 (should be formatted as Short Date)
* * Region = 19
* * CountryID = 20
* * Remark = 22
*
* ## Orders
*
* * BackendOrderID = 2
* * BackendProductID = 3
* * Quantity = 4
* * BackendRelationID = 8 (cannot be empty, must exist in Klanten sheet)
* * Remark = 10
* * InternalClientReference = 11
* * BabyBirthDate = 12 (should be formatted as Short Date)
* * DeliveryDate = 14 (should be formatted as Short Date)
* * CurrencyID = 21
*
* ## Aanbetalingen
*
* * BackendOrderID = 1 (must exist in Orders sheet)
* * BackendDate = 2 (should be formatted as Short Date)
* * Amount = 3
* * Name = 4
* * BackendProductID = 5 (must exist, in combination with BackendOrderID, in Orders sheet)
* * BackendLine = 7
* * BackendTypeID = 8
*/
export interface ImportWishLists {
Email: boolean;
Data: number[];
}
}