APIs
GetContractInformation
Parameters
None
Return Value
Type: ContractInfomation
General information about the web services contracts.
Remarks
The returned value contains three fields:
ContractVersion: This field returns an integer value that represents the version of the eBusiness Web Services operations and data contracts.
-
A client application can use ContractVersion to determine if it is compatible with the instance of eBusiness Web Services it is connected to without the need to download the complete WSDL.
-
Newer versions of eBusiness Web Services will generally be backwards compatible with clients designed for older versions of eBusiness Web Services.
-
Our goal is to maintain backwards compatibility; however, design considerations may cause incompatibles to arise from time to time.
AssemblyVersion: This field returns a string that represents the version of the eBusiness Web Services assembly.
NullDateTime: The value from this field can be used to explicitly set an entity's DateTime field to blank.
GetDiagnosticInformation
Parameters
None
Return Value
Type: DiagnosticInformation
Statistical data that may aid in diagnosing performance issues, etc.
Remarks
This method is for use by Sage 100 Customer Support as a diagnostic tool and is not intended to be called by applications.
Remote access to this method is turned off by default. Remote access to this method should only be enabled when requested by a Sage 100 Customer Support representative. Remote access can be enabled using the Sage 100 eBusiness Web Services configuration utility.
GetSalesOrder
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to obtain the sales order
salesOrderNo
Type: string
The number of the sales order to retrieve
Return Value
Type: SalesOrder
The requested sales order
Remarks
The returned value may be modified and used with the UpdateSalesOrder operation. For more information, see UpdateSalesOrder.
For information on the structure and data contained in the SalesOrder type, refer to SO_SalesOrderHeader and SO_SalesOrderDetail in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Sales Order > Main > Sales Order Entry > View.
GetNextSalesOrderNo
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to obtain the next sales order number
Return Value
Type: string
The next sales order number
Remarks
The returned value can be used to set the SalesOrderNo field of a SalesOrder object before calling CreateSalesOrder.
Each call to GetNextSalesOrderNo will return a new sales order number for the specified company regardless of whether the number from a previous call has been used or not.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Sales Order > Main > Sales Order Entry > Create.
GetSalesOrderTemplate
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to obtain the sales order template
arDivisionNo
Type: string
The division number of the customer
customerNo
Type: string
The customer number to use for the template
Return Value
Type: SalesOrder
An empty sales order with the default customer information set
Remarks
This operation retrieves default customer information that can be used for display on a data entry form. Sales order fields that are blank or zero in the Sage 100 system are returned as null in order to reduce network traffic.
The sales order returned from this operation can be modified and used for the CreateSalesOrder operation; however, it is generally more efficient to create a new SalesOrder object to pass to CreateSalesOrder.
For information on the structure and data contained in the SalesOrder type, refer to SO_SalesOrderHeader and SO_SalesOrderDetail in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Sales Order > Main > Sales Order Entry. Select Create and View.
PreviewSalesOrder
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to preview the sales order
salesOrder
Type: SalesOrder
The sales order to preview
Return Value
Type: SalesOrder
A sales order that includes the default values and totals that would be committed if the submitted sales order was passed to the CreateSalesOrder operation
Remarks
This operation allows a sales order to be previewed before being submitted to the CreateSalesOrder operation. For example, it would be appropriate for an ecommerce application to call PreviewSalesOrder and display the order totals to the end user before final checkout.
The sales order returned by this operation is not intended to be passed to the CreateSalesOrder operation. Read-only fields can be set on the returned value. This will cause an error if submitted to the CreateSalesOrder operation.
For information on the structure and data contained in the SalesOrder type, refer to SO_SalesOrderHeader and SO_SalesOrderDetail in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Sales Order > Main > Sales Order Entry. Select Create and View or Modify and View.
CreateSalesOrder
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company in which to create the sales order
salesOrder
Type: SalesOrder
The sales order to create
Return Value
None
Remarks
This operation creates a sales order in the Sage 100 system. The SalesOrderNo field of salesOrder must be set to create a sales order. The GetNextSalesOrderNo operation can be used to obtain a sales order number.
Network connectivity issues can cause errors with web services. When this occurs, it can be difficult to determine if the call completed successfully, failed, or never made it to the server.
When a connectivity error occurs with this operation, such as a timeout error, CreateSalesOrder should be called again with the same sales order. It is important that the value for SalesOrderNo remain the same as in the first call. If the previous call to CreateSalesOrder completed successfully, the new call will error out and MasFault will have ErrorCode set to WS_AlreadyExists. This error can be ignored as it indicates the previous call successfully created the sales order. For more information, see Error Handling.
For information on the structure and data contained in the SalesOrder type, refer to SO_SalesOrderHeader and SO_SalesOrderDetail in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Sales Order > Main > Sales Order Entry > Create.
UpdateSalesOrder
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to update the sales order
salesOrder
Type: SalesOrder
The sales order to update
Return Value
None
Remarks
This operation updates a sales order in the Sage 100 system.
A sales order must first be obtained from the GetSalesOrder operation. This sales order can then be modified and passed to the UpdateSalesOrder operation.
The SalesOrderNo field of salesOrder determines which Sage 100 sales order is updated. SalesOrderNo must not be modified after the call to GetSalesOrder.
Do not modify the LineKey field of any of the SalesOrderLine objects contained in the Lines collection of salesOrder. The LineKey field is an advisory field that is used to determine lines that have been updated, inserted, or deleted from the sales order. Modifying the LineKey field will result in inefficiencies with the UpdateSalesOrder operation.
"Allow Read" should remain enabled for the LineKey field of the SalesOrderLine entity when using the advanced settings of the Sage Web Services Configuration utility.
For information on the structure and data contained in the SalesOrder type, refer to SO_SalesOrderHeader and SO_SalesOrderDetail in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Sales Order > Main > Sales Order Entry > Modify.
DeleteSalesOrder
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to delete the sales order
salesOrderNo
Type: string
The sales order to delete
Return Value
None
Remarks
This operation deletes the specified sales order from the Sage 100 system.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Sales Order > Main > Sales Order Entry > Remove.
GetCustomer
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to obtain the customer
arDivisionNo
Type: string
The division number of the customer
customerNo
Type: string
The customer number to use for the template
Return Value
Type: Customer
The requested customer
Remarks
The returned value can be modified and used with the UpdateCustomer operation. For more information, see UpdateCustomer.
For information on the structure and data contained in the Customer type, refer to AR_Customer in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Main > Customer Maintenance > View.
GetNextCustomerNo
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to obtain the next customer number
Return Value
Type: string
The next customer number
Remarks
The returned value can be used to set the CustomerNo field of a Customer object before calling CreateCustomer.
Each call to GetNextCustomerNo will return a new customer number for the specified company regardless of whether the number from a previous call has been used or not.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Main > Customer Maintenance > Create.
CreateCustomer
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company in which to create the customer
customer
Type: Customer
The customer to create
Return Value
None
Remarks
This operation creates a customer in the Sage 100 system.
The ARDivisionNo and CustomerNo fields must be set to create a customer. The GetNextCustomerNo operation can be used to obtain a customer number.
Network connectivity issues can cause errors with web services. When this occurs, it can be difficult to determine if the call completed successfully, failed, or never made it to the server.
When a connectivity error occurs with this operation, such as a timeout error, CreateCustomer should be called again with the same customer. It is important that the values for ARDivisionNo and CustomerNo remain the same as in the first call. If the previous call to CreateCustomer completed successfully, the new call will error out and MasFault will have ErrorCode set to WS_AlreadyExists. This error can be ignored as it indicates the previous call successfully created the customer. For more information, see Error Handling.
For information on the structure and data contained in the Customer type, refer to AR_Customer in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Main > Customer Maintenance > Create.
UpdateCustomer
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to update the customer
customer
Type: Customer
The customer to update
Return Value
None
Remarks
This operation updates a customer in the Sage 100 system.
A customer must first be obtained from the GetCustomer operation. This customer can then be modified and passed to the UpdateCustomer operation.
The ARDivisionNo and CustomerNo fields determine which Sage 100 customer is updated. ARDivisionNo and CustomerNo must not be modified after the call to GetCustomer.
For information on the structure and data contained in the Customer type, refer to AR_Customer in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Main > Customer Maintenance > Modify.
DeleteCustomer
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to delete the customer
arDivisionNo
Type: string
The division number of the customer
customerNo
Type: string
The customer number to delete
Return Value
None
Remarks
This operation deletes a customer in the Sage 100 system.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Main > Customer Maintenance > Remove.
GetCustomerContact
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to obtain the customer contact
arDivisionNo
Type: string
The division number of the customer
customerNo
Type: string
The customer number of the contact
contactCode
Type: string
The contact code
Return Value
Type: CustomerContact
The requested customer contact
Remarks
The customer contact returned can be modified and used with the UpdateCustomerContact operation. For more information, see UpdateCustomerContact.
For information on the structure and data contained in the CustomerContact type, refer to AR_CustomerContact in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Main > Customer Maintenance > View.
CreateCustomerContact
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company in which to create the customer contact
customerContact
Type: CustomerContact
The customer contact to create
Return Value
None
Remarks
This operation creates a customer contact in the Sage 100 system.
The ARDivisionNo, CustomerNo, and ContactCode fields of customerContact must be set to create a customer contact.
Network connectivity issues can cause errors with web services. When this occurs, it can be difficult to determine if the call completed successfully, failed, or never made it to the server.
When a connectivity error occurs with this operation, such as a timeout error, CreateCustomerContact should be called again with the same customer contact. It is important that the values for ARDivisionNo, CustomerNo, and ContactCode remain the same as in the first call. If the previous call to CreateCustomerContact completed successfully, the new call will error out and MasFault will have ErrorCode set to "WS_AlreadyExists". This error can be ignored as it indicates the previous call successfully created the customer contact. For more information, see Error Handling.
For information on the structure and data contained in the CustomerContact type, refer to AR_CustomerContact in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Main > Customer Maintenance > Create.
UpdateCustomerContact
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to update the customer contact
customerContact
Type: CustomerContact
The customer contact to update
Return Value
None
Remarks
This operation updates a customer contact in the Sage 100 system.
A customer contact must first be obtained from the GetCustomerContact operation. This customer contact can then be modified and passed to the UpdateCustomerContact operation.
The ARDivisionNo, CustomerNo, and ContactCode fields of customerContact determine which Sage 100 customer contact is updated. ARDivisionNo, CustomerNo, and ContactCode must not be modified after the call to GetCustomerContact.
For information on the structure and data contained in the CustomerContact type, refer to AR_CustomerContact in File Layouts and Program Information.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Main > Customer Maintenance > Modify.
DeleteCustomerContact
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company in which to delete the customer contact
arDivisionNo
Type: string
The division number of the customer
customerNo
Type: string
The customer number of the customer contact
contactCode
Type: string
The customer contact to delete
Return Value
None
Remarks
This operation deletes a customer contact in the Sage 100 system.
Security Requirements
In Library Master Role Maintenance, click the Tasks tab and select Accounts Receivable > Maint > Customer Maintenance > Remove.
AddCreditCardToVault
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to add the credit card data to the vault
paymentType
Type: string
The payment type used for the credit card
creditCardData
Type: string
The credit card number and expiration date formatted as follows:
nnnnnnnnnnnnnnnn|mmyy
Return Value
Type: string
A GUID that can be used in future calls to PreAuthorizeCreditCard
Remarks
This operation adds a credit card number and expiration date to the Sage Exchange secure vault and returns a unique identifier that can be used in future calls to PreAuthorizeCreditCard and is also placed in the SalesOrder contract for various sales order operations.
The following is an example of data that should be passed into the creditCardData parameter:
4111111111111111|0616
Note that the pipe character is used to separate the credit card number from the expiration date.
PreAuthorizeCreditCard
Parameters
logon
Type: Logon
The user name and password to be used for the operation
companyCode
Type: string
The company from which to add the credit card data to the vault
paymentType
Type: string
The payment type used for the credit card
preAuthorizationData
Type: PreAuthorizationData
A contract that contains the credit card information necessary to process a pre-authorization
Return Value
Type: PreAuthorizationResult
A contract that contains CreditCardTransactionID and CreditCardAuthorizationNo fields that may be placed in the Payment collection of the SalesOrder contract for use in sales order operations
Remarks
Many fields for the PreAuthorizationData contract are optional and may be left as null.
The required fields are CreditCardGUID and Amount. An exception will be thrown if the pre-authorization fails.