Technical Tuesday: Connecting a Local Website to Show Web Services

For this week’s Technical Tuesday, I’ll be explaining how you can build a simple website and use it to submit data to Acumatica in real-time – thus demonstrating the power of the Acumatica platform.

Environment: 6.00.0955

Data: use SalesDemo demo data from partner portal

Development Environment: Microsoft Visual Studio Express 2015 for Web

Scenario Overview

Business Problem

Your Enterprise Resource Planning (ERP) system is the hub of your business activities. Therefore, the value of your ERP system increases as you link it to your other business systems.

Acumatica ERP includes the most-flexible and easy-to-integrate platform for communicating with external systems. This paper focuses on web-services, but you can push and pull data from the Acumatica platform using the following techniques:

Integration Services: batch processing which can import and export data into each Acumatica data entry screen without programming. Import and export scenarios are built for 30+ screens in the SalesDemo data. You can use import and export scenarios to update data and delete data as well. Acumatica includes several data “providers” that allow you to integrate using Excel, .CSV, .XML, Microsoft SQL databases, ACH, HubSpot, and more.

Web Services: real-time data connections with external systems using SOAP APIs (as well as REST in Acumatica 6) to push and get data.

Acumatica’s platform enforces the same business logic whether you type it, import a batch file, or transfer it using web services.

Demonstration Scenario

In this article we describe how to setup a simple ASPX website in Visual Studio that you can use to demonstrate the power of web-services using our screen based SOAP APIs.

Acumatica Implementation

To simplify configuration, we created a simple website project that you can import into Visual Studio and modify to link to your instance. The implementation steps are listed below.

Get website and place in your local file directory.

Modify the site for your Acumatica environment.

Change references to point to your Acumatica instance.

Change hard-coded passwords to reflect your site’s password.

Debug (or publish) your website and verify results.

Step 1: Get website and place in your local file directory

A copy of the generic website is available on the Acumatica partner portal (currently located at: https://portal.acumatica.com/zip/AcumaticaWebServiceDemoWebsite.zip). The project started as a new ASP.NET project using C# in Visual Studio. The ASP.NET forms template was used to create an initial website which we modified to include additional Acumatica web references and web pages to link to Acumatica.

Download the zip file from portal.acumatica.com/sales/demo-materials

Unzip the files and place them on your development machine. I used the default area for Visual Studio: C:UsersDouglasDocumentsVisual Studio 2015WebSites<site name> (site name was RevisionTwoWeb60)

Use Visual Studio to open the website by selecting File > Open Web Site… and selecting the directory you created above.

Step 2: Modify website for your Acumatica environment

The website that you restored contains a web services description that is linked to a local Acumatica site. You can use Visual Studio to replace all references to point to your Acumatica environment.

Change references to point to your site

The sample website points to http://localhost/demo6. To re-point to your site, open the website in Visual Studio and select Edit > Find and Replace > Replace in Files. The image below shows how I updated my website to point from my Acumatica 5.3 site to my Acumatica 6 site.

Note: make sure you look in the entire solution. There should be 11 matches in 7 different files.

Change Passwords

There are currently 4 places in the C# code that have passwords hard-coded. These are in the following 3 files:

Contact.aspx.cs (2 locations)

VendorBill.aspx.c (1 location)

Kiosk.aspx.cs (1 location, not used for demos)

As illustrated below you can change the login to be the appropriate credentials for your site.

NOTE: admin/123 is the current password. In an actual implementation you would create a special login with limited permissions for your website with a secure password.

Step 3: Debug (or publish) your website to test your results

To demonstrate the feature, I opened Visual Studio and ran the site in debug mode as illustrated below.

If everything is working correctly, the following website appears.

To demonstrate, navigate to the Contact link (2 above) and fill out the form. This will create a lead or a contact in Acumatica and automatically navigate you to the page below.

Confirm by opening your Acumatica application and finding the lead or contact.

The vendor bill demonstration is slightly more complicated because it submits information from your website database (user name) to Acumatica. To set this up:

Click the ‘register’ button on your website to create a new account. The user name you enter must match a Vendor ID inside your Acumatica application. In my case, I used AAVENDOR.

Navigate to the Submit Bill link on the website, complete the form, and submit.

After you receive a positive response (see below) and land on the thank-you page, open the Acumatica ERP application and search for the data you just entered to show how data is immediately available.

View of the bill in Acumatica:

In this case, the vendor ID was used to populate the vendor field in Acumatica. The Vendor ID was stored as a user name login in our website – completely independent of the Acumatica application.

Conclusion

Acumatica APIs are one example that can illustrate the power of the Acumatica platform. In this example we utilized the screen-based SOAP APIs to pass information to Acumatica.

The platform allows you to do much more, you can also:

Utilize contract-based SOAP APIs (recommended for Acumatica 6 and beyond projects) instead of the Screen based APIs. See blog article that discusses the two.

Utilize REST APIs if you are using Acumatica 6 or later. See the REST API video to learn more.

VP, Product Management at Acumatica. Doug is in charge of showing people the specifics about what makes Acumatica’s Cloud ERP software awesome for our customers and partners. For other tips and technical training, stay tuned on Tuesdays.

If you decide that you no longer want to receive a newsletter, you can unsubscribe by clicking the
"Unsubscribe" link, located at the bottom of each newsletter.

About Acumatica ERP system

The Acumatica ERP (Enterprise Resource Planning) system delivers adaptable cloud and mobile technology with a unique, all-inclusive user licensing model. Acumatica provides a complete real-time view of your business anytime, anywhere, on any device. Through our worldwide network of partners, Acumatica ERP provides a full suite of integrated business management applications, including Financials, Distribution, Project Accounting, and CRM, as well as separate Field Service Edition, Commerce Edition, Manufacturing Edition, and Construction Edition. There is only one true Cloud ERP platform designed for mid-sized customers: Acumatica.