Punch Out Feature Overview

Punch Out is a technology that connects a buyer's e-procurement software with the e-commerce shops, in our case - with the Spryker Commerce OS.

E-procurement system is a complicated and expensive business management software used to manage the purchase lifecycle, budget, etc. in large companies and enterprises.

How does Punch Out work? A customer starts in their ERP system and then "punches out" to a Spryker e-commerce website to shop the catalog by adding the products into a shopping cart. Once they have what they need, their shopping cart is transferred back to their e-procurement system, and the customer finishes buying items in their system.

Punch Out has been developed together with the partner PunchOut Catalogs. In terms of Spryker Commerce OS, Punch Out feature provides user interface in the Back Office where you can configure the ability to log in to a Spryker-based store from within your e-procurement application, add products to cart, and transfer this cart to your ERP system. PunchOut Catalogs, in turn, handle the ERP-side communication and set up the workflow for Spryker.

Punch Out Workflow

From the B2B buyer perspective, the Punch Out process typically involves the following steps:

  1. The buyer logs in to their e-procurement system and clicks a link to connect to the supplier's Spryker store.
  2. The buyer gets immediately forwarded to the supplier's e-commerce store (Spryker web shop) within the buyer's e-procurement system. A Punch Out session is initiated.

  3. Authentication is handled with the help of Customer login by token feature. So, the buyer doesn't need to enter any login details to get to the customer account. The Vault for Tokens feature allows securely keeping the sensitive data (username and password) and retrieving it on request.

  4. The buyer browses the store and adds items to their shopping cart.

  5. When the buyer is finished, they punch out the cart - the cart gets transferred to the e-procurement platform in the cXML/OCI format. After that, the buyer passes through the necessary workflow steps in their ERP.

Punch Out Formats

The cart from Spryker Commerce OS is transferred to the client's ERP using cXML or OCI formats. Both standards provide similar functionality.

Spyker only provides the user interface in the Back Office where the connection between Spryker Commerce OS and customer's e-procurement system is set up. The ERP-related workflows and logics are managed by our partner PunchoutCatalogs.

cXML

cXML is the most popular and supported standard, and it is based on the XML format. cXML is used by most e-procurement systems and allows to modify and validate the cart data without prior knowledge of their form and the included fields.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.021/cXML.dtd">
<cXML payloadID="2019-08-14T12:17:25+00:00.571727569@zed.demo.spryker.punchoutexpress.com" timestamp="2019-08-14T12:17:25+00:00" xml:lang="en-US">
	<Response>
		<Status code="200" text="OK"/>
		<PunchOutSetupResponse>
			<StartPage>
				<URL>https://mysprykershop.punchout.com/en/access-token/eyJ0eXAiOiJKV1-d2jOcvC64fnPNBG9RTfQ?returnUrl=home</URL>
			</StartPage>
		</PunchOutSetupResponse>
	</Response>
</cXML>

OCI

OCI is the Open Catalog Interface standard that is needed to integrate with specific ERP applications that do not support cXML. Example OCI response:

<html>
	<body>
		<span style="font-style:italic; font-size:12px; color:#7D8083;">Redirecting to supplier website...</span>
			<script type="text/javascript">window.location.href = 'https://mysprykershop.punchout.com/en/access-token/eyJ0eXAiOiJKV1QiLCJhbGc-6z7KTmrkPVg25IxaA?returnUrl=home';</script>
	</body>
</html>

In case a company user transfers the cart in the Net Prices mode, every part of the cart (discounts, taxes, additional prices and fees) is added in a separate field in the transfer request. For Gross Mode, taxes are already included in the item price, so they will not have a separate field.

Punch Out Architecture and Database Relations

A high-level overview of the Punch Out Architecture is schematically represented below:

Database relations are represented in the following schema:

The following table provides more details on the database structure:

Table Field Constraints Description
pwg_punchout_catalog_connection      
  username   Username of the connection authentication.
  credentials   Additional custom data required for authentication that is stored in JSON.
  type   This type defines the punchout workflow step for which this connection can be used. The type also predefines the necessary tables to join (e.g., pwg_punchout_catalog_connection_setup).
  format   Format of communication: cxml or oci.
  mapping optional Mapping JSON for request.
pwg_punchout_catalog_connection_setup      
  id_punchout_catalog_connection_setup foreign key One-to-one relation with id_punchout_catalog_connection.
  fk_company_business_unit   Allows customers to configure the BU where the new company user is created (dynamic login mode).
  fk_company_user optional Defines a dedicated company user that will be used by all ERP users (single company user login mode).
  login_mode   Defines if the connection uses "dynamic login" or "single company user login".
pwg_punchout_catalog_connection_cart      
  id_punchout_catalog_connection_cart foreign key One-to-one relation with id_punchout_catalog_connection.
  max_description_length   Maximum length during Cart sending for: content + description + name fields.
  encoding   Cart encoding options:
- base64
- url-encoded
- no-encoding
  mapping   JSON mapping definition for cart mapping.
  default_supplier_id   The supplier of the products.
  bundle_mode optional In case bundles are available, it decides how to send the bundle info
- NULL (bundles are not available)
- single
- composite
pwg_punchout_catalog_transaction      
  fk_company_business_unit foreign key, optional  
  fk_punchout_catalog_connection optional Only available if the connection authentication has passed.
  message   The full content of the request before modifications.
  status   Boolean: true / false (success / failure).
  type   Type of the communication: setup_request / setup_response / ...
  connection_session_id   UUID, based on available data before Connection Authentication.
  raw_data   JSON
  error_message   General error message during the process.

 

Last review date: Sep 05, 2019