Description of data exchange file formats for Mobile Distribution version 1.0 and higher.

24 Ноября 2013

The application is implemented bi-directional data exchange. To export files, such as: information about products and their residues inventory, clients and orders of payment, confirmed cash orders, currency exchange rates - mobile application receives by HTTP-GET request to the server (such as IIS). To import files, such as: the orders and return of goods journals, requests for payment, the location of clients and the error dump - application sends using the HTTP-POST request to the server.

The list of files stored on exchange server and the mobile device below. A data separator is "#". (cannot be used in names of products, etc.), a decimal part of the number is - ".".


Export files from the application:

  • GoodsDataFile_[WarehousesName].txt (example: "GoodsDataFile_MainWarehouse.txt")
  • ClientsDataFile_[RepresentativeNN].txt (example: "ClientsDataFile_Representative01.txt")
  • AcceptedPKODataFile.txt
  • Currency.txt

Import files in the application:

  • [RepresentativeNN]_orders_journal.txt
  • [RepresentativeNN]_[ClientsCode]_[DateTimeOfOrder].txt
  • [RepresentativeNN]_pko_journal.txt
  • [RepresentativeNN]_clients_location.txt
  • [RepresentativeNN]_unhandled_exception.txt


The following is a detailed description of the exchange files.


Export file GoodsDataFile_[WarehousesName].txt
Appointment: contains information of the goods characteristics and its remnants in stock.
Multiline.
A separate file for each mobile device.
An example file name: "GoodsDataFile_MainWarehouse.txt".

The order of the data in the row:
1. Goods code (STRING).
2. Goods article (STRING).
3. Goods barcode (STRING).
4. Goods name (STRING).
5. Goods group (STRING).
6. Price (NUMBER).
7. Available remnants of goods in stock (STRING or NUMBER).
8. Number of units in a package (NUMBER).

String format:
[STRING]#[STRING]#[STRING]#[STRING]#[STRING]#[NUMBER]#[STRING|NUMBER]#[NUMBER]

Example:
0000001#90004044##APECS EM-70-C-G (CIS)#Door cillinder#21.50#44#200


Export file ClientsDataFile_[RepresentativeNN].txt
Appointment: contains information about the clients that are assigned to the current sales representative.
Multiline.
A separate file for each mobile device.
An example file name: "ClientsDataFile_Representative21.txt".

The order of the data in the row:
1. Clients code (STRING).
2. Clients name (STRING).
3. Clients address (STRING).
4. Clients contact phone number (STRING). From the mobile applications are able to make a call to the specified number.
5. Sales representative's client code (STRING).
6. List of dates of client visits a month in advance (STRING). This list is a plain text.
7. The client's channel (STRING).
8. Clients e-mail (STRING).
9. The client's contact person (STRING).
10. The depth of the client's credit in days (NUMBER).
11. The client's ceiling of the shipment (NUMBER).
12. Clients debt (NUMBER).
13. Seven pairs of the following clients payments (from 13 to 26):
Date of payment (DATE in format MM.DD.YY) - leave blank if the debt is 0.
Sum of payment (NUMBER).
27. Discount from regular price (NUMBER).

String format:
[NUMBER]#[STRING]#[STRING]#[STRING]#[STRING]#[STRING]#[STRING]#[STRING]#[STRING]#[NUMBER]#[NUMBER]#[NUMBER]#[DATE]#[NUMBER]#[DATE]#[NUMBER]#[DATE]#[NUMBER]#[DATE]#[NUMBER]#[DATE]#[NUMBER]#[DATE]#[NUMBER]#[DATE]#[NUMBER]#[NUMBER]

Example:
a string with the data about the client without debt:
21274#WALDEN SCHMIDT#91 Bedford Street, New York#000 111-22-33#Representative01#07.17.13; 07.24.13; 07.31.13; 08.07.13; 08.14.13;#Channel1#mail@mail.com#John#15#2000#0##0##0##0##0##0##0##0#0

a string with the data about the client with debt:
21274#WALDEN SCHMIDT#91 Bedford Street, New York#000 111-22-33#Representative01#07.17.13; 07.24.13; 07.31.13; 08.07.13; 08.14.13;#Channel2#mail@mail.com#John#15#17157#6697.09#07.17.13 #393.67#07.24.13 #2459.43#07.26.13 #0.08#07.31.13 #3843.91##0##0##0#0


Export file AcceptedPKODataFile.txt
Appointment: list of confirmed in accounting system of client's cash orders.
Multiline.
The file is common to all mobile devices.

The order of the data in the row:
1. Clients code (NUMBER).
2. Date and time when the cash order was created in mobile application (YYYY-DD-MM HH:MM:SS).
3. Orders sum (NUMBER).

String format:
[NUMBER]#[YYYY-DD-MM HH:MM:SS]#[NUMBER]

Example:
2114#2013-03-07 12:43:08#200
048#2013-03-07 12:50:34#0
21192#2013-03-07 10:02:16#112


Export file Currency.txt
Appointment: contains the current exchange rate of foreign currency.
Single-Line.
The file is common to all mobile devices.

The order of the data in the row:
1. The current rate of foreign exchange.

String format:
[NUMBER]

Example:
8.15


Import file [RepresentativeNN]_orders_journal.txt
Appointment: contains headers of orders created on the mobile application.
Multiline.
A separate file for each mobile device.
An example file name: "Representative01_orders_journal.txt".

The order of the data in the row:
1. The date and time when order was created (YYYY-DD-MM HH:MM:SS).
2. Clients code (STRING).
3. Clients name (STRING).
4. Orders sum (NUMBER).
5. Type of payment: "after delivery" or "deferred payment" (STRING "Y"|"N").
6. Orders reason (STRING).
7. Orders status - ready or not (STRING "Y"|"N").
8. Status of successful sending order to the server (STRING "Y"|"N").
9. Latitude of the place where order was created (NUMBER).
10. Longitude of the place where order was created (NUMBER).
11. Orders sum, as evidenced by the remains in stock (NUMBER).
12. Type of the order: for refund or shipment of goods (STRING "Y"|"N").
13. Reason for return of goods (STRING). May be the reason code in the accounting system.
14. The reason for the empty order (STRING). Possible applications: information to the supervisor why sales representative not visited the client.

String format:
[YYYY-DD-MM HH:MM:SS]#[NUMBER]#[STRING]#[NUMBER]#["Y"|"N"]#[STRING]#["Y"|"N"]#["Y"|"N"]#[NUMBER]#[NUMBER]#["Y"|"N"]##

Example:
2013-15-07 14:07:18#21274#WALDEN SCHMIDT#1980.62#N#Delivery at 07.16.2013#Y#Y###1390.51#N##


Import file [RepresentativeNN]_[ClientsCode]_[DateTimeWhenOrderWasCreated].txt
Appointment: contains a table of specific order.
Multiline.
A separate file for each mobile device and for each order.
An example file name: "Representative01_21274_2013-14-08 12-45-55.txt"

The order of the data in the row:
1. Goods code (STRING).
2. Goods name (STRING).
3. Quantity (NUMBER).
4. Price (NUMBER).
5. The available balance at the time when order was created (STRING "+"|"-").

String format:
[STRING]#[STRING]#[NUMBER]#[NUMBER#["+"|"-"]

Example:
0000001#APECS EM-70-C-G (CIS)#2#44.12#-
0000002#APECS SC(DF)-M70-Z-C-NI#2#46.41#+


Import file [RepresentativeNN]_pko_journal.txt
Appointment: contains cash orders for debt repayment by the client.
Multiline.
A separate file for each mobile device.
An example file name: "Representative21_pko_journal.txt"

The order of the data in the row:
1. The date and time when cash order was created (YYYY-DD-MM HH:MM:SS).
2. Clients code (STRING).
3. Clients name (STRING).
4. Cash orders sum (NUMBER).
5. Cash orders reason (STRING).
6. Status of successful sending cash order to the server (STRING "Y"|"N").
7. Planned date of payment by the client (MM.DD.YYYY).

String format:
[YYYY-DD-MM HH:MM:SS]#[STRING]#[STRING]#[NUMBER]#[STRING]#["Y"|"N"]#[MM.DD.YYYY]

Example:
2013-04-07 14:27:35#21274#WALDEN SCHMIDT#3163.65##Y#07.05.2013


Import file [RepresentativeNN]_clients_location.txt
Appointment: contains the coordinates of the clients location, tagged with a sales representative by using the application on mobile device.
Multiline.
A separate file for each mobile device.

The order of the data in the row:
1. Clients code (STRING).
2. Latitude of the point of delivery (NUMBER).
3. Longitude of the point of delivery (NUMBER).

String format:
[STRING]#[NUMBER]#[NUMBER]

Example:
221115#50,027860#36,183976
2026#49,998459#36,205695


Import file [RepresentativeNN]_unhandled_exception.txt
Appointment: contains a list of application error fixed on crashes.
Multiline.
A separate file for each mobile device.

Thank you. Comments you can leave after registration on our site. Dmytro Kalchenko.

Короткая ссылка на новость: http://www.task-idea-solution.org/~p1T4g