Page background
Support item image

Customising Import Scripts

As well as the providing the Import routine to build scripts, Salesmatrix allows saved scripts to be attached to customised buttons, in order to simplify future data imports.

There are up to four buttons that can be connected to particular scripts.

To activate these buttons two components need to be placed in the base directory of your Salesmatrix - a picture file for the button and a script file that is activated for this button. The base directory is installed, by default, on C:\Program Files\Salesmatrix\Scriptsv5.

The button pictures must be named "button1.jpg", "button2.jpg", "button3.jpg" or "button4.jpg".

In a similar fashion the script files that are activated behind these button must be called "scriptv1.smd", "scriptv2.smd", "scriptv3.smd" and "scriptv5.smd".

Editing script files

Each script file (*.Smd) file is stored as a text file. To modify the file, you can open it with a text editor like MS Word or WordPad. The following is a description of what is stored in the file:

Line Number Description Example
Line 1 Transaction Field that links to customer Trans Customer Link =INVHEADER.CUSTOMER.
Line 2 Transaction Field that links to Salesman File Trans Sman Link =INVHEADER.SALESPER.
Line 3 Transaction Date Field Trans Date =INVHEADER.TRANDATE.
Line 4 Transaction Header to Line item Linking statement Trans Inv No =INVHEAD.INVNO=INVLINE.INVNO
Line 5 Transaction Field that links to Product File Trans Prod Link =INVLINE.ITEM.
Line 6 Transaction Value Field Trans Value =INVLINE.FAMTSALES.
Line 7 Transaction Cost Field Trans Cost =INVLINE.COSTSALES.
Line 8 Transaction Units Field Trans Units =INVLINE.QTYSOLD.
Line 9 Product Code field (must match transaction field) Prod Link =ICITEM.ITEMNO.
Line 10 Product Description field Prod Name =ICITEM.DESC.
Line 11 Product Value Field (not required) Prod Value =ICITEM.SALEPRICE
Line 12 Product Cost Field (not required) Prod Cost =ICITEM.COST
Line 13 1st Product Category Field Prod Cat1 =ICITEM.CATEGORY.
Line 14 2nd Product Category Field Prod Cat2 =ICITEM.ALTSET.
Line 15 Customer Code field (must match transaction field)</< TD> Cust Link =ARCUS.IDCUST.
Line 16 Customer Name field Cust Name =ARCUS.TEXTSNAM.
Line 17 Customer Category 1 Cust Cat1 =ARCUS.IDGRP.
Line 18 Customer Category 2 Cust Cat2 =ARCUS.CODESTTE.
Line 19 Salesperson Code field (must match transaction field)</< TD> Sman Link =ARSAP.CODESLSP.
Line 20 Salesperson Name field Sman Name =ARSAP.NAMEEMPL.
Line 21 Salesperson Category 1 Sman Cat2 =ARSAP.BRANCH
Line 22 Salesperson Category 2 Sman Cat1 =ARSAP.DEPT
Line 23 Product Selection Statement ProdXSQL =SELECT DISTINCT ICITEM.ITEMNO AS CID, ICITEM."DESC" AS CNAME, ICITEM.CATEGORY AS PCAT1, ICITEM.ALTSET AS PCAT2 FROM ICITEM ICITEM.
Line 24 Customer Selection statement CustXSQL =SELECT DISTINCT ARCUS.IDCUST AS CID, ARCUS.TEXTSNAM AS CNAME, ARCUS.IDGRP AS CCAT1, ARCUS.CODESTTE AS CCAT2 FROM ARCUS ARCUS.
Line 25 Salesman selection statement SmanXSQL =SELECT DISTINCT ARSAP.CODESLSP AS CID, ARSAP.NAMEEMPL AS CNAME FROM ARSAP ARSAP.
Line 26 Transaction selection statement TranXSQL =SELECT INVHEADER.CUSTOMER AS CCUSTID, INVHEADER.SALESPER AS CSMANID, INVHEADER.TRANDATE AS DTRANDATE, INVHEADER.ITEM AS CPRODID, INVLINE.FAMTSALES AS NVALUE, INVLINE.QTYSOLD AS NUNITS, INVLINE.FCSTSALES AS NCOST FROM INVLINE INVLINE, INVHEADER INVHEADER WHERE INVLINE.INVNO=INVHEADER.INVNO
Line 27 Special date format selection (can be left blank for standard MS ODBC Date formats) Dates ={ACCPAC}{Timestamp}
Line 28 Product Description Desc1 =Products
Line 29 Customer Description Desc2 =Clients
Line 30 Sales Person Description Desc3 =Branches
Line 31 Product Category1 Description CATP1 = Type
Line 32 Customer Category1 Description CATC1 = Region
Line 33 Sales Person Category1 Description CATS1 = Type
Line 34 Product Category2 Description CATP2 = Location
Line 35 Customer Category2 Description CATC2 =Status
Line 36 Sales Person Category2 Description CATS2 =State
Line 37 Customer Category3 Description CATC3 =
Line 38 Customer Category4 Description CATC4 =
Line 39 Customer Category5 Description CATC5 =
Line 40 Product Category3 Description CATP3 = 
Line 41 Product Category4 Description CATP4 = 
Line 42 Product Category5 Description CATP5 = 
Line 43 Sales Person Category3 Description CATS3 =
Line 44 Sales Person Category4 Description CATS4 =
Line 45 Sales Person Category5 Description CATS5 =
  Tooltip text on Button rollover Tooltip =Imports from Accounting v101