Getting Started

Introduction

This document is a complementary document for “WsPCL documentation” (That document describes each function in WsPCL.) providing information for getting started.

Before starting

Before you start using WsPCL some basic setup must be done.

Information needed by Pulsen

In order to give access to WsPCL Pulsen needs the following information: IP-addresses used by developer team (In order to open up Firewall so that web-service can be accessed). Dynamic IP’s are not allowed. Name of developers (In order to create logins to Harmoney)

Information that you need

Pulsen needs to provide you with some information in order to access WsPCL: Name of system to use for Sandbox (Name to acceptance system will provided later in the process) Login information (User name and password) Name on Sales Channel to use in Sandbox Sales channel is a 3 characters long string. Sales channels are used to differentiate between different markets, eg. different physical stores and web sales. Information on testdata in Sandbox (Like articles/variants available, currencies, languages etc)

Version of WsPCL to use

Integration overview

Integration overview

The order process

The following flow chart depicts the way Pulsen recommends to implement the order process online. The main focus is on early order validation to limit errors when finalizing and saving the order thus reducing manual handling.

The order process

Accessing the web service

Accesing WSDL-file from web service

The WsPCL web service can be accessed at these addresses, where N.N is the version of WsPCL. For production environments:

https://webservice.pulsen.se/wspcl_vN.N/service.asmx

Versions

Most recent version

Production:

https://webservice.pulsen.se/wspcl_v3.8.6/service.asmx

Acceptance/Sandbox/Development

https://acceptans.pulsen.se/wspcl_v3.8.6/service.asmx

A seperate service used to get certain codes in Harmoney, e.g. Order Type Codes:

https://acceptans.pulsen.se/WsPCL_v3.8.6/namevalueservice.asmx
https://webservice.pulsen.se/WsPCL_v3.8.6/namevalueservice.asmx (prod)

Older versions

Older versions available in the production/acceptance environment (Please note that it’s only the latest version available that contains the latest functionality):

https://webservice.pulsen.se/wspcl_v3.8.5/service.asmx
https://webservice.pulsen.se/wspcl_v3.8.4/service.asmx
https://webservice.pulsen.se/wspcl_v3.8.3/service.asmx
https://webservice.pulsen.se/wspcl_v3.8.2/service.asmx
https://webservice.pulsen.se/wspcl_v3.8.1/service.asmx
https://webservice.pulsen.se/wspcl_v3.8.0/service.asmx
https://webservice.pulsen.se/wspcl_v3.7.9/service.asmx
https://webservice.pulsen.se/wspcl_v3.7.8/service.asmx
https://webservice.pulsen.se/wspcl_v3.7.7/service.asmx
https://webservice.pulsen.se/wspcl_v3.7.6/service.asmx
https://webservice.pulsen.se/wspcl_v3.7.5/service.asmx
https://webservice.pulsen.se/wspcl_v3.7.4/service.asmx
https://webservice.pulsen.se/wspcl_v3.7.3/service.asmx

Hints for coding your client

Configuratbility

Some information depends on the environment and should therefore be declared in a configuration file, database or any easily maintained configuration section.

  • URL (one for sandbox and acceptance, another for production)
  • System Name (different for sandbox, acceptance and production)
  • Username & password (Different in all systems)
  • Sales-channel(s). Different in sandbox compared with acceptance and production)

Coping with offline-situations

There will be situations when you can’t access WsPCL (For instance during scheduled service windows and Harmoney Releases or any connectivity failure caused by ISP or external part)

It’s highly recommended to agree with customer how to gracefully manage this condition with the end user.

Recommendation:

  • Create functionality so that SaveOrder operations can be put on a queue for sending later if no connection is available.
  • Create functionality for default management and transport fees if WsPCL can’t be reached
  • If gift vouchers or bonus vouchers are used, either make these available offline or give the end user a friendly message that those cannot be used currently

Code examples

These are some simple code examples of how to use the PCL public methods. If any questions, please contact Pulsen technical support or your sales contact.

Setting up WsPCL(Visual Studio 2012/2013/2015/2017/2019)

  1. Add the WsPCL reference as a Web Reference or Service Reference.
Add reference

Web reference has been added

Added web reference
  1. In a page(for instance), add the service to your code by setting up a service object
  • When using a web reference:
private Service client = new Service();
  • When using a service reference:
private ServiceSoapClient client = new ServiceSoapClient();

3. Set up login information by creating a LoginInfo object in your page. The login information is necessary for accessing Harmoney from an external system.

  • SystemName is the three character long abbreviated name for your company’s Harmoney installation.
  • SalesChannel is the three character long ID (usually numbers only) for the sales channel. Sales channel (“försäljningskanal” in Swedish) represents a eg. a physical shop, e-commerce webshop or B2B commerce.
  • Username is the (up to) five character long account name specially set up for you for communicating via the internet.
  • UserPassword is the password for the above account
  • Language is an enum that you want messages from WsPCL to be returned in

LoginInfo object

LoginInfo loginInfo = new LoginInfo()
{
  SystemName = "XXX",
  SalesChannel = "001",
  Username = "INET",
  UserPassword = "sldk23",
  Language = Language.Swedish
};
  1. See WsPCL documentation for more information and examples

WsPCL Startup project

Pulsen offers a startup project to get you started on integrating with the WsPCL interface. The example project is made for Visual Studio in C# and contains examples of the most common calls. Please see this project for more information and examples on integrating with the WsPCL webservice.