You are on page 1of 32

6/3/2013

hybris Developer Training Part II - Commerce

Hybris OMS & Channels

6/3/2013

InStore

hybris Developer Training Part II - Commerce

InStore Module Key Facts

InStore

The hybris InStore Module is a back office interface designed


exclusively for tablets.
End users can check product availability both online and in store, as long as the
Availability to Sell (ATS) feature is enabled.
localextensions.xml
<extensiondir="${HYBRIS_BIN_DIR}/extaddon/omsats"/>
<extensiondir="${HYBRIS_BIN_DIR}/extaddon/omscommons"/>
Users can search by keywords, categories, or facets.
Products can also be found via:
QR Codes and Deeplinking
Near Field Communication (NFC)
QR Codes and deeplinks can be generated within hybris.
NFC tags will need to contain the entire linked URL, and will need to be created
using an NFC tag writer such as NXP TagWriter.

6/3/2013

InStore Module Bundled Extensions

InStore

The hybris InStore Module consists of three extensions:


instore extension, which contains InStore logic, widgets, and services
instoresampledata extension, which contains sample data, according to the
acceleratorsampledata extension
yinstoreinitialdata extension, a template extension that imports the data defined in
the instoresampledata extension

InStore Module Key Features

InStore

The hybris InStore application allows immediate product identification and


the display of details of the product and its availability across stores and
warehouses.

Display
rich
product
info

Quickly
identify
products

Check
stock in
store

Web
based app
for touch
devices
Live ATS

Stock
level at
nearby
store

6/3/2013

InStore Module - UI

InStore

Widgets

InStore

The hybris InStore Module is based on the concept of widgets.


Each widget is independent in terms of logic, session context, and so on.
Widgets are unified by an abstract controller class, AbstractImpersonationController
This controller class allows the widgets to create isolated impersonation contexts for all
calls to the commercefacades extension, or any other business logic.
Impersonation Services are wrapped in the commerceservices extension, which
takes the code wrapped by the ImpersonationService.Executor<R,T> interface and
executes it in the ImpersonationContext. This, in turn, is used to exchange session
data, currencies, languages, and so on.
To call the business logic from the ProductFacade, for example, you need to extend
the AbstractImpersonationController and call the executeInContext method.

6/3/2013

Widget Search Architecture

InStore

The following Solr widgets can be used to search from the InStore UI
Text Search
Category Tree
Facet Filter

There are also supporting widgets


Sort widget, which can display possible sort options for a current search state
Search Filter Pop-up, which keeps track of the current search state. The user can then:
Add the refinements to the current search state
Display the refinements which are applied to the current search state

The main consumer of the search is Pageable List widget, which renders
pageable search results.

List of Available Widgets

InStore

10

Breadcrumb
Displays the category navigation path selected by the user while browsing.

Category Tree
Widget for navigating through categories, subcategories, and brands.

Classification Info
Displays a list of classification attributes and values for a selected product.

Condition Evaluator
Used to set a Spring SPEL expression to be evaluated.
The input object is set as a root of the expression context.

Facet Filter
Holds all possible facet refinements, given the currently displayed search result.

6/3/2013

More Available Widgets

InStore

11

InStore

12

InStore Layout
Defines layout for the InStore UI, and controls layout-related triggers:
doBack
collapseWest
showProductDetails
showProductList

Logical NOT Gate


Performs the logical gate operation NOT (output = !input)

Pageable List
Displays a list of all products in the store.
This list can be sorted using a Sort widget.

Pageable List Adapter


Displays a list of items, as well as the underlying data for that list.

Even More Available Widgets

Product Detail
Displays details for a product, such as price and availability.
You can select variants by using a Variant Selector widget.

QR Code
Scans Quick Response (QR) codes and handles product deeplinks.
Scans Near Field Communication (NFC) tags.

Search Filter Popups


A wrapper widget for Facet Filters that consists of a button and a popup window.

Solr Search
Perfoms a Solr facet search. You can also use the Text Search widget for free text.

Static String Adapter


Sends a static string if an object is received.

6/3/2013

13

hybris Developer Training Part II - Commerce

OnDemand OMS & CIS

14

hybris Order Management Services


Availability to Sell (ATS)
Order workflow Fulfillment
Third Party Integration in the OMS
Commerce Infrastructure Services

hybris Developer Training Part II - Commerce

6/3/2013

hybris OMS - Features

hybris OMS

15

The hybris OMS includes the following key features:


Real-time inventory management across all stock locations
Automated order workflow
Advanced sourcing strategies
The ability to pick, pack, label and confirm shipments through the OMS
Cockpit
Accelerator integration
Commerce Infrastructure Services (CIS) integration

16

hybris Order Management Services

Availability to Sell (ATS)


Order workflow Fulfillment
Third Party Integration in the OMS
Commerce Infrastructure Services

hybris Developer Training Part II - Commerce

6/3/2013

Availability to Sell Key Facts

ATS

17

Availability to Sell (ATS) represents the actual amount of an item


ready to be sold at a given time.
Each tenant can be configured to have one or more ATS Formulas, configured by:
Manually or system-adjusted inventory values
Order Line Quantity (OLQ) statuses
Thresholds
ATS values are exposed to external systems via:
SKUs (single or grouped)
Stockroom Locations (single or grouped)
SKU and Stockroom Location Pairs

Inventory to Stock Availability

ATS

18

Inventory: what, where, how many?


Item
Stockroom location ID*
Date available (current and future inventory)
Status
Quantity: actual, incremental

* Stockroom locations are imported automatically into


OMS from Accelerator, for a single point of management

6/3/2013

Available to Sell (ATS) Calculating Stock Availability

ATS

19

A stock availability formula is made up of 3 parts:


Inventory status
Order status
Threshold value
A threshold amount is defined to prevent OVERSELLING of stock
This amount can be configured per location as fixed-quantity or percentage

Stock Availability values change automatically with inventory and orders


Availability = ( On Hand Allocated Picked ) x Threshold

Why We Need ATS Calculations

ATS

20

When searching for inventory, the items that appear on-hand indicate the
quantity of a SKU that is physically in stock at a certain location.
When an order is placed for a SKU, the tenant has reserved the item to the
customer. To make sure that this inventory does not get sold to another
customer, the SKUs on orders need to be reserved from the SKUs that are
on-hand, thereby calculating the actual amount available for sale to other
customers.
This is where the ATS concept comes in. The ATS calculates the actual
amount of stock available at a single stockroom location (or across all
stockroom locations, in the case of global ATS).
As the order proceeds through the workflow, the ATS maintains the correct
actual amount of availability.

10

6/3/2013

Local and Global ATS Calculations

ATS

21

There are two types of ATS calculations:


Local ATS calculates one specific stockroom location and defines the availability of a
SKU at a specific place.
Global ATS calculates a SKU for all the locations where the SKU has stock, defining the
total availability of a SKU across the tenant's entire stock (all stockroom locations).
Global ATS calculation also accounts for submitted orders (and unassigned
quantities). Since these orders have not yet been assigned to stockroom locations,
they can only be considered in an ATS calculation that is not stockroom-location
specific. ATS is considered global if no location is specified in an ATS request.

Thresholds

ATS

22

An inventory threshold, or buffer, can be defined for an ATS calculation of


each stockroom location, or of the entire stock (across all of the stockroom
locations). The purpose of defining a threshold is to create a buffer, so that
a tenant cannot oversell the items.
A threshold value can be added for each stockroom location in the OMS Cockpit. This
makes it possible in the OMS cockpit, or through a batch file import, to set a fixed
threshold quantity for each stockroom location.
The threshold can be set to a different value for each stockroom location, but it will have
the same value for all SKUs at one particular stockroom location. For example, a
warehouse might have a small threshold if its stock is generally predictable.
On the other hand, a store with high sales volume would need to have a higher
threshold, as there is a greater chance that its stock will be damaged, sold, or lost.
Typically, the higher the sales volume for a particular location, the higher you want to
make the threshold for that location.

11

6/3/2013

Thresholds (contd)

ATS

23

The threshold amount can be set by location, as a percentage or a fixed quantity. For
example, you could set a threshold of 5% for a given location, which means 5% of the
inventory for each SKU at that location will be held as a buffer. With a threshold of 10
units for a given location,10 units of each SKU at that location will be held as buffer.
Local ATS calculations must be modified to include the stockroom location threshold
amount applicable to the SKUs at the specific stockroom location. It is highly
recommended that the threshold be included in the ATS calculation destined for the
storefront. For example:
ATS=OnHand Sourced Allocated Picked Packed Threshold
If the threshold value is greater than the available inventory, the SKU will have
a negative ATS value.
If the threshold value is less than the available inventory, the SKU has a
positive ATS and can be sold, barring other restrictions or holds.

Export of ATS Data

ATS

24

Inventory data can change


When a new batch import comes in.
When an order gets processed.
When a new ATS calculation formula is configured.

Each of these will change the ATS value.


To make the changes available to the storefront in a timely and reliable way, all
ATS changes are pushed into a queue immediately, where the storefront can pick
them up any time.

12

6/3/2013

25

hybris Order Management Services


Availability to Sell (ATS)

Order workflow Fulfillment


Third Party Integration in the OMS
Commerce Infrastructure Services

hybris Developer Training Part II - Commerce

Order Workflow Fulfillment

Fulfillment

26

Fulfillment
Which stockroom location(s) should fulfil the items in this order,
and leave the same stockroom location in the same package?

Fulfillment

Pick

Pack

Label

Ship

Capture
Payment

Commit
Taxes

13

6/3/2013

Order Workflow OMS Cockpit

Fulfillment

27

Pick (Print pick list)


What do I need to take off the store/warehouse shelf?

Fulfillment

Pick

Pack

Label

Ship

Capture
Payment

Commit
Taxes

Pack (Print pack slip)


What do I need to put in the shipping box/package?
Label (Print Shipping Label)
How do I get this package to the shopper?
Ship (Confirm Shipment)
How do I confirm that the package is out the door?

Shipment Workflow Settlement

Fulfillment

28

Payment Capture
How do I charge the shoppers credit card?

Fulfillment

Pick

Pack

Label

Ship

Capture
Payment

Commit
Taxes

Tax Commit
How do I commit a tax document to my 3rd party
tax provider?

14

6/3/2013

Order Workflow Disabling a Step

Fulfillment

29

DON'T want a step?


Fulfillment

Pick

Pack

Label

Ship

Capture
Payment

Commit
Taxes

Turn it off!

30

hybris Order Management Services


Availability to Sell (ATS)
Order workflow Fulfillment

Third Party Integration in the OMS


Commerce Infrastructure Services

hybris Developer Training Part II - Commerce

15

6/3/2013

Data Onboarding and Export

3rd Party OMS Integration

31

Third Party Integration Points


CIS Fraud Verification (CyberSource)
CIS Geolocation (via mongoDB)
CIS Payment Service (CyberSource)
CIS Shipping Service (USPS, UPS, FedEx, Canada Post)
CIS Tax Calculation (CyberSource, Avalara)

Third Party Compatibility List for hybris 5


wiki.hybris.com/display/release5/ThirdParty+Compatibility+
+Release+5

OMS Cockpit Highlights

3rd Party OMS Integration

32

Fulfillment users
Search orders and view details
Pick, pack, label and
confirm shipments
Collect in store

Inventory managers
Search and update inventory
by SKU or by location
Search stockroom locations
and view details

Administrative users
Create and manage users
Configure workflow, availability formulas,
and sourcing strategies

AND MORE!

16

6/3/2013

Commerce Infrastructure Services (Third Party Integration)

33

Geolocation

Payment
Address Verification
Tax (US)
Shipping

and more to come!

Data Onboarding and Export

3rd Party OMS Integration

34

Data Onboarding / Import


Support for locations and inventory
Easy import via csv file to FTP folder
See results of import in OMS Cockpit

Export: support for 2 types of exports


Availability Queue: displays items with updated/changed availability status
Order Queue: displays orders with updated/changed status

17

6/3/2013

Fraud Verification Services

3rd Party OMS Integration

35

The CIS fraud verification service provides functionality to verify


transactions. This verification occurs primarily during checkout. The
transactions may be verified in bulk, or on a per request basis. For version
5.0, CyberSource is supported as a third-party verification service.
After CyberSource receives the order and payment data, the first step is
checking against the rules configured in Decision Manager.
When this is successful, the bank is contacted to do further checks on the
credit card. The response from CyberSource is ACCEPT, REJECT or REVIEW.
Orders with REVIEW status should be confirmed to the customer but put on hold
in hybris until a final status is received.
CyberSource sends one or many status updates to hybris directly. These can
also be ACCEPT, REJECT or REVIEW. Therefore, hybris can forward these
updates to CIS for an interpretation and accept or reject the order accordingly.
CIS will handle review cases additionally to accept and reject.

Authorization with CyberSource

3rd Party OMS Integration

36

with Credit Card Information and Decision Manager

15. Status Update


10b. Response

hybris
Accelerator
13. Order on Review

6. Silent
Order
Post

hybris
OMS
13. Order on Review

5. Create
checkout page
10a. redirect
to receipt page

11. Interpret
Response

2. getPSP
(client,
pw,
country)

12. Order
Status
REVIEW
16. Interpret
Response

4. URL
for PSP

12. Order Status


Accept/Reject

14. Fraud REVIEW


Accept/Reject

Commerce Infrastructure
Services

2. getPSP(client,pw,country)

3. PSP(vendor,merchantID)
Fraud
Manager

Subscription Service

18

6/3/2013

Fraud Verification Report with CyberSource

3rd Party OMS Integration

37

The real time data push as implemented under Fraud Verification with
Cybersource, is the quickest option to receive fraud updates from
CyberSource.
Unfortunately, CyberSource does not have a retry for push notifications that are not
received by recipient (Accelerator in this case). CyberSources recommended solution is
to pull fraud reviews for a specified time-frame to reconcile the received order state.

With the fraud verification report request, the Accelerator and other
storefronts (or the OMS) can request all converted transactions for a
defined timeline.
A conversion means the status change of an order e.g. from REVIEW to ACCEPTED or from
REVIEW to REJECTED or in rare cases from REJECT to ACCEPT. A conversion from ACCEPT
to anything else is not possible.

Authorization with CyberSource

3rd Party OMS Integration

38

hybris
Accelerator
1. Cronjob triggers
getFraudReview
7. place/cancel Order

2. getFraudReviews
(tenant,timeframe)

6. OrderStati
(FraudReviews)
4. getReviewUpdates(Timeframe

Commerce Infrastructure
Services
5. ListOfUpdatesForTimeframe

3. getPSP(tenant)

3. PSP(vendor,merchantID)

Subscription Service

19

6/3/2013

Geolocation Services

3rd Party OMS Integration

39

The geolocation web service determines the coordinates (longitude and


latitude) of a requested address using mongoDB (an open source,
document-oriented database system).
1. An order is placed through the Accelerator.
2. The order is exported to OMS.
3. The on-boarding service converts data and pushes it to the target system.
4. A POST request with the address to look up is sent to CIS.
5. The subscription service is queried to check if the user is subscribed to the CIS
geolocation.

6. Subscription Service confirms the subscription.


7. CIS Geolocation queries the internal database to check the geolocation for the given CIS
address.

8. The result is retrieved from the database and returned to the data onboarding.

Geocoding Addresses via mongoDB

3rd Party OMS Integration

40

Geocode an address
using the stored geodata

hybris
Accelerator

hybris
OMS
2. export order

1. place order

3. data onboarding

4. cisGeolocationHybris
(client,pw,address)

9. Geolocation
7. Geocode (address)

Commerce Infrastructure
Services

MongoDB
8. Geolocation

5. confirmSubscription
(client,pw)

6. confirmed

Subscription Service

20

6/3/2013

Payment Provider Services

3rd Party OMS Integration

41

The CIS payment service enables payment by credit card with providers
such as CyberSource. During checkout, the authorization functionality is
used to reserve the order amount on the end-customer's credit card.
In case of a cancellation, through the customer or the warehouse, the
authorization can be reversed or cancelled with the CIS payment service.
After the order is shipped, partially or in full, the charge to the bank account
can be finalized through the capture functionality.
In case of a product return and a desired repayment, a refund can be
fulfilled with the CIS refund functionality.

Payment Operations

3rd Party OMS Integration

42

External Form Post


Some vendors offer the possibility to submit a form post for various operations that send
the request directly to the third party. In this case, the CIS payment service would be
called to return the appropriate URL to post to, and would be sent the response of the
third party in order to create a uniform response.
The credit card information is not stored and does not go through CIS. Instead, it is sent
from the browser to the payment service provider directly. For this reason, the vendor
does not fall under the full PCI compliance regulation.

External Authorization
Authorization of an amount on a customer credit card can be sent through the external
posting of a form to the third party.

Storing a Credit Card


Some vendors offer a form post to create a profile, so that a credit card can be stored for
future use. If a stored credit card exists, the CIS payment service may be called to
authorize the amount against a profile ID. After the initial authorization is verified, the
usual flow may be followed.

21

6/3/2013

Shipping Provider Services

3rd Party OMS Integration

43

By using the CIS Shipping Services, the OMS can:


Get the available shipping methods based on a shipment (shipped items and the
addresses to and from).
Create labels (and save the shipment in the third party system).

CIS Shipping Services currently support these carriers:


USPS
UPS
FedEx
Canada Post

Carrier-Specific Dimension Restrictions

3rd Party OMS Integration

44

USPS
Maximum weight (with some exceptions): 70 pounds
Maximum length + girth: 130 inches

UPS
Maximum weight: 150 pounds
Maximum length: 108 inches
Length + girth: 165 inches

FedEx
Maximum weight: 150 pounds
Maximum length: 119 inches
Maximum length + girth: 165 inches

Canada Post
Maximum weight: 66 lbs

22

6/3/2013

Tax Calculation Services

3rd Party OMS Integration

45

The Tax Calculation web service is used to quote, post, and invoice taxes.
Tax calculation requires order details, including line items and a shipping
address. The currently supported third party integrations are:
CyberSource
Avalara

In order to calculate the tax on shipping, it must be sent as a separate line


item with a taxCode, indicating that it is a shipping charge.
When creating or adjusting posts or invoices a unique ID is required. For
this, you must use the id field of the Order sent in the request.
I you deal with multiple shipments for a single order, you should send the unique
shipment ID and not the order ID to create tax invoices or posts.
Similarly, you should send the return ID (not the order ID) when adjusting invoices for
returns. You can still pass the order number in the clientRefId attribute, which can
then be used for auditing or reporting.

CyberSource and Avalara - Key Differences

3rd Party OMS Integration

46

Avalara has some features that CyberSource does not.


Posting, cancelling, invoicing (committing), and adjusting tax documents
Prevention of duplicate invoices when requests are posted twice

Avalara also has some fields that CyberSource does not.


Effective Tax Rate: TaxDoc.taxLine.taxValue.rate
CuberSource does not provide this. Calculation is based on rounded values in CIS.
Taxable Amount: TaxDoc.taxLine.taxValue.taxable
Tax Name: TaxDoc.taxLine.taxValue.name
Jurisdiction Name: TaxDoc.taxLine.taxValue.jurisdiction

You can find a full list of differences here:


wiki.hybris.com/display/release5/CIS+Tax+Calculation#CISTaxCalculation
VendorSpecificInformation

23

6/3/2013

47

hybris Order Management Services


Availability to Sell (ATS)
Order workflow Fulfillment
Third Party Integration in the OMS

Commerce Infrastructure Services

hybris Developer Training Part II - Commerce

Commerce Infrastructure Services Key Facts

Infrastructure Services

48

Commerce Infrastructure Services (CIS) are used to manage:


Payment
Fraud
Tax
Geolocation
Shipping Labels

Because we are passing sensitive data, we must use a secure protocol to


access all CIS web services.
CIS is not responsible for authentication or authorization. When a request
arrives at CIS, it is expected that the user is authenticated and authorized to
access the given resource.
All CIS web services are stateless; no session management is necessary.

24

6/3/2013

General Resource Design

Infrastructure Services

49

The concrete endpoints of the CIS web resources depend on the service
that is being used.
However, all resources follow the same path convention:
Pattern:
{server}/{context}/{sub_resource}/{serviceId}/..

Example:
internal.hybris.com/hybriscisavalaratax
web/tax/cisTaxAvalara/invoices/

Sub_resources and serviceIDs

Infrastructure Services

50

serviceIDs
cisAvsCybersource
cisAvsAvalara
cisFraudCybersource
cisFraudAccertify
cisGeolocationHybris
cisPaymentCybersource
cisPaymentMoneris
cisPaymentMonerisInterac
cisShippingCanadapost

25

6/3/2013

Sub_resources and serviceIDs (contd)

Infrastructure Services

51

Additional HTTP Request header values


X-CIS-Client-Ref
ID passed in by the client as a reference that can be used for
auditing/troubleshooting/monitoring (e.g. order or cart ID) .
For more information, refer to Client Reference ID (X-CIS-Client-Ref)
X-tenantId
The tenant ID for the lookup in the subscription service

Error Handling

Infrastructure Services

52

When errors occur during web service calls (connection exception,


unexpected behavior, etc), HTTP error codes will be returned.
A more detailed reason will be specified in the body of the response. Here is
an example of such a response:

HTTP/1.1504GATEWAYTIMEOUT
Contenttype:application/xml

<?xml version="1.0"encoding="UTF8"standalone="yes"?>
<errors serviceId="somevendorandtype">
<error code="504">Aservicetimeoutoccurred.Details:None.</error>
</errors>

26

6/3/2013

Multiple Errors

Infrastructure Services

53

In some cases, the body of an error response can contain multiple errors.
For example, if multiple preconditions fail, a general 412 Precondition Failed
response is returned with additional information about which preconditions
have failed.
HTTP/1.1412PRECONDITIONFAILED
Contenttype:application/xml
<?xml version="1.0"encoding="UTF8"standalone="yes"?>
<errors serviceId="somepsp service">
<error code="2001">Invalidcreditcardnumber</error>
<error code="2002">InvalidCVC/CVC2code</error>
<error code="2003">Invalidcreditcarddate</error>
</errors>

Common Error Codes

Infrastructure Services

54

403 Forbidden
The user is not authorized to access this service.

404 Not Found


Resource not found

412 Precondition Failed


A precondition failed which prevented it from fulfilling the request. For example: the XCIS-Client-Ref header parameter is required, but missing in the request.

500 Internal Server Error


The server encountered an unexpected condition which prevented it from fulfilling the
request

27

6/3/2013

Other Common Error Codes

Infrastructure Services

55

501 Not Implemented


A service implementation was requested which is not supported.

502 Bad Gateway


The external service responded with an invalid or unexpected result.

503 Service Unavailable


The service is currently not available. The implication is that this is a temporary condition,
which will be alleviated after some delay.

504 Gateway Timeout


The call to an external service has timed out. Send the request again later.

Multitenant and Multivendor Aspects

Infrastructure Services

56

The Commerce Infrastructure Services can handle multiple tenants.


When making requests to third-party web services that require an ID, CIS
will add this tenant_id prior to making the call.
This is necessary to avoid number clashes (e.g. client a sends a shipment 'SHIPMENT-1'
and client b sends another shipment with the same ID). The tenant_id will be removed
again when the response is returned to the consumer. For example:
Consumer Request
POSThttp://internal.hybris.com/cis/tax/avalaraTax/invoices/
Consumer Request
Status:201CREATED
ContentType:application/xml
Location:http://intyellowcabs.fra.hybris.com:8080/hybriscis
web/tax/avalaraTax/invoices/SHIPMENT1/
Avalara Tax Document ID
subscriber_123-SHIPMENT-1

28

6/3/2013

Multitenant and Multivendor Aspects An Example

Infrastructure Services

57

In this example, the vendor service ID (avalaraTax) is part of the resource


URL. However, the customer does not need to depend on (or even see or
be made aware of) the vendor service ID.
//createataxinvoicedoc
response=taxClient.invoice(params,order);
assertEquals(CisDecision.ACCEPT,response.getResult().getDecision());
//cancelthetaxinvoicedocusingthelocationURI
response=taxClient.cancel(params,response.getLocation());
assertEquals(Status.NO_CONTENT,response.getStatus());

Client Library

Infrastructure Services

58

The CIS client library provides a default interface for communicating with
back-end services. The client offers a service bean for each specific service
offered by CIS, including:
CIS Tax Service client (com.hybris.cis.client.AvsClient)
CIS Address Verification client (com.hybris.cis.client.TaxClient)
CIS Fraud Service client (com.hybris.cis.client.FraudClient)
CIS Geolocation Service client (com.hybris.cis.client.GeolocationClient)
CIS Payment Service client (com.hybris.cis.client.PaymentClient)
CIS Shipping Service client (com.hybris.cis.client.ShippingClient)

29

6/3/2013

Adding Dependencies

Infrastructure Services

59

To add a new dependency, add the following artifact to pom.xml


<dependency>
<groupId>com.hybris.cis</groupId>
<artifactId>hybriscisrestclient</artifactId>
<version>xx.xx.xx</version>
</dependency>

You will also need to add some code to the appropriate bean, as outlined here:
wiki.hybris.com/display/release5/CIS+Client+Library#CISClientLibrary
AddBeansinSpringContext

Using the Client Library An Example, class AvsClientImplTest

60

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/hybriscisclientapp.xml",
"/hybriscisclienttest.xml"})
publicclassAvsClientImplTest extends AbstractRestClientTest
{
@Autowired
privateAvsClient avsClient;
@Test
publicvoidshouldAcceptAddress()
{
final CisAddress address=new CisAddress("1700Broadway",
"10019","NewYork","NY","US");
finalCisParams params =new CisParams("hybriscisclienttest",
"hybris","unittest",null);
final RestResponse<AvsResult>response=
avsClient.verifyAddress(params,address);
assertEquals(CisDecision.ACCEPT,
response.getResult().getDecision());
assertEquals(Status.CREATED,response.getStatus());
}
}

30

6/3/2013

Localization

Infrastructure Services

61

The Accept-Language header is used to request a response in a certain


language.
If no Accept-Language header is present, the services will default to
American English: en-US.
Language Code Specifications can be found at
w3.org/TR/REChtml40/struct/dirlang.html#langcodes

Order Flow with On-Demand Services

Infrastructure Services

62

CIS

Order
Entry

Address
Verification

Tax
Calculation

Stock
Availability
Service

Payment
Authorization

Fraud
Check

Submit
Order

Warehouse 1

Store 2

Stock Integration

OMS

(all locations)

Geolocation (CIS)
Fulfillment
Pick, Pack, Dispatch
Shipping Label (CIS)
Payment Capture (CIS)

31

6/3/2013

63

32

You might also like