Hybris Developer Training Part II - Commerce - Module 16 - Hybris OMS & Channels

32
6/3/2013 1 1 2 hybris Developer Training Part II - Commerce Hybris OMS & Channels

description

HYBRIS

Transcript of Hybris Developer Training Part II - Commerce - Module 16 - Hybris OMS & Channels

  • 6/3/2013

    1

    1

    2

    hybris Developer Training Part II - Commerce

    Hybris OMS & Channels

  • 6/3/2013

    2

    3

    hybris Developer Training Part II - Commerce

    InStore

    4InStore Module Key Facts

    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

    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.

    InStore

  • 6/3/2013

    3

    5InStore Module Bundled Extensions

    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

    6InStore Module Key Features

    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

    Stock level at nearby store

    Quickly identify

    products

    Live ATS

    Check stock in

    store

    Web based app for touch devices

    InStore

  • 6/3/2013

    4

    7InStore Module - UI InStore

    8Widgets

    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 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.

    InStore

  • 6/3/2013

    5

    9Widget Search Architecture

    The following Solr widgets can be used to search from the InStore UIText Search

    Category Tree

    Facet Filter

    There are also supporting widgetsSort 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.

    InStore

    10List of Available Widgets

    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.

    InStore

  • 6/3/2013

    6

    11More Available Widgets

    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.

    InStore

    12Even 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.

    InStore

  • 6/3/2013

    7

    13

    hybris Developer Training Part II - Commerce

    OnDemand OMS & CIS

    14

    hybris Developer Training Part II - Commerce

    hybris Order Management ServicesAvailability to Sell (ATS)Order workflow FulfillmentThird Party Integration in the OMSCommerce Infrastructure Services

  • 6/3/2013

    8

    15hybris OMS - Features

    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

    hybris OMS

    16

    hybris Developer Training Part II - Commerce

    hybris Order Management Services

    Availability to Sell (ATS)Order workflow FulfillmentThird Party Integration in the OMSCommerce Infrastructure Services

  • 6/3/2013

    9

    17Availability to Sell Key Facts

    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

    ATS

    18Inventory to Stock Availability

    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

    ATS

  • 6/3/2013

    10

    19Available to Sell (ATS) Calculating Stock Availability

    A stock availability formula is made up of 3 parts:Inventory statusOrder statusThreshold 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

    ATS

    20Why We Need ATS Calculations

    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.

    ATS

  • 6/3/2013

    11

    21Local and Global ATS Calculations

    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.

    ATS

    22Thresholds

    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.

    ATS

  • 6/3/2013

    12

    23Thresholds (contd)

    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.

    ATS

    24Export of ATS Data

    Inventory data can changeWhen 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.

    ATS

  • 6/3/2013

    13

    25

    hybris Developer Training Part II - Commerce

    hybris Order Management ServicesAvailability to Sell (ATS)

    Order workflow FulfillmentThird Party Integration in the OMSCommerce Infrastructure Services

    26Order Workflow Fulfillment

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

    LabelPackPickFulfillment Ship CommitTaxesCapture Payment

    Fulfillment

  • 6/3/2013

    14

    27Order Workflow OMS Cockpit

    Pick (Print pick list)What do I need to take off the store/warehouse shelf?

    LabelPackPickFulfillment Ship CommitTaxesCapture Payment

    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?

    LabelPackPick Ship CommitTaxesCapture Payment

    Fulfillment

    28Shipment Workflow Settlement

    Payment CaptureHow do I charge the shoppers credit card?

    LabelPackPickFulfillment Ship CommitTaxesCapture Payment

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

    Fulfillment

  • 6/3/2013

    15

    29Order Workflow Disabling a Step

    DON'T want a step?

    LabelPackPickFulfillment Ship CommitTaxesCapture Payment

    Turn it off!

    Fulfillment

    30

    hybris Developer Training Part II - Commerce

    hybris Order Management ServicesAvailability to Sell (ATS)Order workflow Fulfillment

    Third Party Integration in the OMSCommerce Infrastructure Services

  • 6/3/2013

    16

    31Data Onboarding and Export

    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 5wiki.hybris.com/display/release5/ThirdParty+Compatibility++Release+5

    3rd Party OMS Integration

    32OMS Cockpit Highlights

    Fulfillment usersSearch orders and view detailsPick, pack, label and confirm shipmentsCollect in store

    Inventory managersSearch and update inventory by SKU or by locationSearch stockroom locationsand view details

    Administrative usersCreate and manage usersConfigure workflow, availability formulas, and sourcing strategies AND MORE!

    3rd Party OMS Integration

  • 6/3/2013

    17

    33Commerce Infrastructure Services (Third Party Integration)

    Geolocation

    Payment

    Address Verification

    Tax (US)

    Shipping

    and more to come!

    34Data Onboarding and Export

    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

    3rd Party OMS Integration

  • 6/3/2013

    18

    35Fraud Verification Services

    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.

    3rd Party OMS Integration

    36Authorization with CyberSource 3rd Party OMS Integration

    4. URL for PSP

    Commerce InfrastructureServices

    2. getPSP(client,pw,country) 3. PSP(vendor,merchantID)

    Subscription Service

    with Credit Card Information and Decision Manager

    2. getPSP(client,

    pw,country)

    11. InterpretResponse

    16. InterpretResponse

    12. Order Status REVIEW

    12. Order Status Accept/Reject

    hybrisAccelerator

    13. Order on ReviewhybrisOMS

    13. Order on Review5. Create

    checkout page

    6. Silent Order Post

    10a. redirectto receipt page

    10b. Response

    15. Status Update

    14. Fraud REVIEWAccept/Reject

    Fraud Manager

  • 6/3/2013

    19

    37Fraud Verification Report with CyberSource

    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 ACCEPTto anything else is not possible.

    3rd Party OMS Integration

    38Authorization with CyberSource 3rd Party OMS Integration

    hybrisAccelerator

    2. getFraudReviews(tenant,timeframe)

    6. OrderStati(FraudReviews)

    Commerce InfrastructureServices

    3. getPSP(tenant) 3. PSP(vendor,merchantID)

    Subscription Service

    1. Cronjob triggers getFraudReview

    7. place/cancel Order

    4. getReviewUpdates(Timeframe

    5. ListOfUpdatesForTimeframe

  • 6/3/2013

    20

    39Geolocation Services

    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.

    3rd Party OMS Integration

    40Geocoding Addresses via mongoDB 3rd Party OMS Integration

    hybrisOMS

    3. data onboarding

    hybrisAccelerator

    1. place order

    4. cisGeolocationHybris(client,pw,address)

    Geocode an addressusing the stored geodata

    9. Geolocation

    Commerce InfrastructureServices

    7. Geocode (address)

    8. Geolocation

    MongoDB

    Subscription Service

    5. confirmSubscription(client,pw) 6. confirmed

    2. export order

  • 6/3/2013

    21

    41Payment Provider Services

    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.

    3rd Party OMS Integration

    42Payment Operations

    External Form PostSome 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 AuthorizationAuthorization 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 CardSome 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.

    3rd Party OMS Integration

  • 6/3/2013

    22

    43Shipping Provider Services

    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

    3rd Party OMS Integration

    44Carrier-Specific Dimension Restrictions

    USPSMaximum weight (with some exceptions): 70 pounds

    Maximum length + girth: 130 inches

    UPSMaximum weight: 150 pounds

    Maximum length: 108 inches

    Length + girth: 165 inches

    FedExMaximum weight: 150 pounds

    Maximum length: 119 inches

    Maximum length + girth: 165 inches

    Canada PostMaximum weight: 66 lbs

    3rd Party OMS Integration

  • 6/3/2013

    23

    45Tax Calculation Services

    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.

    3rd Party OMS Integration

    46CyberSource and Avalara - Key Differences

    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

    3rd Party OMS Integration

  • 6/3/2013

    24

    47

    hybris Developer Training Part II - Commerce

    hybris Order Management ServicesAvailability to Sell (ATS)Order workflow FulfillmentThird Party Integration in the OMS

    Commerce Infrastructure Services

    48Commerce Infrastructure Services Key Facts

    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.

    Infrastructure Services

  • 6/3/2013

    25

    49General Resource Design

    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/hybriscisavalarataxweb/tax/cisTaxAvalara/invoices/

    Infrastructure Services

    50Sub_resources and serviceIDs

    serviceIDs

    cisAvsCybersource

    cisAvsAvalara

    cisFraudCybersource

    cisFraudAccertify

    cisGeolocationHybris

    cisPaymentCybersource

    cisPaymentMoneris

    cisPaymentMonerisInterac

    cisShippingCanadapost

    Infrastructure Services

  • 6/3/2013

    26

    51Sub_resources and serviceIDs (contd)

    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

    Infrastructure Services

    52Error Handling

    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

    Aservicetimeoutoccurred.Details:None.

    Infrastructure Services

  • 6/3/2013

    27

    53Multiple Errors

    In some cases, the body of an error response can contain multiple errors. For example, if multiple preconditions fail, a general 412 Precondition Failedresponse is returned with additional information about which preconditions have failed.

    HTTP/1.1412PRECONDITIONFAILED

    Contenttype:application/xml

    Invalidcreditcardnumber

    InvalidCVC/CVC2code

    Invalidcreditcarddate

    Infrastructure Services

    54Common Error Codes

    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 X-CIS-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

    Infrastructure Services

  • 6/3/2013

    28

    55Other Common Error Codes

    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.

    Infrastructure Services

    56Multitenant and Multivendor Aspects

    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:201CREATEDContentType:application/xmlLocation:http://intyellowcabs.fra.hybris.com:8080/hybriscisweb/tax/avalaraTax/invoices/SHIPMENT1/

    Avalara Tax Document ID

    subscriber_123-SHIPMENT-1

    Infrastructure Services

  • 6/3/2013

    29

    57Multitenant and Multivendor Aspects An Example

    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());

    Infrastructure Services

    58Client Library

    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)

    Infrastructure Services

  • 6/3/2013

    30

    59Adding Dependencies

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

    com.hybris.cis

    hybriscisrestclient

    xx.xx.xx

    You will also need to add some code to the appropriate bean, as outlined here:

    wiki.hybris.com/display/release5/CIS+Client+Library#CISClientLibraryAddBeansinSpringContext

    Infrastructure Services

    60Using the Client Library An Example, class AvsClientImplTest

    @RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(locations={"/hybriscisclientapp.xml","/hybriscisclienttest.xml"})publicclassAvsClientImplTest extends AbstractRestClientTest{

    @AutowiredprivateAvsClient avsClient;

    @TestpublicvoidshouldAcceptAddress(){

    final CisAddress address=new CisAddress("1700Broadway","10019","NewYork","NY","US");

    finalCisParams params =new CisParams("hybriscisclienttest","hybris","unittest",null);

    final RestResponseresponse=avsClient.verifyAddress(params,address);

    assertEquals(CisDecision.ACCEPT,response.getResult().getDecision());

    assertEquals(Status.CREATED,response.getStatus());}

    }

  • 6/3/2013

    31

    61Localization

    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

    Infrastructure Services

    62Order Flow with On-Demand Services

    Order Entry

    Address Verification

    Tax Calculation

    Payment Authorization

    Geolocation (CIS)

    Stock Availability

    Service

    CIS

    OMS

    FulfillmentPick, Pack, DispatchShipping Label (CIS)

    Fraud Check

    Submit Order

    Warehouse 1

    Store 2Stock Integration

    (all locations)

    Payment Capture (CIS)

    Infrastructure Services

  • 6/3/2013

    32

    63