westcon services implementation guide · 4.2 setting up soapui client use soapui tool to perform...

16
Confidential 1 January 11, 2017 Westcon Services Implementation Guide Availability Version 2.1 Document Revision 1.0.0 January 11, 2017

Upload: others

Post on 23-Jun-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 1 January 11, 2017

Westcon Services Implementation Guide

Availability

Version 2.1

Document Revision 1.0.0

January 11, 2017

Page 2: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 2 January 11, 2017

Document Revision History

Version Date Author Description 1.0.0 2017-01-11 Chakravarthy Sayani Created new doc for Availability API v2.1

Page 3: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 3 January 11, 2017

Table of Contents 1. Overview ......................................................................................................................................... 4

2.0 Getting Started ............................................................................................................................ 5

2.1 Working with Westcon Group .................................................................................................... 5

2.2 Accessing Westcon Group Services ............................................................................................ 5

3.0 Order Status ................................................................................................................................ 7

3.1 Request Schema .......................................................................................................................... 8

3.2 Response Schema ....................................................................................................................... 8

3.3 Additional Notes about Request Fields ....................................................................................... 9

3.3.1 Customer Number and Sales Organization fields ........................................................... 9

4.0 Consuming the Service .............................................................................................................. 10

4.1 Setting up .NET Client ............................................................................................................... 10

4.1.1 Add a Service Reference ............................................................................................... 10

4.1.2 Binding Configuration ................................................................................................... 11

4.1.3 Sample Client Code ....................................................................................................... 11

4.2 Setting up SoapUI client ............................................................................................................ 12

4.2.1 Adding WSDL ................................................................................................................. 13

4.2.2 Supplying Credentials .................................................................................................... 13

4.2.3 Sample Request ............................................................................................................ 14

4.2.4 Sample Response .......................................................................................................... 14

5.0 Reference Tables ....................................................................................................................... 16

5.1 Info Table (Sample) ................................................................................................................... 16

Page 4: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 4 January 11, 2017

1. Overview

Westcon Services are a suite of API’s that serve as a direct B2B electronic link between Westcon and

its partners, complementing existing website portals and other B2C links. Westcon Services offer a

variety of services, including Pricing, Availability, Order Placement (Purchase Order), Order Change,

Order Status and Return Merchandise Authorisation (RMA).

With Westcon Services, partners can seamlessly integrate information such as product pricing, stock

availability obtained from Westcon in real-time – into both internal business and customer-facing

services such as a shopping cart.

Page 5: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 5 January 11, 2017

2.0 Getting Started

Welcome to Westcon Group partner integration! We will assist you along each step and answer

questions throughout the process. We understand that each integration project is unique and you

will be treated with the utmost attention and expediency.

2.1 Working with Westcon Group

Westcon will assemble a team to manage and implement your integration project.

The Application Integrations Team is available Monday – Friday, from 9:00 am EST to 5:00 pm EST.

For questions or guidance on your implementation, kindly reach out to Brad Ross, (914) 829-7631.

To contact our Support email address –

[email protected]

2.2 Accessing Westcon Group Services

Web Browser

Smart Phone

Web BrowserWeb Server

B2B

Web Portal B2C

Firewall

Firewall

CoreSystems

Web Browser

Smart Phone

Integrated Applications

Server

Customer’s Customer Customer Westcon

Customer Website

Westcon Website

Westcon Services at a Glance

Page 6: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 6 January 11, 2017

The service WSDL is provided to the customers to build proxy service. The request and response

structure of these operations are described in the associated sections. To address the security

requirements, IP Security is implemented and the traffic is over a secure HTTPS transport.

Furthermore, there is a Username-Password authentication at message level. The authentication

credentials will be provided separately.

Page 7: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 7 January 11, 2017

3.0 Order Status

Service Operations Description

Availability GetAvailability Retrieve availability for the specified products

Environment Url

QA https://webservicetest.westcon.com/B2B/Availability/v2/Availability.svc

Production TBD

Service definition AvailabilityService_V2_WSDL.svc

Page 8: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 8 January 11, 2017

3.1 Request Schema Schema Element

Field Type

(Length) Required Example Notes

WestconAvailabilityRequest

WestconMetadata Optional

SourceSystem string(12) Optional B2B INTERNAL USE ONLY

TimeStamp datetime Optional 2017-01-14T00:00:00Z INTERNAL USE ONLY

OperationType string(12) Optional GET INTERNAL USE ONLY

Culture string(4) Optional 2000 INTERNAL USE ONLY

TransactionID string(32) Optional Pricing INTERNAL USE ONLY

WestconMetadata

CurrencyCode string(12) Optional USD ISO Country Code

Customer

CustomerNumber string(10) Required

Customer Number is set up separately for

specific Sales region, for the same customer.

Sales region such as US, UK, Canada etc. are

specified using SalesOrganization field. See

additional notes here:

SalesOrganization string(4) Required

SalesOrganization code must be specified

along with Customer Number. For example,

2000 for US, 2100 for Canada. See additional

notes here:

DistributionChannel string(2) Optional 01 INTERNAL USE ONLY

Division string(2) Optional 01 INTERNAL USE ONLY

Customer

Products

Product

ProductId string(35) Required ABC123

Material Number. These numbers are provided

to the customers in the price lists sent

separately.

Product

Products

WestconAvailabilityRequest

3.2 Response Schema Schema Element

Field Type

(Length) Required Example Notes

WestconAvailabilityResponse

WestconMetadata Optional

SourceSystem string(12) Optional B2B INTERNAL USE ONLY

TimeStamp datetime Optional 2017-01-13T00:00:00Z INTERNAL USE ONLY

OperationType string(12) Optional GET INTERNAL USE ONLY

Culture string(4) Optional 2000 INTERNAL USE ONLY

TransactionID string(32) Optional Pricing INTERNAL USE ONLY

WestconMetadata

CurrencyCode string(12) Optional USD ISO Country Code, Same value in the request

is returned

Customer

CustomerNumber string(10) Required 1001212 Same value as in request

SalesOrganization string(4) Required 2000 Same value as in request

DistributionChannel string(2) Optional 01 INTERNAL USE ONLY

Division string(2) Optional 01 INTERNAL USE ONLY

Customer

Products

Product

ProductId string(40) Required ABC123

Material Number. These numbers are provided

to the customers in the price lists sent

separately.

Plants

Plant

PlantId string(4) Required 2021 Plant Id

QuantityAvailable int Optional 105 Available Quantity

QuantitiyBackOrdered int Optional 10 Total quantity back ordered

EtaDateOpen string(8) Optional 20170206 If no stock, first available date

IsLocal bool Required true INTERNAL USE ONLY

SpecialOrder bool Required false INTERNAL USE ONLY

Page 9: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 9 January 11, 2017

EndOfLife bool Required false No sale

Obsolete bool Required false No sale, no buy

Restrictred bool Required false Sales restricted on the product

StorageLocations

StorageLocations

StorageLocationNumber string(4) Required 0004

QuantityAvailable int Optional 10 Quantity available at this location

StorageLocations

StorageLocations

OpenPurchaseOrders

OpenPurchaseOrder

QuantityOnOrder int Optional INTERNAL USE ONLY

EtaScheduleDate string(8) Optional INTERNAL USE ONLY

OpenPurchaseOrder

OpenPurchaseOrders

Plant

Plants

Product

Products

WestconPricingRequest

3.3 Additional Notes about Request Fields

3.3.1 Customer Number and Sales Organization fields

A customer can have multiple account numbers set up for different Sales Regions. Sales Regions are

specified in Sales Organization field.

For example, Customer X has the following accounts:

Customer Number Sales Organization Currency

1234567 2000 USD

1234578 2100 CAD

2355789 6000 AUD

When request price, the customer number must be specified as per the table depending on the

Sales Organization.

The Username in the request authentication usually matches with one of the customer numbers.

This remains the same even if the order is placed in different Sales Regions.

For example, if the Username is 1234567, in order to place an order in Australia, the Username is

still 1234567, but the CustomerAccountNumber=2355789 and SalesOrganization=6000.

Page 10: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 10 January 11, 2017

4.0 Consuming the Service

Please find the Pricing Request and Response fields below with examples. Required fields must be

filled in, in order to get proper data.

There are 3 main sections that you need to populate for a successful pricing request:

CustomerNumber: Provide your username as it appears in the Subscriber’s Details Document.

SalesOrganization: This is 2000 for US. For others look in this section.

ProductId: please include one or more ProductIds in the Products block.

4.1 Setting up .NET Client

4.1.1 Add a Service Reference

Create Service Reference using the following wsdl. For this sample, the name PricingService is

used for the Service Reference.

https://webservicetest.westcon.com/B2B/Availability/v2/Availability.svc?wsdl

Page 11: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 11 January 11, 2017

4.1.2 Binding Configuration

Ensure the bindings are configured as below:

<system.serviceModel> <bindings> <wsHttpBinding> <binding name="WestconAvailabilitySoap"> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None"/> <message clientCredentialType="UserName" establishSecurityContext="false"/> </security> </binding> </wsHttpBinding> </bindings> <client> <endpoint address="https://webservicetest.westcon.com/B2B/Availability/v2/Availability.svc" binding="wsHttpBinding" bindingConfiguration="WestconAvailabilitySoap" contract="WestconAvailabilityService.IAvailability" name="WestconAvailabilitySoap" /> </client> </system.serviceModel>

4.1.3 Sample Client Code

Values provided in the following code sample are only for demo purpose. They cannot be used as is.

using System; using System.Linq; using Westcon.B2B.WebServices.Availability.Client.WestconAvailabilityService; namespace Westcon.B2B.WebServices.Availability.Client { class Program { private static void Main(string[] args) { var availabilityService = new AvailabilityClient("WestconAvailabilitySoap") { ClientCredentials = { //Replace with the credentials provided to you UserName = { UserName = "1001212", Password = "VLzZnNGPjdz7KXgNJZcxVnSfxkFhychjmulX" } } }; var productList = new AvailabilityRequestProducts(); var products = new[] { new Product {ProductId = "10199"},

Page 12: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 12 January 11, 2017

new Product {ProductId = "10227"}, }.ToList(); productList.AddRange(products); var request = new WestconAvailabilityRequest { CurrencyCode = "USD", Customer = new AvailabilityRequestCustomer { //Replace with actual CustomerNumber CustomerNumber = "1003369", SalesOrganization = "2000", }, Products = productList }; try { var response = availabilityService.GetAvailability(request); response.Products.ForEach( p => Console.WriteLine("Product:{0}, Availability:{1}", p.ProductId, p.Plants.Sum(pl => pl.QuantityAvailable))); Console.Read(); } catch (Exception e) { HandleException(e); } } private static void HandleException(Exception e) { //Handle exceptions } } }

4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing the XML input templates to quickly generate a client and test.

Page 13: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 13 January 11, 2017

4.2.1 Adding WSDL

WSDL Location:

https://webservicetest.westcon.com/B2B/Availability/v2/Availability.svc?wsdl

4.2.2 Supplying Credentials

In order to pass the credentials, the following 3 Request properties must be set as shown below. Username and Password are provided to you separately, which are 2 of the 3 properties. For the 3rd property, WSS-PasswordType, select PasswordText from the drop down against this property.

Page 14: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 14 January 11, 2017

4.2.3 Sample Request

Sample Pricing Request <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/" xmlns:wes="http://schemas.datacontract.org/2004/07/Westcon.B2B.WebServices.Availability.Contracts.Request"> <soap:Header/> <soap:Body> <tem:GetAvailability> <tem:request> <wes:WestconMetadata> <wes:SourceSystem>B2BWEB</wes:SourceSystem> <wes:TimeStamp>2017-01-13T00:00:00Z</wes:TimeStamp> <wes:OperationType>GET</wes:OperationType> <wes:Culture>E</wes:Culture> <wes:TransactionID>Availability</wes:TransactionID> </wes:WestconMetadata> <wes:Customer> <wes:CustomerNumber>1003369</wes:CustomerNumber> <wes:SalesOrganization>2000</wes:SalesOrganization> <wes:DistributionChannel>01</wes:DistributionChannel> <wes:Division>01</wes:Division> </wes:Customer> <wes:CurrencyCode>USD</wes:CurrencyCode> <wes:Products> <wes:Product> <wes:ProductId>10199</wes:ProductId> </wes:Product> </wes:Products> </tem:request> </tem:GetAvailability> </soap:Body> </soap:Envelope>

4.2.4 Sample Response

Response <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <s:Header> <a:Action s:mustUnderstand="1">http://tempuri.org/IAvailability/GetAvailabilityResponse</a:Action> <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <u:Timestamp u:Id="_0"> <u:Created>2017-01-14T18:34:40.182Z</u:Created> <u:Expires>2017-01-14T18:39:40.182Z</u:Expires> </u:Timestamp> </o:Security> </s:Header> <s:Body> <GetAvailabilityResponse xmlns="http://tempuri.org/"> <GetAvailabilityResult xmlns:b="http://schemas.datacontract.org/2004/07/Westcon.B2B.WebServices.Availability.Contracts.Response" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <b:WestconMetadata> <b:SourceSystem>B2BWEB</b:SourceSystem> <b:TimeStamp>2017-01-13T00:00:00Z</b:TimeStamp> <b:OperationType>GET</b:OperationType> <b:Culture>E</b:Culture>

Page 15: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 15 January 11, 2017

<b:TransactionID>Availability</b:TransactionID> </b:WestconMetadata> <b:CurrencyCode>USD</b:CurrencyCode> <b:Customer> <b:CustomerNumber>1003369</b:CustomerNumber> <b:SalesOrganization>2000</b:SalesOrganization> <b:DistributionChannel>01</b:DistributionChannel> <b:Division>01</b:Division> </b:Customer> <b:Products> <b:Product> <b:ProductId>10199</b:ProductId> <b:Plants> <b:Plant> <b:PlantId>2021</b:PlantId> <b:QuantityAvailable>10</b:QuantityAvailable> <b:QuantityBackOrdered>6</b:QuantityBackOrdered> <b:EtaDateOpen>20170206</b:EtaDateOpen> <b:IsLocal>true</b:IsLocal> <b:SpecialOrder>false</b:SpecialOrder> <b:EndOfLife>false</b:EndOfLife> <b:Obsolete>false</b:Obsolete> <b:Restricted>false</b:Restricted> <b:StorageLocations> <b:StorageLocation> <b:StorageLocationNumber>0001</b:StorageLocationNumber> <b:QuantityAvailable>10</b:QuantityAvailable> </b:StorageLocation> </b:StorageLocations> <b:OpenPurchaseOrders> <b:OpenPurchaseOrder> <b:QuantityOnOrder>150</b:QuantityOnOrder> <b:EtaScheduleDate>20161026</b:EtaScheduleDate> </b:OpenPurchaseOrder> </b:OpenPurchaseOrders> </b:Plant> </b:Plants> </b:Product> </b:Products> </GetAvailabilityResult> </GetAvailabilityResponse> </s:Body> </s:Envelope>

Page 16: Westcon Services Implementation Guide · 4.2 Setting up SoapUI client Use SoapUI tool to perform the initial tests quickly. SoapUI allows creating the client quickly and providing

Confidential 16 January 11, 2017

5.0 Reference Tables

5.1 Info Table (Sample) This table contains customer specific details required for successful exchange with Westcon services.

Customer should have received this during the on-boarding process.

Customer SAMPLE COMPANY This is your Company Name

Account: (username)

1001212 This is your Account number as it appears in our backend systems

Authentication Key: (password)

sN8DThqnkZEabGJt9PtcU8ILs3CjgTpDyFj1 This is a 36-character key with which you will be authenticated

Your Westcon Company

00011 This value is data that is specific to your account which should be included with your web service call

RBU / HRBU

119920 (for Westcon)

119951 (for Vodaone)

119992 (for Comstor)

This value is data that is specific to your account which should be included with your web service call

Currency USD

Route Code U04 Used for PO

Shipping Method 1311 Used for PO

Main WWS-URL https://webservices.westcon.com