ElislsmnService

ElislsmnService.asmx

Salesman web services provide methods to add, change, delete and view salesman records.


AddSalesman

This method creates one salesman record.

Usage:

AddSalesmanResult = A.AddSalesman(UserName, UserPassword, AddSalesmanInput)

Parameters UserName and UserPassword are not used at this moment.

 

AddSalesmanInput Structure

Property

Length

Type

Upper

Detail

SLM_NO

3

String

Y

Required.

SLM_NAME

30

String

 

 

SLM_ADDRESS1

30

String

 

 

SLM_ADDRESS2

30

String

 

 

SLM_PHONE_NO

12

String

Y

 

SLM_INIT

3

String

 

Salesman initials.

SLM_TERR

30

String

Y

Salesman territory.

SLM_CUS_TP_1

5

String

Y

Salesman customer type 1.

SLM_COMM_PCT_1

2.3

Single

 

Salesman commission percent 1.

SLM_CUS_TP_2

5

String

Y

Salesman customer type 2.

SLM_COMM_PCT_2

2.3

Single

 

Salesman commission percent 2.

SLM_CUS_TP_3

5

String

Y

Salesman customer type 3.

SLM_COMM_PCT_3

2.3

Single

 

Salesman commission percent 3.

SLM_CUS_TP_4

5

String

Y

Salesman customer type 4.

SLM_COMM_PCT_4

2.3

Single

 

Salesman commission percent 4.

SLM_CUS_TP_5

5

String

Y

Salesman customer type 5.

SLM_COMM_PCT_5

2.3

Single

 

Salesman commission percent 5.

SLM_CUS_TP_6

5

String

Y

Salesman customer type 6.

SLM_COMM_PCT_6

2.3

Single

 

Salesman commission percent 6.

SLM_CUS_TP_7

5

String

Y

Salesman customer type 7.

SLM_COMM_PCT_7

2.3

Single

 

Salesman commission percent 7.

SLM_CUS_TP_8

5

String

Y

Salesman customer type 8.

SLM_COMM_PCT_8

2.3

Single

 

Salesman commission percent 8.

SLM_CUS_TP_9

5

String

Y

Salesman customer type 9.

SLM_COMM_PCT_9

2.3

Single

 

Salesman commission percent 9.

SLM_CUS_TP_10

5

String

Y

Salesman customer type 10.

SLM_COMM_PCT_10

2.3

Single

 

Salesman commission percent 10.

SLM_SALES_PTD

9.2

Double

 

Sales amount period to date.

SLM_SALES_YTD

9.2

Double

 

Sales amount year to date.

SLM_SALES_LS_YR_YT

9.2

Double

 

Sales amount last year.

SLM_COST_PTD

9.2

Double

 

Sales cost period to date.

SLM_COST_YTD

9.2

Double

 

Sales cost year to date.

SLM_FIN_CHG

9.2

Double

 

Salesman finance charges.

SLM_COMM_PTD

7.2

Double

 

Commission period to date.

SLM_COMM_YTD

7.2

Double

 

Commission year to date.

SLM_EMAIL

45

String

Y

 

 

Output Parameter

Parameter

Type

Detail

AddSalesmanResult

Integer

Contains return code. Zero means OK; for other return codes, please see “ElislsmnService Return Code” section.

 

Code Example

The following sample code will add one salesman number “NS.”

 

Dim Service As New webServicesSlsmn.ElislsmnService

Dim Result As Integer

Dim Input As New webServicesSlsmn.AddSalesmanInput

Input.SLM_NO = “NS”

Input.SLM_NAME = “Netcellent Sales”

Input.SLM_EMAIL = “abcd@netcellent.com”

Result = Service.AddSalesman(“”, “”, Input)

If Result = 0 Then

   lblResult.Text = “Salesman record added.”

Else

  lblResult.Text = “Error”

   lblErrorCode.Text = Result.ToString

End If

 

ChangeSalesman

This method can change property values for a salesman. In this method, if an input property has no value assigned, the corresponding salesman property will remain unchanged. That is to say, you have to assign a single space “ ” or zero to a input property in order to clear a salesman’s property.

This method does not treat fields as groups. For example, if you want to update salesman’s address1, and clear address 2, you have to assign the values for address1 and address2 separately.

Usage:

ChangeSalesmanResult = A.ChangeSalesman(UserName, UserPassword, ChangeSalesmanInput)

Parameters UserName and UserPassword are not used at this moment.

 

ChangeSalesmanInput Structure

Property

Length

Type

Upper

Detail

SLM_NO

3

String

Y

Required.

SLM_NAME

30

String

 

 

SLM_ADDRESS1

30

String

 

 

SLM_ADDRESS2

30

String

 

 

SLM_PHONE_NO

12

String

Y

 

SLM_INIT

3

String

 

 

SLM_TERR

30

String

Y

 

SLM_CUS_TP_1

5

String

Y

 

SLM_COMM_PCT_1

2.3

Single

 

 

SLM_CUS_TP_2

5

String

Y

 

SLM_COMM_PCT_2

2.3

Single

 

 

SLM_CUS_TP_3

5

String

Y

 

SLM_COMM_PCT_3

2.3

Single

 

 

SLM_CUS_TP_4

5

String

Y

 

SLM_COMM_PCT_4

2.3

Single

 

 

SLM_CUS_TP_5

5

String

Y

 

SLM_COMM_PCT_5

2.3

Single

 

 

SLM_CUS_TP_6

5

String

Y

 

SLM_COMM_PCT_6

2.3

Single

 

 

SLM_CUS_TP_7

5

String

Y

 

SLM_COMM_PCT_7

2.3

Single

 

 

SLM_CUS_TP_8

5

String

Y

 

SLM_COMM_PCT_8

2.3

Single

 

 

SLM_CUS_TP_9

5

String

Y

 

SLM_COMM_PCT_9

2.3

Single

 

 

SLM_CUS_TP_10

5

String

Y

 

SLM_COMM_PCT_10

2.3

Single

 

 

SLM_SALES_PTD

9.2

Double

 

 

SLM_SALES_YTD

9.2

Double

 

 

SLM_SALES_LS_YR_YT

9.2

Double

 

 

SLM_COST_PTD

9.2

Double

 

 

SLM_COST_YTD

9.2

Double

 

 

SLM_FIN_CHG

9.2

Double

 

 

SLM_COMM_PTD

7.2

Double

 

 

SLM_COMM_YTD

7.2

Double

 

 

SLM_EMAIL

45

String

Y

 

 

Output Parameter

Parameter

Type

Detail

ChangeSalesmanResult

Integer

Contains return code. Zero means OK; for other return codes, please see “ElislsmnService Return Code” section.

 

Code Example

The following sample code will change name and clear the email address for salesman number “NS.”

 

Dim Service As New webServicesSlsmn.ElislsmnService

Dim Result As Integer

Dim Input As New webServicesSlsmn.ChangeSalesmanInput

Input.SLM_NO = “NS”

Input.SLM_NAME = “Salesman Renamed”

Input.SLM_EMAIL = “ ”

Result = Service.ChangeSalesman(“”, “”, Input)

If Result = 0 Then

   lblResult.Text = “Salesman record changed.”

Else

  lblResult.Text = “Error”

   lblErrorCode.Text = Result.ToString

End If

 

DeleteSalesman

This method will delete one salesman record.

Usage:

DeleteSalesmanResult = A.DeleteSalesman(UserName, UserPassword, SLM_NO)

Parameters UserName and UserPassword are not used at this moment.

 

DeleteSalesmanInput Structure

Property

Length

Type

Upper

Detail

SLM_NO

3

String

Y

Required.

 

Output Parameter

Parameter

Type

Detail

DeleteSalesmanResult

Integer

Contains return code. Zero means OK; for other return codes, please see “ElislsmnService Return Code” section.

 

Code Example

The following sample code will delete salesman number “NS.”

 

Dim Service As New webServicesSlsmn.ElislsmnService

Dim Result As Integer

Dim SLM_NO As String = “NS”

Result = Service.DeleteSalesman(“”, “”, SLM_NO)

If Result = 0 Then

   lblResult.Text = “Salesman record deleted.”

Else

  lblResult.Text = “Error”

   lblErrorCode.Text = Result.ToString

End If

 

ViewSalesman

This method will return salesman records by providing a starting salesman number.

Usage:

ViewSalesmanResult = A.ViewSalesman(UserName, UserPassword, StartingSalesmanNo, NumberOfRecord, SalesmanRecordSortBy, ImageLinkFormat)

Parameters UserName and UserPassword are not used at this moment.

 

Input Parameter

Parameter

Length

Type

Upper

Detail

StartingSalesmanNo

3

String

Y

If this field is blank, this method will start with the first salesman number.

NumberOfRecord

3

Integer

 

If this field is zero or not assigned, this method will get all matching salesman records.

SalesmanRecordSortBy

3

String

Y

Only supports “SLM_TERR” for now. System will ignore other values, and use the default sorting sequence (sort by salesman number).

ImageLinkFormat

3

String

Y

F (default): File name.

P: Path.

I: Path + file name

 

ViewSalesmanResult Structure

Property

Type

Detail

ReturnCode

Integer

Contains return code. Zero means OK; for other return codes, please see “ElislsmnService Return Code” section.

ReturnMsg

String

This is description of return code. For example, if return code is zero, you can expect “OK” in this field.

NoOfRecords

Integer

This method returns maximum 999 records.

SalesmanRecord()

SalesmanRecord

This is an array of salesman records. See the following section for its structure.

 

SalesmanRecord Structure

Property

Type

Detail

SLM_NO

String

 

SLM_NAME

String

 

SLM_ADDRESS1

String

 

SLM_ADDRESS2

String

 

SLM_PHONE_NO

String

 

SLM_INIT

String

 

SLM_TERR

String

 

SLM_CUS_TP_1

String

 

SLM_COMM_PCT_1

Double

 

SLM_CUS_TP_2

String

 

SLM_COMM_PCT_2

Double

 

SLM_CUS_TP_3

String

 

SLM_COMM_PCT_3

Double

 

SLM_CUS_TP_4

String

 

SLM_COMM_PCT_4

Double

 

SLM_CUS_TP_5

String

 

SLM_COMM_PCT_5

Double

 

SLM_CUS_TP_6

String

 

SLM_COMM_PCT_6

Double

 

SLM_CUS_TP_7

String

 

SLM_COMM_PCT_7

Double

 

SLM_CUS_TP_8

String

 

SLM_COMM_PCT_8

Double

 

SLM_CUS_TP_9

String

 

SLM_COMM_PCT_9

Double

 

SLM_CUS_TP_10

String

 

SLM_COMM_PCT_10

Double

 

SLM_SALES_PTD

Double

 

SLM_SALES_YTD

Double

 

SLM_SALES_LS_YR_YT

Double

 

SLM_COST_PTD

Double

 

SLM_COST_YTD

Double

 

SLM_FIN_CHG

Double

 

SLM_COMM_PTD

Double

 

SLM_COMM_YTD

Double

 

SLM_EMAIL

String

 

FILLER_0001

String

 

SYCONTCT_ID

Integer

 

SYCONTCT_EMAIL_ADDR

String

 

SYCONTCT_NAME

String

 

SYCONTCT_LNK_ADR_FLG

String

 

SYCONTCT_ADDR_1

String

 

SYCONTCT_ADDR_2

String

 

SYCONTCT_CITY

String

 

SYCONTCT_STATE

String

 

SYCONTCT_ZIP

String

 

SYCONTCT_COUNTRY

String

 

SYCONTCT_LNK_TEL_FLG

String

 

SYCONTCT_PHONE

String

 

SYCONTCT_PHONE_EXT

String

 

SYCONTCT_LNK_FAX_FLG

String

 

SYCONTCT_FAX

String

 

SYCONTCT_PASSWD

String

 

SYCONTCT_PASSWD_HINT

String

 

SYCONTCT_PASSWD_HT_V

String

 

SYCONTCT_BLK_ACCESS

String

 

SYCONTCT_BLK_REASON

String

 

SYCONTCT_BLK_ACCS_DT

Date

 

SYCONTCT_BLK_EMAIL

String

 

SYCONTCT_BLK_EM_DT

Date

 

SYCONTCT_BILL_TO_NAME

String

 

SYCONTCT_LNK_BILL_TO_ADR

String

 

SYCONTCT_BILL_TO_ADDR_1

String

 

SYCONTCT_BILL_TO_ADDR_2

String

 

SYCONTCT_BILL_TO_CITY

String

 

SYCONTCT_BILL_TO_STAT

String

 

SYCONTCT_BILL_TO_ZIP

String

 

SYCONTCT_BILL_TO_COUNTRY

String

 

SYCONTCT_SRCH_NAME

String

 

SYCONTCT_CREATE_DT

Date

 

SYCONTCT_CREATE_TIME

Integer

 

SYCONTCT_ACCEPT_HTML

String

 

SYCONTCT_HOME_PHONE

String

 

SYCONTCT_MOBIL_PHONE

String

 

SYCONTCT_BOUNCEBACKS

Integer

 

SYCONTCT_COMPANY_NA

String

 

SYCONTCT_BIRTH_YEAR

Integer

 

SYCONTCT_BIRTH_MON

Integer

 

SYCONTCT_BIRTH_DAY

Integer

 

SYCONTCT_CREATED_BY

String

 

SYCONTCT_FILLER_01

String

 

SYCONREL_ROLE

String

 

SYCONREL_PRIMARY_REL

String

 

SYCONREL_POSITION

String

 

SYCONREL_PRIMARY_CT

String

 

SYCONREL_FILLER_01

String

 

HomeLinkContent

String

 

ImageLinkContent

String

 

 

Code Example

The following sample code will return up to 100 salesman records, starting with salesman number “NS.”

 

Dim Service As New webServicesSlsmn.ElislsmnService

Dim Result As New webServicesSlsmn .ViewSalesmanResult

Dim StartingSalesmanNo As String = “NS”

Dim NumberOfRecord As String = 100

Dim ImageLinkFormat As String = “I”

Result = Service.ViewSalesman(“”, “”, StartingSalesmanNo, NumberOfRecord, “”, ImageLinkFormat)

If Result.ReturnCode = 0 Then

  If Result.NumberOfRecord = 0 Then

     lblResult.Text = “No matching record.”

  Else

      lblResult.Text = “First matching salesman’s No. is ” + _

                      Result.SalesmanRecord(0).SLM_NO

  End If

Else

  lblResult.Text = Result.ReturnMsg

   lblErrorCode.Text = Result.ReturnCode.ToString

End If

 

ViewOneSalesman

Usage:

ViewOneSalesmanResult =

A.ViewOneSalesman(UserName, UserPassword, SalesmanNo,  ImageLinkFormat)

Parameters UserName and UserPassword are not used at this moment.

 

Input Parameter

Parameter

Length

Type

Upper

Detail

SalesmanNo

3

String

Y

Required

ImageLinkFormat

3

String

Y

Default to “F”. Can be “F,” “P,” or “I.”

F: File name.

P: Path.

I: Path + file name

 

ViewOneSalesmanResult Structure

Property

Type

Detail

ReturnCode

Integer

Contains return code. Zero means OK; for other return codes, please see “ElislsmnService Return Code” section.

ReturnMsg

String

This is description of return code. For example, if return code is zero, you can expect “OK” in this field.

SalesmanRecord

SalesmanRecord

For the structure of this data type, please refer to “SalesmanRecord Structure” in ViewSalesman method.

 

Code Example

The following sample code will return salesman record for salesman number “NS.”

 

Dim Service As New webServicesSlsmn.ElislsmnService

Dim Result As New webServicesSlsmn.ViewOneSalesmanResult

Dim SalesmanNo As String = “NS”

Dim ImageLinkFormat As String = “I”

Result = Service.ViewOneSalesman(“”, “”, SalesmanNo, ImageLinkFormat)

If Result.ReturnCode = 0 Then

   lblResult.Text = “Salesman’s name is ” + _

                   Result.SalesmanRecord.SLM_NAME

Else

  lblResult.Text = Result.ReturnMsg

   lblErrorCode.Text = Result.ReturnCode.ToString

End If

 

ElislsmnService Return Code

 0 = OK

 1 = File Error

 2 = Data Missing (Salesman No Required)

 3 = Data Missing (No of Item Required When View Salesman Table)

 4 = Salesman No Not On File (Change, Delete)

 5 = Salesman Already On File (Add)

 7 = Customer Type Not On File

 9 = Duplicate Customer Type

11 = No More Salesman

CLS

Feedback and Knowledge Base