0% found this document useful (0 votes)
491 views

B2B Commerce Module

Uploaded by

威王
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
491 views

B2B Commerce Module

Uploaded by

威王
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 118

1/9/2020

Commerce
Generated on: 2020-01-09

SAP Commerce | 1808

PUBLIC

Original content: https://help.sap.com/viewer/9d346683b0084da2938be8a285c0c27a/1808/en-US

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product documentation. The
information included in custom documentation may not re ect the arrangement of topics in the SAP Help Portal, and may be missing important
aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the https://help.sap.com/viewer/disclaimer.

B2B Commerce Module


The B2B Commerce Module adds business-to-business functionality to SAP Commerce. It enables you to integrate multiple channels, business
models, and markets on a single platform.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 1/118
1/9/2020
Thanks to the B2B Commerce Module you are able to offer a retail-like shopping experience to your business customers, with integrated order
process handling. Various permission settings enable you to efficiently and securely process your sales. You can integrate various products, multiple
supplier catalogs, inventory, contracts, customer information, content, and orders onto a single solution.

 Note
Before Implementing

A SAP Commerce module may include or enable functionality that is not covered by your individual license. Make sure to limit your
implementation to features as de ned in your license contract. In case of doubt, please contact yourSAP Sales representative.

Features Architecture

Working with B2B Commerce b2bapprovalprocess Extension

B2B Multi-Dimensional Products b2bapprovalprocessfacades Extension

Working in the B2BAdmin Perspective b2bcommerce Extension

b2bcommercefacades Extension

b2badmincockpit Extension

B2B API AddOn for OCC

Related Information
Cart & Checkout
Work ow and Collaboration Module

About B2B Commerce


The SAP Commerce B2B Commerce Module provides B2B organizations with a exible multi-channel solution that can easily be customized to
match speci c requirements of the B2B purchasing cycle. Multiple business models, channels, and markets can be managed on a single platform.

By combining standard SAP Commerce functionality and B2B-speci c features, a sophisticated retail-like shopping experience can be created in
service of business customers. The SAP Commerce B2B Commerce Module offers additional administration tools, customer self-service tools, and
functionality for the storefront and backend. All sales administration tasks can be automated, reducing operational costs and eliminating manual,
low-value processes. Salespeople can then focus on value selling.

The basic building block of B2B functionality in SAP Commerce is support for customer organizations, known as units. A unit represents a division,
department, office, factory, or any other grouping that may exist for a customer's company. Typically one primary parent unit is created for a
company, and then other child units are assigned to this parent unit.

Challenges Faced by B2B Customers


B2B organizations manage a complex ecosystem of suppliers, distributors, and partners with different terms and contracts. Customized pricing and
catalogs are required. It is challenging to accurately and effectively represent complex and highly specialized B2B products across a wide range of
channels, all with different display capabilities. Customer relationships and transactions can also be complex.

In addition, there are different types of users with different needs. Sales and service resources are required for taking orders and handling order
problems. Salespeople must perform manual tasks like managing customer information, ordering using phone or fax, and following up on order
approval processes. Ordering processes are complex because orders must pass through approval processes. Account managers face similar
administrative overhead.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 2/118
1/9/2020
Key Features
The B2B Commerce Module extends the current SAP Commerce B2C functionality with the extra functionality required in a B2B context.

Like the B2C Accelerator, the B2B Accelerator storefront includes, but is not limited to, the following features:

Cart: A customer can view his or her cart and make adjustments to quantity.

Search: Customers can search for products at any time using the Quick Search box in the header.

Product details: Merchants can provide general and technical details and images like any other e-commerce site.

Reviews: Customers can read and write reviews.

Promotions: Merchants can de ne promotions as in a B2C site, such as buy-2-get-1-free.

Social: Customers can share information through social networks.

Backoffice integration: Integrating the Backoffice features results in a seamless customer experience by bridging the gap between your
online e-commerce system with your Backoffice accounts and database systems.

Self-service account management: B2B administrators assign rights to employees, set up individual purchasing limits, con gure approval
rules and work ows, and manage cost centers and budgets.

Online ordering: Users can place orders online and schedule orders that are automatically replenished. Orders are subject to internal and
merchant order approval. Orders can be tracked online (see B2B Checkout and Order Process).

Custom catalogs: Merchants can customize product lists and search product pages for speci c organizations, departments, and customers
(see Setting Product Visibility).

Custom pricing: Complex B2B pricing models are supported, which are managed either in SAP Commerce or in an ERP system (see Setting
Customized Prices).

Credit management: Merchants can assign multiple credit limits with a variety of currency and date range options (see Managing Credit
Limits).

Multi-dimensional products: Products can be de ned as having multiple attributes, such as color, size and t (see B2B Multi-Dimensional
Products).

Advanced product search: Searches can be performed using bar code or product code, and by text or delimited list (see B2B Order Forms).

Future Stock Availability. Customers can see when inventory is going to be replenished with new stock.

All features are manageable using the SAP Commerce Administration Cockpit. Customers use the site itself to manage their organizations.

Powertools Storefront Example


The SAP Commerce includes a fully functional B2B storefront example, named Powertools, that is used to help jump-start the customer
implementation and easily build and maintain a feature-rich multi-channel B2B commerce solution.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 3/118
1/9/2020

B2B Features of SAP Commerce


The business-to-business features of the SAP Commerce allow merchants to integrate multiple channels, business models, and markets into a single
platform, resulting in a retail-like shopping experience for business customers. Integrated order process handling and various permission settings
enable efficient and secure sales process. Merchants can combine various products, multiple supplier catalogs, inventory, contracts, customer
information, content, and orders into a single solution.

B2B e-commerce and SAP Commerce


By combining standard SAP Commerce functionality and B2B-speci c features, a sophisticated retail-like shopping experience can be created in
service of business customers.

The basic building block of B2B functionality in SAP Commerce is support for customer organizations, known as units. A unit represents a division,
department, office, factory, or any other grouping that may exist for a customer's company. Typically one primary parent unit is created for a
company, and then other child units are assigned to this parent unit.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 4/118
1/9/2020

Features
Feature Category Description

Customer-speci c pricing and product catalogs The pricing and product catalogs displayed in the site can be linked to speci c
units based on the logged-in purchaser.

Self-serve organization management Each customer manages their own organization through the B2B site. A
customer's B2B site administrator can:

De ne which employees can make purchases

De ne cost centers against which purchases are to be made

Limit how much an employee can spend, per order or per timespan
(day, week, month, quarter, or year)

Limit how much can be spent against a cost center, by assigning


budgets to cost centers and the timespan during which budgets are
active

De ne who can approve orders that surpass order limits

De ne standard shipping addresses

Purchasing and checkout features Besides standard features such as being able to create one-time orders or re-
ordering from existing orders, B2B-speci c checkout features include the
ability to:

Schedule automatic replenishment orders

Request a quotation from the merchant, if the current order has


reached a con gurable minimum

Specify account payment (with purchase order number) as well as


credit card

Specify the cost center the purchase should be made against

Choose from standard delivery addresses associated with the unit or


cost center, or create new ones

Purchasers can also manage their credit card information and their own
additional shipping addresses through the B2B site.

Automated order processes


Orders are automatically approved or sent for approval depending on
purchasing rights, cost centers, and budget settings

Approvers can easily view all orders pending their approval

Purchasers can view pending and ful lled orders, pending and
responses to quotes, and scheduled replenishments

Quotation requests and the back-and-forth communication during the


negotiation process is handled automatically (the merchant provides
his or her response through the B2B Admin Cockpit)

Emails are sent automatically to con rm orders or responses to


interactions

Merchant-speci c features Merchants can:

De ne a minimum order limit for quotation requests

De ne separate purchasing limits

De ne credit limits and alerts

Require early login - when this feature is enabled, customers must log
on before being able to view the site's products

Merchant approvals and most merchant settings are controlled through the
B2B Admin Cockpit and not through the B2B site.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 5/118
1/9/2020

Feature Category Description

Search features Users can:

Search by product ID in addition to the standard text search

Create order forms during search, making it easier to add multiple


items to the cart

Other product features B2B Accelerator supports:

Multi-Dimensional Products. Products can be de ned with multiple


dimensions. For example, shoes can be de ned as having color, size,
and t (Multi-Dimensional Products). Order forms displaying the
product attributes are used to add multiple products to the cart at the
same time.

Future Stock Availbility. Customers can see when inventory is going to


be replenished with new stock.

Procurement system integration features (PunchOut) Purchasers can shop a supplier's online catalog like any other shopping site,
but at checkout, the cart is saved as a requisition in the purchaser's
procurement system. After the order has been approved internally, the order
is sent to the supplier site.

Feature that are not speci c to B2B Like on the B2C Accelerator, the B2B Accelerator storefront includes but is not
limited to the following storefront features:

Cart: A customer can view his or her cart and make adjustments to
quantity.

Search: Customers can search for products at any time using the
Quick Search box in the header.

Product details: Merchants can provide general and technical details


and images like any other e-commerce site.

Reviews: Customers can read and write reviews.

Promotions: Merchants can de ne promotions as in a B2C site, such


as buy-2-get-1-free.

Social: Customers can share information through social networks.

Powertools Storefront Example


The SAP Commerce includes a fully functional B2B storefront example, named Powertools, that is used to help jump-start the customer
implementation and easily build and maintain a feature-rich multi-channel B2B commerce solution.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 6/118
1/9/2020

Working with B2B Commerce


The SAP Commerce B2B Commerce module provides you with a exible solution that you can easily customize to match speci c requirements
across the whole B2B purchasing cycle. You can manage several business models, channels, and markets on a single platform.

Functionality Scope
In B2B Commerce you can easily do the following:

Create, update, and manage organizations and their units. For more details, see Working with B2B Units.

Create, update, and manage customers and customer groups. For more details, see Managing Customer User Groups in Backoffice.

Create, manage, and assign budgets and cost centers. For more details, see Working with Budgets.

Manage prices. For more details, see Setting Customized Prices.

Manage order process. For more details, see Working with Orders.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 7/118
1/9/2020
Manage products. For more details, see Setting Product Visibility.

Manage credit limits. For more details, see Managing Credit Limits.

You can perform all of the above functionality either using the Backoffice Administration Cockpit or the B2B Accelerator. To manage organizations
through the B2B Accelerator, at least one administrator login must rst be created using the Backoffice Administration Cockpit.

Working with B2B Units


You can represent complex organizations through hierarchical structures of B2B units.

B2B units are the foundation nodes of the B2B organization tree. They represent a division, department, office, factory, or any other group within the
organization. You can apply B2B employees, budgets, cost centers, and so on, to created B2B units.

Displaying a B2B Unit


1. Log into the Backoffice Administration Cockpit (localhost/backoffice).

2. Click B2B Commerce B2B Unit . The list of units appears.

3. Type the name or ID of the unit in the Search eld, and then click Search.

4. Click a unit.

Creating a B2B Unit


1. Log into the Backoffice Administration Cockpit (localhost/backoffice).

2. Click B2B Commerce B2B Unit . The list of units appears.

3. Click + B2B Unit.

4. Fill the elds with appropriate data. The only required eld is ID.

5. Click Done.

6. Display the unit you just created.

7. In the Organization tab, select the parent unit by adding a unit to the Group eld. If you create a root company, you don't need to select any
parent unit.

8. In the Organization tab, select child units by adding units to the Members list.

9. Click Save.

Editing a Unit
1. Log into the Backoffice Administration Cockpit (localhost/backoffice).

2. Click B2B Commerce B2B Unit . The list of units appears.

3. Click a unit. The system displays the unit editor.

4. Browse the tabs to add or edit the information you need. For example:

Add an order approver group:

a. Click the Approvers tab.

b. Select or create approver groups from the Approver Groups list.

c. Click Save.

Add an order approver:

a. Click the Approvers tab.

b. Select or create approvers from the Approver list.

c. Click Save.

Add a cost center or budget:

a. Click the Cost Center tab.

b. Select or create budgets from the B2B Budgets list.

c. Select or create cost centers from the B2B Cost Centers list.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 8/118
1/9/2020
d. Click Save.

Disabling a Unit

 Note
When you disable a unit, all its descendant B2B units are also disabled. All nodes linked to this unit and all their descendant units will also be
disabled. These nodes might be such things as employees, cost centers and budgets. To revert, you need to manually enable each unit.

1. Display the unit you want to disable.

2. Click Disable B2B Unit from the toolbar. You are asked to con rm.

3. Click Yes.

Enabling a Unit
1. Display the unit you want to enable.

2. Click Enable B2B Unit from the toolbar. The unit is enabled.

Related Information
B2B Units and Organization Tree

Managing Customers
All B2B customers are assigned to a B2B Unit. They must be members of at least one B2B group. Visibility and actions of B2B customers are limited
to the B2B organization and B2B branch to which they belong.

B2B customers can be active or inactive. If a B2B customer is inactive, the customer cannot log in and therefore cannot perform any administration
activities.

You can move B2B customers from one B2B unit to another within the B2B organization by updating the parent B2B unit. The budgets and cost
centers of the updated parent B2B unit area automatically applied to the B2B customers. However, B2B permission groups can also be transferred,
but they may need to be modi ed. An order history is maintained for both the B2B customer and the B2B unit at the time the order was placed, so
historical data is maintained.

You can manage B2B customers using the Backoffice Administration Cockpit.

Default Customer Groups


There are four default user groups de ned within the system.

User Group Description

b2bcustomergroup Members of this group can:

View cost centers

Create and view their own orders

b2bapprovergroup Members of this group can:

View cost centers

Create and view their own orders

Approve and reject orders according to the order approval work ow

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2b… 9/118
1/9/2020

User Group Description

b2bmanagergroup Members of this group can:

View cost centers

Create and view their own orders

Approve and reject orders according to the order approval work ow

Manage all items with their branch of the organization tree

b2badmingroup Members of this group can:

View cost centers

Create and view their own orders

Approve and reject orders according to the order approval work ow

Manage all items with their branch of the organization tree

Creating a B2B Customer


1. Log into the Backoffice Administration Cockpit (localhost/backoffice).

2. Go to B2B Commerce B2B Customer . The list of customers appears.

3. Click + B2B Customer.

4. Type the customer's ID, name, and email address in the appropriate elds. Note that a customer ID must be unique within the system.

5. Click Next.

6. Optional: Select the standard language and currency for the customer.

7. Click Next.

8. Select the default B2B unit for the customer.

9. Optional: Select the groups the customer will belong to. The customer is a member of the b2bcustomergroup by default.

10. Click Done. The customer is created.

Displaying a Customer
1. Log into the Backoffice Administration Cockpit (localhost/backoffice).

2. Go to B2B Commerce B2B Customer . The list of customers appears.

3. Type the name or ID of the customer in the Search eld, and then click Search.

4. Click the customer you want to display.

Updating a Customer
1. Display the customer in the Backoffice Administration Cockpit.

2. Make the required changes to the customer.

3. Click Save.

Changing a Customer's Parent Unit


1. Display the customer in the Backoffice Administration Cockpit.

2. Click the General tab.

3. In the Groups list, point at the existing parent unit. A small X appears to the right of the entry. Click the X to remove the parent unit.

4. In search eld of Group list, type part of the name of the new parent B2B Unit.

5. Select the unit name.

6. Click Save.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 10/118
1/9/2020
Disabling a Customer
A disabled B2B customer cannot log in.

1. Display the customer in the Backoffice Administration Cockpit.

2. Click the Administration tab.

3. In the Unbound section, under Active, select False.

4. Click Save.

Managing Customer User Groups in Backoffice


B2B customers can be organized into user groups using the Backoffice Administration Cockpit.

Creating B2B User Groups


To create a B2B user group:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Commerce B2B User Group . The list of user groups appears.

3. Click + B2B User Group.

4. In the ID eld, type the user group's ID. Note that a customer ID must be unique within the system.

5. From Parent B2B Unit, select the user group's parent unit.

6. Enter other information as required.

7. Click Next and select languages and catalog versions as required.

8. Click Done.

Updating a B2B User Group


To update a B2B user group:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Commerce B2B User Group . The list of user groups appears.

3. Select the user group you want to modify.

4. Make the required changes.

5. Click Save.

Deleting a B2B User Group


To delete a B2B user group:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Commerce B2B User Group . The list of user groups appears.

3. Select the user group you want to delete.

4. Click Delete in the toolbar, and then click Yes to con rm.

Displaying Members of a B2B User Group


To display the members of a B2B user group:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Commerce B2B User Group . The list of user groups appears.

3. Click a user group. The details for that user group appears.

4. Click the Administration tab. The users are shown in the Members list box.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 11/118
1/9/2020
You can also use this list box to search for members.

Working with Budgets


Budgets help companies to monitor their spending. Budgets are assigned to cost centers, which are used for accounting purposes. Orders or line
items of an order are charged against a cost center. One budget may be assigned to multiple cost centers.

Cost centers and budgets are managed using the Backoffice Administration Cockpit.

Displaying a Budget Using


1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Click B2B Commerce > B2B Budget. The list of budgets appears.

3. Type the name or ID of the budget in the Search eld, and then click Search.

4. Click the budget you want to display.

Creating a Budget Using the Backoffice Administration Cockpit


1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Click B2B Commerce > B2B Budget. The list of budgets appears.

3. Click + B2B Budget.

4. Type the budget's ID in the appropriate eld. Note that the ID must be unique within the system.

5. Specify the budget's currency, date range, parent B2B unit, budget amount, in the appropriate elds.

6. Click Done.

Updating a Budget Using the Backoffice Administration Cockpit


1. Display the budget you want to modify.

2. Make the required changes to the budget.

3. Click Save.

Disabling a Budget
To disable a budget, go to the General tab and set Active to False. Disabling a budget means that you are not able to check out any new orders
against this budget.

Related Information
B2B Budgets and Cost Centers

Working with Cost Centers


Companies may choose to classify business units as cost centers. Cost centers are usually established in large organizations for multiple purposes
such as identifying responsibility, controlling costs, and for accounting purposes.

Cost centers and budgets are managed using the Backoffice Administration Cockpit.

Displaying a Cost Center Using


1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Click B2B Commerce B2B Cost Center . The list of cost enters appears.

3. Type the name or ID of the cost center in the Search eld, and then click Search.

4. Click the cost center you want to display.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 12/118
1/9/2020
Creating a Cost Center Using
1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Click B2B Commerce B2B Cost Center . The list of cost centers appears.

3. Click + B2B Cost Center.

4. Type the cost center's ID in the appropriate eld. Note that the ID must be unique within the system.

5. Specify the cost center's currency and parent B2B unit in the appropriate elds.

6. Click Done.

Updating a Cost Center


1. Display the cost center you want to modify.

2. Make the required changes to the cost center.

3. Click Save.

Disabling a Cost Center


To disable a cost center, go to theGeneral tab and set Active to False. Disabling a cost center means that you are not able to check out any new
orders against the cost center.

Related Information
B2B Budgets and Cost Centers

Setting Customized Prices


B2B customers may have individually negotiated price lists that can be managed either in SAP Commerce or in the ERP system. Customer-speci c
prices can be negotiated on different levels, either on the B2B organization, B2B company, or B2B department.

In many cases, individual price lists are negotiated per article or article group. Many of such price lists may exist. A base price list is available for all
customers who do not have an individual price list.

You can assign the customized prices to a single B2B customer, to a B2B customer group, or to a whole B2B unit.

Setting up Customized Prices


To set up customized prices:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Do one of the following:

To set up customized prices for a B2B customer, go to B2B Commerce B2B Customer , and then select a customer.

To set up customized prices for a B2B group, go to User User Groups , and then select a user group.

To set up customized prices for a B2B unit, go to B2B Commerce B2B Unit , and then select a B2B unit.

3. In the Prices tab, set the Price Group, Tax Group, and Discount Group.

4. Click Save.

Related Information
B2B Price, Product and Catalog Management
Price, Tax, and Discount Calculation

Working with Orders


The B2B Commerce Module lets buyers place a one-time order or create a replenishment order.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 13/118
1/9/2020
Order-related functionality delivered with B2B Commerce Module includes:

Support for complex purchasing work ows.

Empower end-users to buy within spend limits by using manual order approval, automatic order approval when an order does not exceed the
limit, noti cation for the approver of pending orders for review.

Enable efficient global ful llment through partial delivery and multi-warehouse shipping.

Ensure just-in-time availability with automatic replenishment.

Automate and streamline order processing by enabling B2B customers to access your online store from their ERP systems via OCI
integration.

 Note
To make purchases as a B2B customer, the user must belong to the b2bcustomergroup.

Placing a One-Time Order


1. Browse to the B2B Accelerator site.

2. Click Login. The Returning Customer page appears.

3. Type your username and password, and then click Login.

4. Add some products to the cart.

5. Show the cart, and the click Checkout.

6. Provide payment and delivery information.

7. Select the Terms and Conditions check box.

8. Click Place Order.

You can view the state of your orders by clicking My Account.

Creating a Replenishment Order


1. Browse to the B2B Accelerator site.

2. Click Login. The Returning Customer page appears.

3. Type your username and password, and then click Login.

4. Add some products to the cart.

5. Show the cart, and the click Checkout.

6. Provide payment and delivery information.

7. Select the Terms and Conditions check box.

8. Click Schedule Replenishment.

9. Specify the start date and type of replenishment.

10. Click Place Replenishment Order.

Related Information
Cart & Checkout
B2B Orders
Managing Order Permissions in Backoffice

Managing Order Permissions in Backoffice


A company's purchasers (B2B Customers) are assigned permissions that allow them to make purchases up to a certain amount per order, or a total
amount per time span.

If an order is within the scope of permissions when it is placed, the order is automatically approved. If the order exceeds the permission, the order is
placed in a pending approval state. The company's order approvers (B2B Approvers) are noti ed and must approve or reject the order.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 14/118
1/9/2020
For example, Mark, a purchaser, is allowed to purchase up to $500 per order, but not more than $1200 per month.

Mark's rst order of the month, for $400, is automatically approved.

Mark makes a second order of $600 a few days later; it is submitted for approval. Assuming that this order is approved, then Mark has no now
spent $1000

Assuming Mark's previous order was approved, he has now spent $1000.

Mark makes another purchase for $300. This order is also submitted for approval, since he is now surpassed the $1200 limit.

Approvers also have limited permissions. If a purchase surpasses an approver's limit, the approval is escalated to the next person in the approval
chain, ending with a B2B Administrator.

Displaying a B2B Permission


To display B2B permissions:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Approval Process B2B Permission . The list of permissions appears.

3. Type the name or ID of the permission in the Search eld, and then click Search.

4. Click a permission to display it.

Creating a B2B Permission


To create a B2B permission:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Approval Process B2B Permission . The list of permissions appears.

3. Click the down arrow next to + B2B Permission, and then click the arrow to the left of + B2B Permission, and then click the type of
permission you want to create.

 Note
Clicking + B2B Permission directly gives an error.

4. Fill in the required elds, and then click Done.

Updating a B2B Permission


To update a B2B permission:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Approval Process B2B Permission . The list of permissions appears.

3. Type the name or ID of the permission in the Search eld, and then click Search.

4. Click the permission you want to modify.

5. Make your changes, and then click Save.

Deleting a B2B Permission

 Note
Deleting a permission does not affect orders that were already placed, approved or assigned to be approved. It applies only to future actions.

To delete a B2B permission:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Approval Process B2B Permission . The list of permissions appears.

3. Type the name or ID of the permission in the Search eld, and then click Search.

4. Click the permission you want to delete.

5. Click Delete in the toolbar, and then click Yes to con rm.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 15/118
1/9/2020
Managing B2B Permission Groups
B2B Permission Group is a user group that you assigned permissions to. For more information on how to manage B2B User groups, see Managing
Customer User Groups in Backoffice.

Related Information
B2B Orders
b2bapprovalprocess Extension
B2B Permissions

Setting Product Visibility


You can restrict the visibility of certain product groups to a user group. This is useful if you want to create multiple product catalogs for various B2B
Customers.

Find more information on product catalog in Product Content and Catalog Module.

Restricting Visibility of a Product Group


To restrict visibility of a product group:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Click Catalog Categories . The list of categories appears.

3. Type the name or ID of the category in the search eld, and then click Search.

4. Click the category you want to modify.

5. In the General Category Visibility section, in the Visible to list, add or remove customers, groups and units.

6. Click Save.

Related Information
B2B Price, Product and Catalog Management
Product Content and Catalog Module

Managing Credit Limits


In some cases, you may want to assign a credit limit to a customer. The account manager role sets up customer credit limits. Learn how to de ne
B2B account managers in the Backoffice Administration Cockpit and how they manage the credit limits in their B2B units.

A credit limit de nes the maximum amount of credit that an organization or unit can have. You can de ne multiple credit limits for each unit. A credit
limit alert de nes when an account manager should be informed that the customer is approaching the credit limit.

A credit limit alert is triggered when the amount of used credit exceeds the speci ed value.

To start using a credit limit for any unit, you have to assign an account manager. This is the role that is responsible for group of customers and
manages a credit limit parameters.

 Note
When a B2B credit limit is assigned to more than one B2B unit, the credit limit is not shared between the B2B units. For example, if you assign a
$100,000 credit limit to unit A and unit B this means that the total value of the credit limits assigned is $200,000. Unit A has $100,000 and unit B
has $100,000.

De ning Account Managers for Units


To de ne unit account managers:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).


https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 16/118
1/9/2020
2. Navigate to B2B Commerce B2B Unit . The list of units appears.

3. Type the name or ID of the unit in the Search eld, and then click Search.

4. Click the unit you want to modify.

5. Click the Merchant Check tab, which displays the account managers or account manager groups already associated with the unit.

6. Select an account manager from the Account Manager eld. To change the existing entry, rst remove the entry by pointing at the entry and
clicking the X that appears to the right.

7. Select account manager groups from the Account Manager Groups list.

8. Click Save.

Displaying Credit Limits


To display credit limits:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Commerce B2B Unit . The list of units appears.

3. Type the ID of the credit limit in the Search eld, and then click Search.

4. Click the credit limit you want to display.

Creating a Credit Limit


To create a credit limit:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Commerce B2B Unit . The list of units appears.

3. Click the down arrow next to + B2B Merchant Check, click the arrow to the left of B2B Merchant Check, and then click B2B Credit Limit.

4. Specify the following required information.

Field Description

ID The ID of a credit limit. Note that a credit limit ID must be unique within
the system.

Currency The currency of a credit.

Amount The value of a credit to be assigned.

5. Click Done.

Creating a Credit Limit Alert


To create a credit limit:

1. Display a credit limit in the Backoffice Administration Cockpit.

2. In the General tab, in the Properties section, choose a type of alert from Alert Rate Type drop-down list. You can choose from either Currency
or Percentage options. The Currency type means that the alert is triggered after a certain value is achieved for Percentage type, the alarm is
triggered after certain percent value is achieved.

3. Type a value into the Alert Threshold eld.

4. Click Save.

Assigning a Credit Limit to a Unit


To assign a credit limit to a B2B unit:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Commerce B2B Unit . The list of units appears.

3. Type the name or ID of the unit in the Search eld, and then click Search.

4. Click the unit you want to modify.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 17/118
1/9/2020
5. Click the Merchant Check tab, which displays the currently assigned credit limit in the Credit Limit eld.

6. Select a credit limit from the Credit Limit eld. To change the existing credit limit, rst remove the entry by pointing at the entry and clicking
the X that appears to the right.

7. Click Save.

Editing a Credit Limit or Credit Limit Alert


To edit a credit limit or alert:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to B2B Commerce B2B Merchant Check . The list of credit limits appears.

3. Type the ID of the credit limit in the Search eld, and then click Search.

4. Click the credit limit you want to modify.

5. Modify the credit limit information.

6. Click Save.

B2BAdmin Interface
The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to manage all B2B-related options.

Figure: The B2BAdmin perspective and its main areas.

The B2BAdmin interface consists of the following main areas:

Navigation Area
The navigation area consists of a menu, a perspective chooser, a type selector, a history box, and an info box.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 18/118
1/9/2020

Navigation Area and UI Components

Menu
Use the Menu for the following:

Choosing the language in which screen texts, catalog names, product descriptions, and the like appear.

Choosing the user group.

Adjusting the user settings.

Logging out.

Perspective Chooser
The perspective chooser allows you to switch between the perspectives within the SAP Commerce Administration Cockpit.

Find information about how to enable perspectives for cockpits in Customizing the Admin Perspective, section Activating the Admin Perspective in
Cockpits.

Type Selector
Use the Type Selector for the following:

Searching for a speci c type from the SAP Commerce:

To switch between searching for name or code, click the Edit button and select from available options:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 19/118
1/9/2020

Displaying all system types in a tree view.

If you access the B2BAdmin perspective without sufficient rights, then types that are restricted for you are automatically grayed out.

The Type Selector can be customized in different ways. For details see Customizing the Admin Perspective.

History Box
The History box displays a list of up to 20 modi cation steps. Every entry represents a modi cation you have done in the course of the current
Administration Cockpit session. The list displays the earliest modi cation that has been done at the top of the list, while the bottom entry indicates
the latest modi cation.

Click an entry to undo the represented modi cation plus any others that were done chronologically after the modi cation step. For example, clicking
the Name entry in the screenshot undoes the modi cation done by the Name and all steps after that, LDAP Authenti cation and Allow unlocking of
pages from other users.

Undone modi cation steps are displayed with gray text. Click an undone entry in the list to redo the modi cation done in that entry and all
modi cations created before that entry. In this context redo means "undo for undo", that is, a change you have undone is redone.

You also can click the Undo and Redo buttons or use keyboard shortcuts Ctrl+Z for undoing and Ctrl+Y for redoing.

History Box Displaying a Sample Modification Sequence

As the modi cations you make are written to the database outright and the undo/redo history is kept with the SAP Commerce Administration
Cockpit session, you are not able to review modi cations other SAP Commerce Administration Cockpit users have done. For a modi cation history of
SAP Commerce items, see Item Attribute Modi cation History.

Info Box
The Info box displays how many work ow-based tasks are assigned to you and you are noti ed about the new comments. If you have tasks assigned,
clicking on the number brings up the task screen. Here, you can review your tasks and select an outcome for the tasks.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 20/118
1/9/2020

Related Information
Customizing the Admin Perspective
Admin Perspective
Validation Perspective
B2BAdmin Interface

Resetting Personalized Settings


Use the Reset personalized settings feature to reset personalized con guration of UI components.

Procedure
1. Navigate to Menu → User settings → Reset personalized settings.

2. Select a checkbox located next to the code of the chosen con guration.

You may also select the checkbox located next to the Code label to select all checkboxes.

3. Click the Done button to reset settings for selected component.

Browser Area
The Browser Area in the B2BAdmin perspective consists of tabs, a caption, a toolbar, and a main area

The Browser Area in the B2BAdmin perspective consists of these main UI components:

Tabs

Caption

Toolbar for customizing the main area.

Main Area displaying products.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 21/118
1/9/2020

Figure: The browser area and its UI components.

Tabs
Similar to the tabs of a web browser, you can use the tabs in the SAP Commerce Administration Cockpit to hold a certain view.

Click on a tab to display its view, while hiding the view of the currently active tab.

To create a new tab, do one of the following:

Click the Open new tab button in the top right corner of the browser area. A new tab with all items displays.

Right-click an opened tab and choose the New Tab option from the shortcut menu.

To close the tab, do one of the following:

Click the Close Browser button in the top right corner of the tab. The button is visible when you move the mouse pointer over the tab,
which you wish to close.

Right-click an opened tab and choose the Close Tab option from the shortcut menu.

Caption
The caption bar consists of a Content Browser and a Create new item button.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 22/118
1/9/2020

Content Browser
Use the content browser to enter a search string narrowing the number of displayed instances.

Only products that match the search string are displayed. Results are displayed on the active tab of the browser area.

Advanced Search
To access advanced search dialog, click Advanced Search button in the search input eld.

You can choose the type of the instance to be searched and decide on the sorting attribute and sorting order.

In the following input elds you can enter an instance Name and ID, select if it is default catalog in the system to narrow your search:

Use the Clear button to delete all you entered in the input elds.

Use the Edit button to add search criteria. They appear as additional input elds.

Select Sticky check box to make the Advanced Search options visible all the time. If you want to hide it, clear the Sticky check box.

Use the Close browser button to close the advanced search.

Figure: The advanced search dialog box.

Create New Item Button


In the top right hand side of the Browser area you can nd the Create new item button. Click it to create a new instance.

Figure: Example of the Create a new item dialog box.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 23/118
1/9/2020

Toolbar
The Toolbar enables you to customize the Main Area.

The Toolbar allows you to:

Switch from the default list view mode to the compare view mode or the grid view mode for selected instances, and conversely.

Compare the selected instances .

Comment the selected instances .

Run the Create organization wizard . Find information about how to use the wizard in Creating B2B Organizations with the Wizard.

Select the attribute of the instance to sort by.

Select the number of instances displayed per page.

Browse through pages.

Main Area
The main area provides different modes for viewing your products.

The main area displays products in different view modes:

List View mode

Grid View mode

Compare View mode

List View Mode


The list view is the default view mode. In the list view mode, instances are displayed in rows, while in columns you can see the different attributes
depending on a chosen type.

Figure: List view displaying sample items.

Grid View Mode


The grid view mode displays items in a grid of square boxes.

The grid view representation of instances includes different attributes depending on a type you wish to see.

Double-click an instance to open it in the editor area; for details see Editor Area.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 24/118
1/9/2020

Figure: Grid view displaying sample instances of Product type.

Compare View Mode


The Compare view for selected items mode enables to compare two or more items. To select items to be compared:

Switch to List view or Grid mode,

Hold the Ctrl key and click the items you want to compare.

The items which are being compared, are displayed in columns with their attributes listed in the editor area. One of the items serves as the reference
instance for the others. The reference instance has a gray header. To change the reference item click the Use this item as compare reference button
. To display only the attributes that are different, use the Show only different attributes button .

Figure: Example of two instances in the Compare view mode.

Related Information
B2BAdmin Interface

Editor Area
By double-clicking an instance representation in the browser area, you open the instance in the editor area. Here, you can edit data such as name,
article number, and description.

The editor area consists of the header at the top plus a number of sections.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 25/118
1/9/2020

Figure: The editor area and its UI components.

Header
The header shows the name of the currently chosen instance of a type.

Figure: Example of a header.

Sections
The Sections of the editor area display a number of attributes you can maintain. You can con gure the list of attributes to be displayed. Use the TAB
key to jump to the next attribute eld, and SHIFT + TAB to jump to the previous attribute eld.

See Also
Con guring the Editor Area

Customizing the Editor Area


To start customizing default view of the Editor area:

1. Right-click header of any section and select Customize from the shortcut menu.

2. Click the Edit option.

Moving a Section Using Drag-And-Drop Operation

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 26/118
1/9/2020

Moving an Attribute Using Drag-And-Drop Operation

Hiding a Displayed Attribute Field


1. Click the Edit link located in the section header of the attribute eld.

2. Click the X-shaped button.

3. After hiding selected attribute elds, again click the Edit link.

Showing a Hidden Attribute Field


1. Click the Edit link located in the section header of the attribute eld.

2. Click the link with the name of the attribute eld.

3. After showing hidden attribute eld, again click the Edit link.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 27/118
1/9/2020

Hiding a Section
1. Right-click the section header.

2. Select Hide Section.

Showing a Hidden Section


1. Right-click an empty space below sections.

2. Select Show Section and then:

Select All to show all the hidden sections

Select the name of the section that you want to show

Adding a New Section


1. Right-click an empty space below sections.

2. Select Add Section.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 28/118
1/9/2020

Renaming a Section
1. Right-click header of the section.

2. Select Rename Section.

3. An additional text box appears with the old name of the section. Type the new name of the section and press Enter.

Removing a Section
1. Right-click the header of the section.

2. Select Remove Section.

3. You are asked for a con rmation to remove the section. Con rm by clicking Yes.

Types of Attribute Fields


Find a description of all the available attribute elds in the Admin Perspective, section Types of Attribute Fields.

Creating B2B Organizations with the Wizard


The process of creating an organization within the SAP Commerce B2B Commerce is complex. You can create simple organization using the Create
organization wizard.

Organization created using this wizard consists of:


https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 29/118
1/9/2020
One unit with one account manager assigned (although you cannot create the account manager, it has to be already present in the system
before you start the wizard).

One administration account

One cost center

One budget

One credit limit

Assigned approval process

Such an organization may be a basis for setting more complex one, which is described in Working in the B2BAdmin Perspective.

1. To start the wizard, log in to the SAP Commerce Administration Cockpit and go to the B2BAdmin perspective tab:

2. Click the Create organization button located in the toolbar in the browser area.

3. De ne the basic data of the organization. The ID and Name text elds are mandatory. Click Next.

4. Provide the address information of the organization. All elds are mandatory. Click Next.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 30/118
1/9/2020
5. Create the administration account. All elds beside the Name are mandatory. Click Next. For information on how to create customer
accounts, read Creating and Managing Customers.

6. Select the Account Manager for the organization. This account has to be present in the system. For more information on how to create an
Account Manager user, refer to Creating and Managing Customers. Click Next.

7. De ne the cost center. All elds are mandatory. Click Next.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 31/118
1/9/2020

8. Create the budget. All elds are mandatory. Click Next.

9. De ne the credit limit. All elds are mandatory. Click Next.

10. Select the approval strategy. Click Next.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 32/118
1/9/2020

11. Review the information provided in previous steps and accept the organization by clicking the Done button.

Related Information
B2BAdmin Interface

Working in the B2BAdmin Perspective


The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to manage all the data connected to the B2B Commerce.

 Tip
B2BAdmin perspective of the SAP Commerce Administration Cockpit offers a wizard which guides you through all the steps necessary to set up a
basic B2B organization. Read more in Creating B2B Organizations with the Wizard.

Using the SAP Commerce Administration Cockpit for the First Time
Before you start working with the B2BAdmin perspective of the SAP Commerce Administration Cockpit, you should:

Have the working knowledge of the SAP Commerce Administration Cockpit.

Familiarize yourself with the layout and features behind the B2BAdmin perspective.

See Also
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 33/118
1/9/2020
The Administration Cockpit Perspectives

Admin Perspective

B2BAdmin Interface

Creating B2B Organizations with the Wizard

Starting the SAP Commerce Administration Cockpit

Context
To start the cockpit:

Procedure
1. Open an Internet browser.

2. Enter the URL of the SAP Commerce Commerce Cockpit in the browser's address bar. The default URL is http://localhost:9001/mcc.

If you are not already logged in, the SAP Commerce Commerce Cockpit Login appears.

3. Specify your user ID and password in the corresponding elds. The default user ID is admin. The default password is nimda.

4. Select the Language.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 34/118
1/9/2020
5. Click the Login button. The SAP Commerce Commerce Cockpit appears.

Mouse-over a cockpit name to display a short description of the cockpit.

6. If prompted, enter your login credentials (user ID and password) in the required elds and click the Login button.

The selected cockpit is displayed.

The SAP Commerce Administration Cockpit Menu


Once you have logged in, the default perspective for your selected cockpit is displayed. A menu is located in the upper left corner of the perspective.
From the menu, you can select the following:

Data Language: Choose the language in which the screen text should appear.

User Group: View to which user group your user account is assigned.

User Settings: Select which user settings you want to reset.

Logout: Log out of the current cockpit.

See Also
The Administration Cockpit Perspectives

Admin Perspective

B2BAdmin Interface

Opening the B2BAdmin Perspective


Click the B2BAdmin link in the perspective chooser bar:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 35/118
1/9/2020

Creating and Managing the Organization Structure


The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to create and manage the organization and units.

 Tip
B2BAdmin perspective of the SAP Commerce Administration Cockpit offers wizard which guides you through all the steps necessary to set up a
basic B2B organization. Read more in Creating B2B Organizations with the Wizard.

Each organization consists of units in a tree structure with one root node. A unit may represent a department, subcompany, or division within an
organization. In the SAP Commerce Administration Cockpit the root node is a unit with no parent unit. The root node has branches that have their
subbranches. Only an administrator in the B2BAdminGroup on the merchant side can create a parent unit.

The items in the SAP Commerce B2B Commerce Module, such as budgets, cost centers, and customers are associated with a unit and may also be
managed by customer-side administrators.

This diagram illustrates an example of three organizations within the B2B Commerce Module.

For more details on the tree structure, see B2B Units and Organization Tree.

Creating a Parent Unit


To create an organization, you have to create a parent unit. To create a parent unit:

1. Log into the SAP Commerce Administration Cockpit (http://localhost:9001/mcc).

2. Select the B2B Unit branch in the navigation area on the left-hand side:

3. Click the Create new item button in the top right corner of the browser area:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 36/118
1/9/2020

4. Provide the ID and Name of the unit and click the Done button:

 Note
Note that all elds are mandatory.

If you do not provide any of the required data, the system does not allow to save the unit.

This becomes the parent unit of your

organization.

 Note
In this tutorial we show how to create a parent unit and then, in the next steps, sample child units. Alternatively, you can create all units of an
organization at the very beginning and create the organizational structure afterwards. To do so, read the Adding a Child Unit section.

Creating a Child Unit


Once you created the organization parent unit, you can start creating child units to form the organization structure. The child units can be created
and managed by users who belong to the B2BManagerGroup. To create a child unit, perform the following steps:

1. Select the B2B Unit branch in the navigation area on the left-hand side:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 37/118
1/9/2020

2. The system displays all available items of this type in the system. Double-click the unit you want to be parent unit of your organization from
the list in the browser area:

3. The system opens the unit in the editor area. In the Organization section, click the Add Reference button:

4. The system opens the wizard. Click the B2B Unit option:

 Tip

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 38/118
1/9/2020
The wizard described in this step allows you not only to add child units but also instances of other SAP Commerce types, such as user
groups, customers, companies, and so on.

5. The system displays the next step of the wizard. Click the Create a new item option:

6. The system displays nal step of the wizard. Provide ID and Name of the unit and click the Done button.

 Tip
You can repeat the steps described in this section for each unit you need to create.

Adding a Child Unit


Sometimes you have already had all units present in your system, but you need to create a new organization structure. Then perform the following
steps:

1. Select the B2B Unit branch in the navigation area on the left-hand side:

2. The system displays all available items of this type in the system. Double-click the parent unit from the list in the browser area:
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 39/118
1/9/2020

3. The system opens the unit in the editor area. In the Organization section, click the Add Reference button:

4. The system opens the wizard. Click the B2B Unit option:

5. The system displays the next step of the wizard. Click the Select an existing reference option:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 40/118
1/9/2020

6. The system displays the next step of the wizard. In the top part of the windows you nd the search section, where you can search for the unit.
Select the unit you want to add and click the Done button:

7. The system displays the added unit in the Organization section under Child organization units:

Editing a Unit
After creating a unit, you can edit, change, and ll in all attributes of it. It enables you to set very detailed con guration options, which are unavailable
during the creation of a unit. To edit a unit, perform the following steps:

1. Select the B2B Unit branch in the navigation area on the left-hand side:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 41/118
1/9/2020

2. The system displays all available items of this type in the system. Double-click the unit you want to edit from the list in the browser area:

3. The system opens the editor area where you can set all the options. For more information, see B2BAdmin Interface, section Editor Area.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 42/118
1/9/2020

 Note
All changes to options are saved automatically.

4. In the sections of the editor area you can ll in the elds you are interested in. There is a table of unit sections below:

Section Description Examples of the elds in the section

General General options of a unit. Name, ID, active, role

Approvers Assigned approvers or approver groups. Approver, approver group

Organization Location of a unit within the organization. Child units, parent units, user groups

Addresses All the addresses available for a unit. Billing, shipping, contact, unloading,

Cost Center Financial options regarding the a unit. Associated cost center, budget, orders

Languages Language options for storefront interaction. Readable/writable languages

Merchant Check Options connected to the sales quotes and Account manager, account manager groups,
credit management processes. associated credit limits

Customer Prices Here you can set the individual pricing options. Price, tax and discount groups

Administration All other options.

Deactivating a Unit
Deactivating a unit means making a unit inactive without removing it from the system. Note, that if you deactivate a parent unit, all its descendant
associated items are also deactivated. Then automatically you block functionalities of the associated items, for example the customers can not log
on and make the orders. To revert it, you need to manually enable each of the units.

 Note
If you deactivate a parent unit, the system automatically deactivates its child units and all the associated items such as customers, cost centers,
and budgets. In this case you can not do any changes in child unit editor area until you activate the parent unit.

To deactivate a unit, perform the following steps:

1. Select the B2B Unit branch in the navigation area on the left-hand side:

2. The system displays all available items of this type in the system. Double-click the unit you want to disable from the list in the browser area:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 43/118
1/9/2020
3. Go to the Addresses section of the editor area on the right-hand side, and clear the Active check box:

 Tip
Instead of deactivating a unit, you may use the option of disabling it. To do so, click the Disable button in the top right corner of the
editor area.

 Note
All changes to options are saved automatically.

4. The system deactivates a unit and, if they exist, all its associated items.

 Note
To activate a unit you can choose the following options:

If you deactivated a unit and you are still logged on the system, click the Undo option in the History box on the left-hand side. Find more
information on History Box in B2BAdmin Interface, History Box section.

After logging off you can also activate a unit by selecting the Active check box in the editor area for the speci c item.

Related Information
B2B Units and Organization Tree
B2BAdmin Interface
Creating B2B Organizations with the Wizard

Creating and Managing Customers


The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to create and manage the customers and user groups within
your B2B organization.

Customers in the system are members of user groups. A new customer is added to the B2BCustomerGroup by default, which allows them to
purchase. Find more information on customers and user groups in B2B Customer and Customer Rights.

Creating a Customer
To create a customer in the B2BAdmin perspective of the SAP Commerce Administration Cockpit:

1. Select the B2B Customer branch in the navigation area on the left-hand side.

2. Click the Create new item button in the browser area caption bar.

3. Provide the ID, Name, Email, and Default B2B Unit of the customer and click Done.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 44/118
1/9/2020

 Tip
At this step you may select a unit that the customer belongs to or create a new one. To create a unit, click the Add unit button next to
the Default B2B Unit eld and follow the work ow described in Creating and Managing the Organization Structure, section Creating a
Child Unit from the third step.

The same pattern applies to the Groups section. Although in this case, refer to the Creating a User Group section.

 Note
The ID, Name, Email, and Default B2B Unit elds are mandatory. The Customer group in the Group option is set by default.

If you do not provide any of the required data, you can't save the customer.

4. The system saves the data and displays the list of all customers.

Editing a Customer
After creating a customer, you can edit, change, and ll in all attributes of it. It enables you to set very detailed con guration options, which are
unavailable during the creation of a customer. To edit a customer, perform the following steps:

1. Select the B2B Customer branch in the navigation area on the left-hand side. The system displays all available items of this type in the
system.

2. Double-click the customer you want to edit from the list in the browser area. The editor area where you can set all the option opens to the
right.

For more information, see B2BAdmin Interface, section Editor Area.

 Note
All changes to options are saved automatically.

3. In the sections of the editor area you can ll in the elds you are interested in:

Section Description Examples of the Fields in the Section

General General options of a unit. Name, ID, active, groups

Permissions Assigned permissions or permission groups. Permissions, permission groups

Addresses All the addresses available for a unit. Address, default payment, default shipment,
email addresses

Approvers This section contains information on approvers Approvers, approver groups


involved.

Password Options regarding the password protection. Password encoding, password, question and
answer, Backoffice login

Orders Options regarding customer orders. Orders, carts, payment info

Customer Prices Here you can set the individual pricing options. Price, tax and discount groups

Personalization Options for personalization. Personalization rules, readable catalog version,


writable catalog versions

Community Options for customer product reviews. Product reviews

Output documents

Administration All other options.

Deactivating a Customer
Deactivating customers means making an account inactive and inaccessible for users without removing it from the system.

 Note

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 45/118
1/9/2020
If the parent unit is deactivated, all the associated items are also deactivated. In this case you cannot do any changes in the customer editor area
until you activate the parent unit. Find information about deactivating parent unit in Creating and Managing the Organization Structure, section
Deactivating a Unit.

To deactivate a customer, perform the following steps:

1. Select the B2B Customer branch in the navigation area on the left-hand side. The system displays all available items of this type in the
browser area.

2. Double-click the customer you want to deactivate.

3. To deactivate a customer, go to the Basic section of the editor area on the right-hand side, and clear the Active check box:

 Tip
Instead of deactivating customers, you may use the option of inhibiting them from logging in, to do so, click the yes radio button label next
to the Login disabled eld in the Addresses section of the editor area.

 Note
All changes to options are saved automatically.

The system deactivates the customer.

 Note
You can activate a customer at any time. Select the Active check box in the editor area for chosen customer.

Creating a User Group


To create a user group in the B2BAdmin perspective of the SAP Commerce Administration Cockpit, perform the following steps:

1. Select the B2B User Group branch in the navigation area on the left-hand side.

2. Click the Create new item button in the browser area caption bar.

3. Provide the data of the customer and click the Done button.

 Tip
At this step you may select a unit that the customer belongs to or create a new one. To create a unit, click Add unit ( ) next to the Default
B2B Unit eld and follow the work ow described in Creating and Managing the Organization Structure, section Creating a Child Unit from
the third step. The same pattern applies to the Groups section.

 Note
Note that all elds are mandatory. If you do not provide any of the required data, you can't save the customer.

4.

The system saves the data and displays the list of all customers.

Editing a User Group


After creating a user group, you can edit, change, and ll in all attributes of it. It enables you to set very detailed con guration options, which are
unavailable during the creation of a user group. To edit a user group, perform the following steps:

1. Select the B2B User Group branch in the navigation area on the left-hand side. The system displays all available items of this type in the
system.

2. Double-click the user group you want to edit from the list in the browser area. The editor area where you can set all the option opens to the
right.

For more information, see B2BAdmin Interface, section Editor Area.

 Note
All changes to options are saved automatically.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 46/118
1/9/2020
3. In the sections of the editor area you can ll in the elds you are interested in:

Section Description Examples of the Fields in the Section

Basic Basic information on a user group. Name, ID, parent unit, permissions

Languages Language options for storefront interaction. Readable/writable languages

Customer Prices Here you can set the individual pricing options. Price, tax, and discount groups

Administration All other options.

Related Information
B2B Customer and Customer Rights
B2BAdmin Interface
Creating B2B Organizations with the Wizard

Creating and Managing Cost Centers


The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to create and manage the cost centers.

Cost centers are used for accounting purposes. You can manage the cost centers if you are the administrator. The cost centers are viewed by users of
the cost center management role. Orders or line items of an order are charged against a cost center. For each cost center, there are one or more
budgets associated with it. It might happen that the budget is associated to many cost centers then all orders within a single cost center need to be
approved. Each budget and each cost center have only one parent unit. The cost center and associated budget have the same parent unit and child
unit. Having the same parent unit is important in case of deactivating associated items such as cost centers.

To learn about deactivating units, see Creating and Managing the Organization Structure, section Deactivating a Unit.

For more information on budgets, read Creating and Managing Budgets.

For a more technical approach, refer to B2B Budgets and Cost Centers.

Creating a Cost Center


To create a cost center in the B2BAdmin perspective of the SAP Commerce Administration Cockpit, perform the following steps:

1. Select the B2B Cost Center branch in the navigation area on the left-hand side:

2. Click the Create new item button in the browser area caption bar:

3. Provide the Parent B2B Unit, Currency, and ID. Click the Done button:

 Tip
At this step you may select a Parent B2B Unit and currency of the cost center or create new items. To create an item, click the Create/Add
Item button . In case of Parent B2B Unit follow the work ow described in the Creating and Managing the Organization Structure, section
Creating a Child Unit from the fth step. The same pattern applies to the currency eld, although in this case the symbol and ISO code
elds in the nal wizard are mandatory.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 47/118
1/9/2020

 Note
Note that all elds are mandatory.

If you do not provide any of the required data, the system does not allow to save the cost center.

4. In the Main area you can nd newly created cost center which is highlighted by default:

Editing a Cost Center


After creating a cost center, you can edit, change, and ll in all attributes of it. By editing the cost center you can set very detailed con guration
options, which are unavailable during the creation of a cost center. To edit a cost center, perform the following steps:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 48/118
1/9/2020
1. Select the B2B Cost Center branch in the navigation area on the left-hand side:

2. In the main area double-click the cost center you want to edit. The system opens the editor area where you can set all the options:

 Note
All changes to options are saved automatically.

3. In the editor area you can ll in the elds you are interested in. There is a table of common elds below:

Field Description

Parent B2B Unit Choose a name of the parent unit.

ID Provide the ID of the cost center. Note that a B2B Cost Center ID must be
unique within the system.

Currency Select currency of the budget from the list.

Name Provide the name of the B2B Cost Center.

Active Information whether the B2B Cost Center is active or not.

B2B Budgets Associated budgets with the B2B Cost Center.

Type Type of the editing item. The B2B Cost Center here.

See Also
B2BAdmin Interface, section Editor Area

Deactivating a Cost Center


Deactivating a cost center means that you want to make an entry inactive and inaccessible in the system. In this case the user is not able to check
out any order against this cost center. Although a cost center entry still exists in the system.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 49/118
1/9/2020

 Note
If the parent unit is deactivated, all the associated items are also deactivated. In this case you can not do any changes in the cost center editor
area until you activate the parent unit. Find information about deactivating parent unit in Creating and Managing the Organization Structure,
section Deactivating a Unit.

To deactivate a cost center, perform the steps:

1. Select the B2B Cost Center branch in the navigation area on the left-hand side:

2. Double-click the selected cost center in the main area.

3. Go to the Basic section of the editor area on the right-hand side, and clear the Active check box:

 Tip
Instead of deactivating a cost center, you may use the option of disabling it. To do so, click the Disable button in the top right corner of
the editor area.

 Note
All changes to options are saved automatically.

4. The system deactivates the cost center.

 Note
You can activate a cost center at any time. Select the Active check box in the editor area for the chosen cost center.

Related Information
B2B Budgets and Cost Centers
B2B Orders
B2BAdmin Interface
Creating B2B Organizations with the Wizard

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 50/118
1/9/2020

Creating and Managing Budgets


The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to create and manage the budgets

Budgets help the managers to monitor their spendings. Budgets are associated with cost centers. You can manage budgets if you are the
administrator. Budgets can be viewed by users who belong to the B2BManagerGroup. Budgets are associated with the cost centers. Each budget
and each cost center have only one parent unit. The cost center and associated budget have the same parent unit and child unit. Having the same
parent unit is important in case of deactivating associated items such as budgets. It is also recommended that the cost center and the associated
budget have the same currency.

To learn about deactivating units, see Creating and Managing the Organization Structure, section Deactivating a Unit.

For more technical approach, refer to B2B Budgets and Cost Centers.

Creating a Budget
To create a budget in the B2BAdmin perspective of the SAP Commerce Administration Cockpit, perform the following steps:

1. Select the B2B Budget branch in the navigation area on the left-hand side:

2. Click the Create new item button in the browser area caption bar:

3. Provide the Parent B2B Unit, ID, Budget, Date Range, and Currency. Click the Done button:

 Tip
At this step you may select a Parent B2B Unit and currency of the budget or create new items. To create an item, click the Create/Add
Item button . In case of Parent B2B Unit follow the work ow described in Creating and Managing the Organization Structure, section
Creating a Child Unit from the fth step. The same pattern applies to the currency eld, although in this case the symbol and ISO code
elds in the nal wizard are mandatory.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 51/118
1/9/2020

 Note
Note that all elds besides Name are mandatory.

If you do not provide any of the required data, the system does not allow to save the budget.

4. In the Main area you can nd newly created cost center which is highlighted by default:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 52/118
1/9/2020
Editing a Budget
After creating a budget, you can edit, change, and ll in all attributes of it. By editing the budget you can set very detailed con guration options,
which are unavailable during the creation of a budget. To edit a budget, perform the following steps:

1. Select the B2B Budget branch in the navigation area on the left-hand side:

2. In the main area double-click the budget you want to edit. The system opens the editor area where you can set all the options:

 Note
All changes to options are saved automatically.

3. In the editor area you can ll in the elds you are interested in. There is a table of common elds below:

Field Description

Parent B2B Unit Choose a name of the parent unit.

ID Provide the ID of the budget. Note that a B2B Budget ID must be unique
within the system.

Budget Provide the value of the budget limit.

Date Range Set date ranges for the budget.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 53/118
1/9/2020

Field Description

Currency Select currency of the budget from the list.

Name Provide the name of the budget.

Active Information whether the B2B Budget is active or not.

B2B Cost Center The B2B Cost Center associates with the budget.

Type Type of the editing item. The B2B Budget here.

See Also
B2BAdmin Interface, section Editor Area

Deactivating a Budget
Deactivating a budget means that you want to make an entry inactive and inaccessible in the system. In this case you are not able to check out any
order against this budget. Although a budget entry still exists in the system.

 Note
If the parent unit is deactivated, all the associated items are also deactivated. In this case you can not do any changes in the budget editor area
until you activate the parent unit. Find information about deactivating parent unit in Creating and Managing the Organization Structure, section
Deactivating a Unit.

To deactivate a budget, perform the steps:

1. Select the B2B Budget branch in the navigation area on the left-hand side:

2. Double-click the selected budget in the main area.

3. Go to the Basic section of the editor area on the right-hand side, and clear the Active check box:

 Tip
Instead of deactivating a budget, you may use the option of disabling it. To do so, click the Disable button in the top right corner of the
editor area.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 54/118
1/9/2020

 Note
All changes to options are saved automatically.

4. The system deactivates the budget.

 Note
You can activate a budget at any time. Select the Active check box in the editor area for chosen budget.

Related Information
B2B Budgets and Cost Centers
B2BAdmin Interface
Creating B2B Organizations with the Wizard

Creating and Managing the Credit Limits


The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to create and manage the credit limits.

A credit limit is de ned as the maximum amount of credit an administrator can assign to a customer. An administrator can determine many credit
limits to one unit. Additionally, an administrator can set the alert which is triggered when the customer overdraws the credit threshold.

Creating a Credit Limit


To create a credit limit in the B2BAdmin perspective of the SAP Commerce Administration Cockpit, perform the following steps:

1. Navigate to the B2B Merchant Check B2B Credit Limit branch in the navigation area on the left-hand side:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 55/118
1/9/2020

2. Click the Create new item button in the browser area caption bar:

3. Provide the ID, Currency and Amount. In case of Date Period and Date Range only one of these elds is mandatory. Click the Done button:

 Tip
At this step you may select currency of the credit limit or create new item. To create an item, click the Create/Add Item button . In the
nal wizard the name and ISO code elds are mandatory.

 Note
Note that ID, Currency, and Amount elds are mandatory. The value in the Amount eld has to be set greater than 0. The Date Period and
Date Range are commutable, but you have to ll in one of these elds.

If you do not provide any of the required data, the system does not allow to save the credit limit.

4. In the Main area you can nd newly created cost center which is highlighted by default:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 56/118
1/9/2020

Editing a Credit Limit


After creating a credit limit, you can edit, change, and ll in all attributes of it. By editing a credit limit you can set very detailed con guration options,
which are unavailable during the creation of a credit limit. To edit a credit limit, perform the following steps:

1. Navigate to the B2B Merchant Check B2B Credit Limit branch in the navigation area on the left-hand side:

2. In the main area double-click the credit limit you want to edit. The system opens the editor area where you can set all the options:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 57/118
1/9/2020

 Note
All changes to options are saved automatically.

3. In the editor area you can ll in the elds you are interested in. There is a table of common elds below:

Field Description

ID Provide the ID of a credit limit. Note that a B2B Credit Limit ID must be
unique within the system.

Amount Provide the amount of the credit limit.

Currency Select currency of the credit limit from the list.

B2B Unit Choose a name of the unit which is assigned with the credit limit.

Date Period/Date Range Set the period for the credit limit./Set date ranges for the credit limit.

Alert Threshold Provide the value of the threshold which overdrawing causes an alert.

Alert Rate Type Provide the percentage or currency value of the threshold which
overdrawing causes an alert.

Active Information whether the B2B Credit Limit is active or not.

Type Type of the editing item. The B2B Credit Limit here.

For more information, see B2BAdmin Interface, section Editor Area.

Assigning a Credit Limit to a Unit


To provide a credit limit you need to assign it with the unit. An administrator can assign the credit limit to more than one unit, however the amount of
the credit limit is conducted separately for each unit.

1. Open the credit limit in the editor area as described in Editing a Credit Limit section above.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 58/118
1/9/2020
2. Fill in the B2B Unit eld:

 Tip
At this step you may select currency of the credit limit or create new item. To create an item, click the Create/Add Item button and
follow the work ow described in Creating and Managing the Organization Structure, section Creating a Child Unit from the fth step.

Deactivating a Credit Limit


Deactivating a credit limit means that you want to make an entry inactive and inaccessible in the system. In this case a customer is not able to check
out any order against this credit limit. Although a credit limit entry still exists in the system.

To deactivate a credit limit, perform the steps:

1. Navigate to the B2B Merchant Check B2B Credit Limit branch in the navigation area on the left-hand side:

2. Double-click the selected credit limit in the main area.

3. Go to the Basic section of the editor area on the right-hand side, and clear the Active check box:

 Tip

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 59/118
1/9/2020
Instead of deactivating a budget, you may use the option of disabling it. To do so, click the Disable button in the top right corner of the
editor area.

 Note
All changes to options are saved automatically.

4. The system deactivates the credit limit.

 Note
You can activate a credit limit at any time. Select the Active check box in the editor area for chosen credit limit.

Setting a Credit Limit Alert


You may need to set a credit limit alert as a useful tool in your B2B commerce management. After setting a credit limit alert a noti cation in the Inbox
appears every time the alert threshold is exceeded. To do so, perform the following steps:

1. Open the credit limit in the editor area as described in Editing a Credit Limit section above.

2. Choose Alert Rate Type from drop-down list. You can choose currency or percentage options. The currency type means that the alert is
triggered after a certain value is achieved. For percentage type, the alarm is triggered after certain percent value is achieved.

3. Set the value of the credit threshold in the Alert Threshold eld:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 60/118
1/9/2020

Related Information
B2BAdmin Interface
Creating B2B Organizations with the Wizard

Managing the Customized Prices


The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to manage the customized prices.

The merchants and customers may want to establish prices depending on the current circumstances. Even for the same organization an
administrator can have customer-speci c prices. To set up the customized prices an administrator can assign the prices within a single parent unit,
customer or user group. While determining the prices per article an administrator can de ne also the tax and discount group.

Setting up the Customer Prices


You can set up the customer prices for a unit, customer, and user group. To do so, you need to go directly to the section of the appropriate branch
item. To customize the prices in the B2BAdmin perspective of the SAP Commerce Administration Cockpit, perform the following steps:

 Note
All changes to options are saved automatically.

1. Navigate to the correct branch in the navigation area on the left-hand side.

2. In the browser area double-click the item you want to edit. The system opens the editor area.

3. In the editor area go to the Customer Prices section. From the drop-down lists select Price Group, Tax Group, and Discount Group.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 61/118
1/9/2020

 Note
In case of the B2B Customer branch you can set also the Global Discount Rows. Provide the option in the eld:

At this step you may select currency of the

credit limit or create a new item. To create an item, click the Create/Add Item button . In the nal step of the wizard the discount eld is
mandatory.

Related Information
B2B Price, Product and Catalog Management
B2BAdmin Interface
Creating B2B Organizations with the Wizard

Ordering
The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to manage the order work ow.

Customers make their orders in the B2B storefront, but in some cases, an administrator may need to apply some changes. In the SAP Commerce
Administration Cockpit an administrator can edit orders and save changes.

Editing an Order
After a customer creates an order in the B2B storefront, an administrator can edit, change, and ll in all attributes of it.

To edit an order:

1. Log into the SAP Commerce Administration Cockpit and select the B2BAdmin perspective.

2. Select the Order branch in the navigation area on the left-hand side:

3. In the main area, double-click the order you want to edit. The system opens the editor area where you can set all the options:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 62/118
1/9/2020

 Note
All changes to options are saved automatically.

4. In the editor area you can ll in the elds you are interested in:

You can de ne whether the Discounts Include Delivery Costs or not:

You can decide if the price is negotiated by the customer:

You can declare whether the Discounts Include Payment Costs or not:

You can recalculate the order by clicking the Recalculate order button .

Additional elds on the form include:

Order No.: Provide a unique number for the order.

User: Provide the name of the user type.

Currency: Provide the currency of the order.

B2B Comment: Provide a comment for the order. You can also choose existing items.

Related Information
B2B Orders
Working with Orders
B2BAdmin Interface
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 63/118
1/9/2020
Creating B2B Organizations with the Wizard

Managing the Permissions


The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to manage the permission work ow.

The permissions in the SAP Commerce Administration Cockpit is a useful tool in accepting the customers orders. Within them the users of the
approve management role can accept or not orders have been made, also under the speci ed circumstances. If the order is less than the particular
nancial threshold, it is automatically approved. The administrator can de ne the threshold as the Allowed Order Threshold. The threshold can be
determined by constituting the value and alternatively time range. If the order exceeds the permission, the order is placed in a pending approval
state. In this case the approval process is triggered and needs the B2B 2-Pair-of-Eyes Approval Process Permission A and B by users of the approve
management role. When it happens that the budget is exceeded the customer needs to get the B2B Budget Exceeded Permission.

 Note
The B2B 2-Pair-of-Eyes Approval Process Permission A and B as well as the B2B Budget Exceeded Permission are called a common name of the
permission in the following paragraphs below.

Creating the Permission


To create a permission item in the B2BAdmin perspective of the SAP Commerce Administration Cockpit, perform the following steps:

1. Go to the B2B Permission branch and click one of the intended permission in the navigation area on the left-hand side:

2. Click the Create new item button in the browser area caption bar:

3. Provide the ID and Parent B2B Unit. Click the Done button:

 Tip
At this step you may select a Parent B2B Unit of the permission or create new items. To create an item, click the Create/Add Item button
and follow the work ow described in the Creating and Managing the Organization Structure, section Creating a Child Unit from the fth
step.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 64/118
1/9/2020

 Note
Note that all elds are mandatory.

If you do not provide any of the required data, the system does not allow to save the permission.

4. In the main area you can nd newly created permission which is highlighted by default.

Editing the Permission


After creating a permission item, you can edit, change, and ll in all attributes of it. By editing the permission you can set very detailed con guration
options, which are unavailable during the creation of a permission. To edit a permission, perform the following steps:

1. Go to the B2B Permission branch and click one of the intended permission in the navigation area on the left-hand side:

2. In the main area double-click the permission you want to edit. The system opens the editor area where you can set all the options.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 65/118
1/9/2020

 Note
All changes to options are saved automatically.

3. In the editor area you can ll in the elds you are interested in. There is a table of common elds below:

In case of the B2B 2-Pair-of-Eyes Approval Process Permission (A or B):

Field Description

ID Provide the ID of a B2B 2-Pair-of-Eyes Approval Process Permission.


Note that a B2B 2-Pair-of-Eyes Approval Process Permission ID must
be unique within the system.

Parent B2B Unit Choose a name of the parent unit which is assigned with the B2B 2-
Pair-of-Eyes Approval Process Permission.

B2B Groups The B2B Groups assign to the B2B 2-Pair-of-Eyes Approval Process
Permission.

Active Information whether the B2B 2-Pair-of-Eyes Approval Process


Permission is active or not.

Type Type of the editing item. The B2B 2-Pair-of-Eyes Approval Process
Permission (A or B) here.

In case of the B2B Budget Exceeded Permission:

Field Description

ID Provide the ID of a B2B Budget Exceeded Permission. Note that a B2B


Budget Exceeded Permission ID must be unique within the system.

Parent B2B Unit Choose a name of the parent unit which is assigned with the B2B
Budget Exceeded Permission.

B2B Groups The B2B Groups assign to the B2B Budget Exceeded Permission.

Customers The Customers assign to the B2B Budget Exceeded Permission.

Active Information whether the B2B Budget Exceeded Permission is active or


not.

Type Type of the editing item. The B2B Budget Exceeded Permission here.

See Also
B2BAdmin Interface, section Editor Area

Deactivating the Permission


Deactivating a permission means that you want to make an entry inactive and inaccessible in the system. In this case you are not able to make any
order against until the administrator activates the item. Although a permission entry still exists in the system.

To deactivate a permission, perform the steps:

1. Go to the B2B Permission branch and click one of the intended permission in the navigation area on the left-hand side:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 66/118
1/9/2020

2. Double-click the selected permission in the main area.

3. Go to the Basic section of the editor area on the right-hand side, and clear the Active check box:

 Tip
Instead of deactivating a permission, you may use the option of disabling it. To do so, click the Disable button in the top right corner of
the editor area.

 Note
All changes to options are saved automatically.

4. The system deactivates the permission.

 Note
You can activate a permission at any time. Select the Active check box in the editor area for chosen permission.

Managing the Order Threshold


Instead of approving the orders every time they are made you can set the nancial threshold below which the orders are approved automatically. To
do so, create the Allowed Order Threshold entry with the established point above which the permission is triggered.

 Note
While you are going to the navigation area, you can choose the B2B Allowed Order Threshold (per order) items or more speci ed option: the B2B
Allowed Order Threshold (per timespan).

Creating the Order Threshold


To create an order threshold in the B2BAdmin perspective of the SAP Commerce Administration Cockpit, perform the following steps:

1. Navigate to the B2B Permission Allowed Order Threshold (per order) branch in the navigation area on the left-hand side:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 67/118
1/9/2020

2. Click the Create new item button in the browser area caption bar:

3. Select the Allowed Order Threshold (per order) or Allowed Order Threshold (per timespan) option:

4. Provide the Currency, ID, Parent B2B Unit, and Threshold. In case of Allowed Order Threshold (per timespan) additionally choose the Range
from the drop-down list. Click the Done button.

 Tip
At this step you may select a Parent B2B Unit and currency of the order threshold or create new items. To create an item, click the
Create/Add Item button . In case of Parent B2B Unit follow the work ow described in Creating and Managing the Organization

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 68/118
1/9/2020
Structure, section Creating a Child Unit from the fth step. The same pattern applies to the currency eld, although in this case the symbol
and ISO code elds in the nal wizard are mandatory.

 Note
Note that all elds are mandatory.

If you do not provide any of the required data, the system does not allow to save the order threshold.

5. In the main area you can nd newly created permission which is highlighted by default.

Editing the Order Threshold


After creating a B2B Allowed Order Threshold, you can edit, change, and ll in all attributes of it. By editing the B2B Allowed Order Threshold you can
set very detailed con guration options, which are unavailable during the creation of a B2B Allowed Order Threshold.

To edit a B2B Allowed Order Threshold, perform the following steps:

1. Navigate to the B2B Permission Allowed Order Threshold (per order) or (per timespan) branch in the navigation area on the left-hand side:

2. In the main area double-click the B2B Allowed Order Threshold you want to edit. The system opens the editor area where you can set all the
options:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 69/118
1/9/2020

 Note
All changes to options are saved automatically.

3. In the editor area you can ll in the elds you are interested in. There is a table of common elds below:

Field Description

Parent B2B Unit Choose a name of the parent unit which is assigned with the B2B Allowed
Order Threshold.

ID Provide the ID of a B2B Allowed Order Threshold. Note that a B2B Allowed
Order Threshold ID must be unique within the system.

Active Information whether the B2B Allowed Order Threshold is active or not.

Threshold Provide the value of the threshold of the B2B Allowed Order Threshold.

Range Select ranges for the B2B Allowed Order Threshold.

Currency Provide currency of the B2B Allowed Order Threshold.

Customer The B2B Customers assign to the B2B Allowed Order Threshold.

B2B Groups The B2B Groups assign to the B2B Allowed Order Threshold.

Type Type of the editing item. The B2B Allowed Order Threshold here.

See Also
B2BAdmin Interface, section Editor Area

Deactivating the Order Threshold

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 70/118
1/9/2020
Deactivating an order threshold means that you want to make an entry inactive and inaccessible in the system. In this case you are not able to make
any order against until the administrator activates the item. Although an order threshold entry still exists in the system.

To deactivate an order threshold, perform the steps:

1. Navigate to the B2B PermissionAllowed Order Threshold (per order) or (per timespan) branch in the navigation area on the left-hand side:

2. Double-click the selected order threshold in the main area.

3. Go to the Basic section of the editor area on the right-hand side, and clear the Active check box:

 Tip
Instead of deactivating an order threshold, you may use the option of disabling it. To do so, click the Disable button in the top right
corner of the editor area.

 Note
All changes to options are saved automatically.

4. The system deactivates the order threshold.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 71/118
1/9/2020

 Note
You can activate an order threshold at any time. Select the Active check box in the editor area for chosen order threshold.

Reporting and Products Visibility


The B2BAdmin perspective lets you maintain reporting and visibility.

The B2BAdmin perspective of the SAP Commerce Administration Cockpit enables you to maintain the reporting and products visibility options.

Reporting
The administrator can manage and see the report status. However report management is accessible only from the SAP Commerce Report Cockpit
level. Depending on the user privileges you can view reports in the B2B storefront.

To con gure report settings you need to use reporting widgets in the Report Cockpit:

For details see Report Cockpit and Widgets Reference.

For a technical approach refer to Building Custom Reports.

Managing the Products Visibility


In the e-commerce business the administrator can limit the access of certain product groups for some user groups. The administrator can create
product catalogs for various B2B customers.

 Note
To restrict the visibility of a product group you need to use the Backoffice Administration Cockpit. You can nd more information in Setting
Product Visibility.

Related Information
Report Cockpit
Widgets Reference
Building Custom Reports
Product Content and Catalog Module
B2B Price, Product and Catalog Management
B2BAdmin Interface
Creating B2B Organizations with the Wizard

B2B Multi-Dimensional Products


Learn about multi-dimensional products and their creation using the Backoffice Administration Cockpit.

Introduction
Multi-dimensional products are described using multiple attributes. You can de ne the dimensions and attributes needed to describe the product.
Out of the box, the B2B Commerce Accelerator includes three dimensions. You could use one, two, or three dimensions to describe your product
under this model. For example, a shirt has the following dimensions and attributes:

Color: black

Size: medium

Fit: tall

Order forms displaying the product attributes are used to add multiple products to the cart at the same time.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 72/118
1/9/2020
This graphic below shows how the VariantCategory dimensions color, size, and t are used to describe the different characteristics of a product.
You can also see how the VariantValueCategory attributes describe the color of the product, such as black, white, and red.

This table contains descriptions for the elements included in the graphic.

Name Description

Product A Shirt is the base product. Nothing describes the shirt; not size, color, or t.

GenericVariantProduct A GenericVariantProduct describes a product with at least one


VariantValue attribute.

SuperCategory A SuperCategory is a root category, which has subordinate categorys.


These subordinate categorys share something in common with each other
regarding the supercategory.

VariantCategory A VariantCategory is equivalent to one of the dimensions, such as size,


color, or t.

VariantValueCategory A VariantValueCategory is an attribute of a dimension, such as red,


green, large, small, narrow, or wide.

Adding Multi-Dimensional Products to the Cart


Because a multi-dimensional product actually corresponds to many similar products, users must specify the product's variants when adding to the
cart, as shown in the following example from B2B Accelerator.

The B2B Accelerator also provides an example implementation of how a customer could order multiple variants at once. For more information, see
B2B Saved Order Forms.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 73/118
1/9/2020
Building a Variant Product through Categorization
To create multi-dimensional products, it is important to rst create the variant category, then the required variant value categories, and then nally
create the products. Refer to these topics for more details:

1. Creating Variant Categories

2. Creating Variant Value Categories

3. Creating Multi-Dimensional Products

Related Information
Modeling Product Variants
Styles and Size Variants in the SAP Commerce Product Cockpit
Catalog Guide

Creating Variant Categories


A variant category describes a dimension of a product, such as color or size. A maximum of three variant categories are available. By default, these
are set to color, size, and t. You can modify the variant categories to represent other values, such as weight, length, nish, experience, and so on.

Creating a Variant Category


1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Go to Catalog Categories . The list of categories appears.

3. Click the down arrow next to the + icon, click the arrow to the left of Category, and then click Variant Category.

4. Specify a unique ID in the Identi er eld.

5. From the Catalog Version drop-down menu, select the Catalog Version.

6. Click Done.

Modifying the Variant Category you created


1. Display the VariantCategory you just created.

2. Click the General tab.

3. Type a name to the variant category. Adding a name helps when searching for the variant category later.

4. In the Category Visibility section, add the users who can view the variant category.

5. In the Description section, type a description for the VariantCategory.

6. Click Save.

Assigning a Super Category


1. De ne a second VariantCategory.

2. Display one of the VariantCategory items you created.

3. Click the Category Structure tab.

4. In the Supercategories area, add a supercategory. This chains the two together. In the example below, you can see a chain of three categories.
Color is the rst in the chain, Fit is the second, and Size is the third. Fit is the SuperCategory for Size.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 74/118
1/9/2020

5. Click Save.

Related Information
Modeling Product Variants
Styles and Size Variants in the SAP Commerce Product Cockpit

Creating Variant Value Categories


Product variant categories de ne the product variants, such as size or color. Once a variant category is de ned, you must create the values for each
category (for example, large or blue).

A VariantValueCategory describes an attribute of a VariantCategory. If the VariantCategory covers the product attribute color, the
product can be offered in many different colors. Each VariantValueCategory is equivalent to one color of the product. Values for
VariantValueCategory can be de ned in the Backoffice Administration Cockpit.

To create a VariantValueCategory:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. Navigate to Catalog Categories . The list of categories appears.

3. Click the down arrow next to + Category, click the arrow to the left of Category, and then click Variant Value Category.

4. From the Catalog Version drop-down menu, select the Catalog Version.

5. Specify a unique ID in the Identi er eld.

6. Click Done.

7. Display the VariantValueCategory you just created.

8. Click the General tab. In the Category Visibility section, add the users who can view the variant value category. In the Description section,
type a description for the VariantValueCategory.

9. Click the Category Structure tab. In the Supercategories section, add a supercategory for the VariantValueCategory you are creating (color
for example).

10. Click the Variant tab. In the Attributes area, type a value in the Sequence eld. Valid values are greater than or equal to zero. Each
VariantValueCategory has a unique Sequence attribute, and this attribute value stays the same through the life of the product. The
Sequence attribute describes the order in which the VariantCategory colors are de ned.

11. Click Save.

Related Information
Modeling Product Variants
Styles and Size Variants in the SAP Commerce Product Cockpit

Creating Multi-Dimensional Products


Multi-dimensional products represent variations of a base product and are offered in multiple unique combinations of these dimensions. A multi-
dimensional stock keeping unit is composed of a de ned variant category and variant value category, and is created in the Backoffice Administration
Cockpit.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 75/118
1/9/2020
Multi-dimensional products are de ned by one or more VariantCategory, and each variant category has one or more
VariantValueCategory. For example, shoes can have variant categories for size, color, and width, and have variant value categories for the
different available colors. The required VariantCategory and VariantValueCategory must be de ned before creating a multi-dimensional
product. For more information, see Creating Variant Categories and Creating Variant Value Categories.

There are three main steps for creating multi-dimensional products:

Create a base product

Allow variants on the base product

Add variant products to the base product

Creating a Multi-Dimensional Base Product


The rst step in creating a multi-dimensional product is to create a base product. The base product de nes in which category its variants are
available in the storefront, as well as the variant category used by its variants.

To create a base product:

1. Log into the Backoffice Administration Cockpit (https://localhost:9002/backoffice).

2. In the navigation bar, click Catalog Products .

3. Click the + icon in the tool bar to open the Create New Product wizard.

4. In the Essentials tab, enter a unique Article Number, Approval Type (approved), Catalog Version, and then click Next

5. In the Description tab, enter the product's Identi er and Description, and then click Next.

6. In the Categorization tab, select a super category. Note that two different super categories are set in this eld:

The catalog category where the product is found in the storefront, such as a brand category or product category

The variant category for multi-dimensional products, such as color or size

Color, Fit, and Size are available out-of-the-box. If adding these super categories, ensure that they match the catalog version of the product.

7. Click Done.

Allow Variants on Base Product


The next step is to con gure your base product to allow for variant products:

1. In the Backoffice Administration Cockpit navigation bar, navigate to Catalog Products , search for the base product you just created, and then
click that product.

2. In the Variants tab, select Generic Variant Product in the Product variants type eld.

3. In the Price tab, click Create new Price Row, and then add a Unit, a Price, and a Currency. Click Done when you are nished.

4. In the Multimedia tab, add an Image.

5. In the Extended Attributes tab, add an EAN.

6. Click Save.

Adding Variant Products to the Multi-Dimensional Base Product


The last step is to add the variant products to the base product. The variant products are the stock keeping units that customers can buy in the
storefront.

To create the variant products:

1. In the Backoffice Administration Cockpit navigation bar, navigate to Catalog Products .

2. Create a new Generic Product Variant:

Click the down arrow next to the + icon in the tool bar.

Click the arrow to the left of Product.

Click the arrow to the left of Variant Product.

Click Generic Product Variant.

3. In the Essentials tab, enter the unique article number, approval type, catalog version, and base product, and then click Next. Ensure that:
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 76/118
1/9/2020
The Base Product eld to the multi-dimensional base product you just created.

The same catalog version is used.

4. In the Description tab, enter the product's identi er and description, and then click Next.

5. In the Categorization tab, select the variant value category. This de nes the actual value of the variant for the product, such as brown.

6. Click Done.

7. Repeat the procedure for any other variants of the base product.

Related Information
Modeling Product Variants
Styles and Size Variants in the SAP Commerce Product Cockpit

b2bapprovalprocess Extension
The b2bapprovalprocess extension provides two example approval processes and permissions with sample code in the source code. They can
be used and referenced as a guideline for custom implementations, or as a starting set to be extended, or to deliver detailed information on
implementation details that are beyond the scope of the technical documentation.

 Note
An SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure to limit your
implementation to the features de ned in your contract license. In case of doubt, please contact your sales representative.

A business process describes a sequence of connected steps. To manage a process automatically or manually you need to identify and de ne it. This
document provides an example of how to create such a process in scope of order management. The business process is modeled as a owchart with
loops and parallel paths joining a number of actions.

Find information on how to create an order approval process using the Backoffice Administration Cockpit in Managing Order Permissions in
Backoffice.

For more information on work ow refer to Work ow Overview.

De nition of the Order Approval Process


To de ne an order approval process you need to know how the process looks like and what steps are necessary to complete it. This also includes the
actions to take in case an error occurs during the process.

An example order approval process is de ned in the b2bapprovalprocess extension in an XML format. It de nes the process an order goes
through within a B2B scenario to get ful lled by being approved or becomes eligible for resubmission if rejected by an approver.

There are two approval processes provided by the extension: Simple Approval process and Two Pair Of Eyes.

This diagram illustrates the Simple Approval process.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 77/118
1/9/2020

This diagram illustrates the Two Pair of Eyes Approval process.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 78/118
1/9/2020

Placing an Order

When an order is created in the SAP Commerce system by a user, who is of type B2BCustomer, a B2BOrderApproval process is triggered.

The process is responsible for veri cation if the order can go to the warehouse for ful llment. The user permissions are checked and if all are
satis ed, the order is approved automatically. The b2bapprovalprocess extension comes with two sets of default permissions. The rst set of
permission are used with the Simple Order Approval process. They are:

B2BOrderThresholdPermission

B2BOrderThresholdTimespanPermission

B2BBudgetExceededPermission.

The second set of default permissions is used with the Two Pair of Eyes Approval process. They are:

B2B2POEPermissionA

B2B2POEPermissionB

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 79/118
1/9/2020
On the other hand, a user may not ful ll all the necessary requirements and their order goes into an approval work ow. This diagram illustrates a
default B2BOrderApproval process.

Finding an Approver

The diagram below presents in details the algorithm used for nding an approver. The algorithm is a crucial part of the ndApprovers element.

De ning a Process

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 80/118
1/9/2020
The rst step in the process creation is to de ne it in the b2borderapproval.xml le, which you can nd in the <HYBRIS_BIN_DIR>/ext-
commerce/b2bapprovalprocess/resources/process folder. The b2bapprovalprocess extension contains an example of
B2BApprovalProcess. Note how all the nodes in the process diagrams above are represented in the process de nition and indicate the next process
steps subject to their results.

You can nd an example of the B2BOrderApproval process used in the Simple Order Approval process in the b2borderapproval.xml le.

You can nd an example of the B2BOrderApproval process used in the Two Pair of Eyes Approval process in the
b2bTwoPairOfEyesApproval.xml le, also located in <HYBRIS_BIN_DIR>/ext-
commerce/b2bapprovalprocess/resources/process.

For detailed information on how a process should be de ned, see The SAP Commerce processengine .

De ning Actions

The next step de nes the actions that are speci ed in the bean attribute of the action nodes. Design of an action depends on the results an action
should provide. The processengine functionality offers three standard abstract actions. For a description of them, see The SAP Commerce
processengine.

When you have to implement action behavior, you can simply create a class that implements the action interface. Find more information on the
action interface, see The SAP Commerce processengine. If you inherit from one of the actions speci ed below, you have a set of useful functionality
at hand. In our example all three types of actions are included.

Action Name Description Code Snippet

AbstractProceduralB2BOrderAproveAction For some actions there exists only one possible result that @Override
(example: startWork ow) triggers the next event in the process chain. For these public void executeAction(
actions, the best solution is to de ne it to inherit from {
AbstractProceduralB2BOrderAproveAction. All //some logic
you need to do is to implement the provided code snippet. }

AbstractSimpleB2BApproveOrderDecisionAction The most common type is the action that has two possible public Transition executeA
(example: CheckForApproval) results. Such an action should inherit from {
AbstractSimpleB2BApproveOrderDecisionAction. //some logic
return Transition.NOK;
// or return Transition.OK
}

AbstractAction In this action we have four possible results. Since there is no public enum Transition
de ned action template for such a case, the best practice is {
to de ne an enumeration inside the class that de nes all OK, PARTIAL, CANCEL, ERROR
possible codes.
public static Set<String>
{
final Set<String> res = ne

for (final Transition t :


{
res.add(t.toString());
}
return res;
}
}

The method getStringValues() is de ned in the Action @Override


interface. Its implementation is generic, so if you need to public Set<String> getTran
de ne your own transition you can simply copy the code {
snippet, rede ning only the possible result codes for the return Transition.getStrin
action. }

All you need to do in action class implementation is to ll in the execute method. Simply put your logic in this method and return one of the results
speci ed in Transition enum.

Spring Integration
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 81/118
1/9/2020
Registration of Process De nition

To make the process work by de ning the spring beans with the names speci ed in the process de nition, and join them with the classes de ned in
the step before.

The following snippet from b2bapprovalprocess-spring.xml is an example bean de nition for registering the process with the
processing extension by providing a classpath to the resource:

<bean id="approvalProcess"
class="de.hybris.platform.processengine.definition.ProcessDefinitionResource">
<property name="resource" value="classpath:/process/b2borderapproval.xml" />
</bean>

De ning Process Actions

You can nd an example of the spring bean de nitions used in the B2BOrderApproval process in the b2bapprovalprocess-spring.xml le, located in
<HYBRIS_BIN_DIR>/ext-commerce/b2bapprovalprocess/resources.

Overwriting the b2bapprovalprocess Extension Default Process

To overwrite the default process:

1. Create a Custom Process De nition File, such as custom-process.xml. The process con guration le can be placed in
<HYBRIS_BIN_DIR>/ext-hybris/b2bapprovalprocess/resources/process. The following is an example.

<?xml version="1.0" encoding="utf-8"?>


<process xmlns="http://www.hybris.de/xsd/processdefinition"
start="checkForApproval" name="customApproval"
processClass="de.hybris.platform.b2b.process.approval.model.CustomB2BApprovalProcessModel">
<action id="checkForApproval" bean="customCheckForApproval">
<transition name="NOK" to="failed" />
<transition name="OK" to="success" />
</action>

<end id="error" state="ERROR">All went wrong.</end>


<end id="failed" state="FAILED">Order process failed.</end>
<end id="success" state="SUCCEEDED">Order process finished.</end>
</process>

2. Implement AbstractSimpleB2BApproveOrderDecisionAction in CheckForApproval.java, as follows:

/*
* [y] hybris Platform
*
* Copyright (c) 2000-2011 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.b2b.process.approval.actions;

import de.hybris.platform.b2b.enums.PermissionStatus;
import de.hybris.platform.b2b.model.B2BCustomerModel;
import de.hybris.platform.b2b.model.B2BPermissionResultModel;
import de.hybris.platform.b2b.process.approval.model.B2BApprovalProcessModel;
import de.hybris.platform.b2b.services.impl.DefaultB2BPermissionService;
import de.hybris.platform.core.enums.OrderStatus;
import de.hybris.platform.core.model.order.OrderModel;

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 82/118
1/9/2020
import de.hybris.platform.task.RetryLaterException;

import java.util.Set;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Required;

/**
* Checks if the order requires an approver.
*
* @author DZ
*/
public class CheckForApproval extends AbstractB2BApproveOrderDecisionAction
{

private static final Logger LOG = Logger.getLogger(CheckForApproval.class);


private DefaultB2BPermissionService b2bPermissionService;

@Override
public Transition executeAction(final B2BApprovalProcessModel process) throws RetryLaterException, Exce
{
OrderModel order = null;
try
{
order = getOrderForProcess(process);
final B2BCustomerModel orderUser = (B2BCustomerModel) order.getUser();
final Set<B2BPermissionResultModel> permissionResults = b2bPermissionService.evaluatePe

// set only the results that need approval.


order.setPermissionResults(permissionResults);
order.setStatus(OrderStatus.PENDING_APPROVAL);
Transition transition = Transition.OK;

// NOK transition points to findApprovers action.


for (final B2BPermissionResultModel b2bPermissionResultModel : order.getPermissionResul
{
if (PermissionStatus.OPEN.equals(b2bPermissionResultModel.getStatus()))
{
transition = Transition.NOK;
}
else if (PermissionStatus.ERROR.equals(b2bPermissionResultModel.getStatus()))
{
// this can happen if budget was not found or any error occurred, like
throw new RuntimeException("Failed to evaluate permissions");
}
else
{
b2bPermissionResultModel.setStatus(PermissionStatus.APPROVED);
}

if (LOG.isDebugEnabled())
{
LOG.debug(String.format("PermissionResult %s|%s|%s ", b2bPermissionResu
b2bPermissionResultModel.getStatus(), b2bPermissionResu
}
}

if (transition.equals(Transition.NOK))
{
//Do nothing here as we will approve it in checkapproval process
this.modelService.save(order);
}

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 83/118
1/9/2020
return transition;
}
catch (final Exception e)
{
LOG.error(e.getMessage(), e);
this.handleError(order, e);

return Transition.ERROR;
}
}

public void handleError(final OrderModel order, final Exception e)


{

if (order != null)
{
this.setOrderStatus(order, OrderStatus.B2B_PROCESSING_ERROR);
}
LOG.error(e.getMessage(), e);
}

public DefaultB2BPermissionService getB2bPermissionService()


{
return b2bPermissionService;
}

@Required
public void setB2bPermissionService(final DefaultB2BPermissionService b2bPermissionService)
{
this.b2bPermissionService = b2bPermissionService;
}

3. Con gure the action as a Spring bean and inject the dependencies in your custom-process-spring.xml le, as follows:

<bean id="customCheckForApproval"
class="de.hybris.platform.b2b.process.approval.actions.CheckForApproval"
parent="abstractB2BApproveOrderDecisionAction">
<property name="b2bPermissionService" ref="b2bPermissionService" />
</bean>

4. Register the process de nition using Spring con guration in your custom-process-spring.xml le, as follows:

<bean id="customProcess"
class="de.hybris.platform.processengine.definition.ProcessDefinitionResource"
>
<property name="resource" value="classpath:/process/custom-process.xml" />
</bean>

5. Con gure B2BPlaceOrderStrategy with the process name customApprovalthat was de ned above in your custom-process-
spring.xml le, as follows:

<alias alias="b2bplaceOrderStrategy" name="defaultB2BPlaceOrderStrategy" />


<bean id="defaultB2BPlaceOrderStrategy"
class="de.hybris.platform.b2b.strategies.impl.DefaultB2BPlaceOrderStrategy"
parent="abstractBusinessService" >
<property name="placeOrderStrategy" ref="placeOrderStrategy" />
<property name="businessProcessService" ref="businessProcessService" />
<property name="processCodeGenerator" ref="processCodeGenerator" />
<property name="approvalProcessName" value="customCheckForApproval" />
</bean>

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 84/118
1/9/2020
B2B Organization Services

New or migrated services provided with the b2bapprovalprocess extension implement paginated lookups using the commerceservices
extension search infrastructure.

Service Name Lookup Item Description

B2BCommercePermissionService B2BPermission This service provides methods to retrieve an


instance of B2BPermissionModel by its code,
retrieve a paginated list of permissions and to add
permissions to, or remove permissions from
B2BCustomers and B2BUserGroups.

B2BApproverService B2BCustomer This service provides methods to manage and


lookup approvers (of type B2BCustomerModel)
for a business unit, such as adding or removing
approvers to or from B2BUnits and
B2BCustomers, or retrieving a paginated list of
approvers for a unit.

B2BApprovalProcessService N/A This service provides just one method to look up


available approval process codes for a given base
store.

Related Information
B2B Commerce Module

B2B Credit Management


Credit limit management in SAP Commerce de nes the maximum amount of credit that a B2B organization or B2B unit can have. Credit limits are
useful if merchants do not want to process orders above a speci c amount within a de ned time period. If an order exceeds the credit limit, the
merchant is noti ed and has to approve the order before it is processed.

B2B Credit Limit Overview


The credit limit check is a part of the B2B Order Approval Process, where an organization credit limit assigned by an account manager is checked.
Note that B2B customers cannot view the credit limit assigned by the merchant.

The credit limit check is the last step of the order approval process. If the credit limit is not reached, the order is processed by default. If an order
exceeds the credit limit alert threshold, the B2B merchant account manager receives a credit limit alert. If the order exceeds the credit limit amount,
a work ow action item is created for the B2B merchant account manager. Credit limits can be speci ed for a day, week, month, quarter, year, or date
range. If the credit limit parameters are changed, all new orders use the updated parameters to check against the credit limit.

This diagram represents an example of the credit check logic:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 85/118
1/9/2020
Unit B has a limit of 10 000 EUR per month. Unit D already placed orders for 1000 USD in the current month. A customer is placing an order for 1000
EUR in Unit B.

The total order value in EUR for units B and D is 1700 EUR (1000 USD unit D order converted to EUR + 1000 EUR from the order placed in unit B). In
this case, the order is processed because the 1700 EUR total is less than the 10 000 EUR credit limit assigned.

This diagram illustrates the B2B credit limit check ow:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 86/118
1/9/2020
For more information, see the following:

Managing Credit Limits

Working with Orders

Managing Order Permissions in Backoffice

Work ow Overview

De ning a Credit Limit Check


To de ne a credit limit check you need to be familiar with the process and the required steps to complete it. This also includes the actions to take in
case an error occurs during the process.

The credit limit check is a part of the approval process, so the business process de ned through the b2borderapproval.xml le is accordingly
modi ed to accommodate it.

Credit Limit Check

The credit limit check is done for the unit where the order has been placed rst, and if a credit limit is not found for that unit, the system moves up in
the hierarchy to the point where it can nd an assigned credit limit.

If a credit limit is found, the order total of the unit along with all units in same branch is calculated to check if the threshold value is reached.

The default evaluation strategy is located in the DefaultB2BCreditLimitEvaluationStrategy.java le.

To modify the default evaluation strategy, implement DefaultB2BMerchantCheckService and inject the strategy. There can be multiple
strategies that you need for complete evaluation depending on different business scenarios. The following is an example of the
DefaultB2BMerchantCheckService.java le.

package de.hybris.platform.b2b.services.impl;

import de.hybris.platform.b2b.model.B2BCustomerModel;
.........................................................
.........................................................

public class DefaultB2BMerchantCheckService extends AbstractBusinessService implements B2BMerchantCheckService


{

private static final Logger LOG = Logger.getLogger(DefaultB2BMerchantCheckService.class);


private Set<EvaluateStrategy<B2BMerchantCheckResultModel, AbstractOrderModel, B2BCustomerModel>> evaluateStra
protected List<String> merchantCheckTypes;
private UserService userService;

@Override
public Set<B2BMerchantCheckResultModel> evaluateMerchantChecks(final AbstractOrderModel order, final B2BCusto
{
final Set<B2BMerchantCheckResultModel> merchantCheckResults = new HashSet<B2BMerchantCheckResultModel
getSessionService().executeInLocalView(new SessionExecutionBody()
{
@Override
public void executeWithoutResult()
{
getUserService().setCurrentUser(getUserService().getAdminUser());
for (final EvaluateStrategy<B2BMerchantCheckResultModel, AbstractOrderModel, B2BCusto
{
final B2BMerchantCheckResultModel evaluationResult = evaluateStrategy.evaluat
merchantCheckResults.add(evaluationResult);

}
}
});

return merchantCheckResults;

@Required
public void setEvaluateStrategies(
final Set<EvaluateStrategy<B2BMerchantCheckResultModel, AbstractOrderModel, B2BCustomerModel>
{
this.evaluateStrategies = evaluateStrategies;
}

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 87/118
1/9/2020
.........................................................
.........................................................
}

De ning a Process

In de ning a process, The rst step in de ning a process is to modify the existing process de nition b2borderapproval.xml le, located in the
<HYBRIS_BIN_DIR>/ext-hybris/b2bapprovalprocess/resources/process directory. The b2bapprovalprocess extension
contains an example of B2BApprovalProcess. Note how all the nodes in the process diagrams above are represented in the process de nition
and indicate the next process steps subject to their results.

For more information on how a process should be de ned, see The SAP Commerce processengine.

To see an example of an OrderApproval process in which the credit limit or merchant check is accomodated, refer to the
b2borderapproval.xml le.

De ning Actions
The next step is to de ne the actions that are speci ed in the bean attribute of the action nodes. Most of the actions are outlined in the
b2bapprovalprocess Extension document. Here we will discuss the actions for credit limit only, which are performMerchantCheck and
checkCreditLimitResult. Design of an action depends on results an action is to provide. The processengine functionality offers three
standard abstract actions, you can nd description of actions in The SAP Commerce processengine.

When you have to implement action behavior, you simply create a class that implements the action interface. Find more information on Action
Interface in The SAP Commerce processengine. If you inherit from one of the actions speci ed below, you have a set of useful functionality at hand.
In our example all three types of actions are included.

The sample implementation of the PerformMerchantCheck actions can be viewed in the PerformMerchantCheck.java le.

You also need to ll in the execute method. Simply put your logic in this method and return one of the results speci ed in the Transition enum. If
the order needs an approver, or in this case an Account Manager's action because the order reached its credit limit, a work ow template is created
for the approver to accept or reject the order.

The next step is to implement the CheckCreditResults of type AbstractSimpleB2BApproveOrderDecisionAction, which is executed
when an approver makes a decision and accordingly sets the status to APPROVED or REJECTED_BY_MERCHANT.

The following is an example of the CheckCreditLimitResults.java le:

package de.hybris.platform.b2b.process.approval.actions;

import de.hybris.platform.b2b.process.approval.model.B2BApprovalProcessModel;
.........................................................
.........................................................
public class CheckCreditLimitResults extends AbstractSimpleB2BApproveOrderDecisionAction
{

private static final Logger LOG = Logger.getLogger(CheckCreditLimitResults.class);

@Override
public Transition executeAction(final B2BApprovalProcessModel process) throws RetryLaterException
{
OrderModel order = null;
try
{
order = process.getOrder();

if (OrderStatus.REJECTED.equals(order.getStatus()))
{
order.setStatus(OrderStatus.REJECTED_BY_MERCHANT);
this.modelService.save(order);
return Transition.NOK;
}

order.setStatus(OrderStatus.APPROVED);
this.modelService.save(order);
return Transition.OK;

}
catch (final Exception e)
{
LOG.error(e.getMessage(), e);
this.handleError(order, e);
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 88/118
1/9/2020
return Transition.NOK;
}
}

private void handleError(final OrderModel order, final Exception e)


{

if (order != null)
{
this.setOrderStatus(order, OrderStatus.B2B_PROCESSING_ERROR);
}
LOG.error(e.getMessage(), e);
}

Spring Integration

Registration of Process De nition

The registration process is exactly the same as for the rest of the approval process.

For more information, see b2bapprovalprocess Extension.

De ning Process Actions

The following is an example Spring bean de nition used in the B2BOrderApproval process, as seen in the b2bapprovalprocess-
spring.xml le:

<?xml version="1.0" encoding="UTF-8"?>


<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
....................................................
....................................................
....................................................
<bean id="performMerchantCheck"
class="de.hybris.platform.b2b.process.approval.actions.PerformMerchantCheck"
parent="abstractSimpleB2BApproveOrderDecisionAction">
<property name="b2bMerchantCheckService" ref="b2bMerchantCheckService" />
<property name="userService" ref="userService" />
<property name="b2bUnitService" ref="b2bUnitService" />
<property name="b2bApproverService" ref="b2bApproverService" />
</bean>

<bean id="checkCreditLimitResults"
class="de.hybris.platform.b2b.process.approval.actions.CheckCreditLimitResults"
parent="abstractSimpleB2BApproveOrderDecisionAction">
</bean>

....................................................
....................................................
....................................................
</beans>

Related Information
Managing Credit Limits
b2bcommerce Extension
Business Process Management
basecommerce Extension
Work ow Overview
work ow Extension
The SAP Commerce processengine
The Task Service
yacceleratorful lmentprocess Extension

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 89/118
1/9/2020

B2B Permissions
B2B permissions are evaluated during the order approval process to check if an order needs additional approval or to nd an approver for the order, if
required. Learn about the default B2B permission types, as well as how to create new ones

The following are the default permission types that come with the b2bapprovalprocess extension and are meant as a guideline for you to
implement organization-speci c permission logic:

B2BOrderThresholdPermission

B2BOrderThresholdTimespanPermission

B2BBudgetExceededPermission

B2B2POEPermissionA

B2B2POEPermissionB

For more information on how to create and manage permissions and permission groups, see Managing Order Permissions in Backoffice.

Permission Types and Spring De nition


This section outlines the item types created for permissions by the b2bapprovalprocess extension. It includes excerpts from
b2bapprovalprocess-items.xml as well as spring con guration for strategies that know how to evaluate different permissions types.

De nition of B2B Permission Types

You de ne b2bpermission types in the b2bapprovalprocess-items.xml le.

Class Diagram

The following class diagram shows the inheritance hierarchy of the permissions, and also shows how the B2BPermissionResult relates to
permissions and a B2B customer.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 90/118
1/9/2020

Spring De nition

Permissions are checked by B2BPermissionService. The logic for how each permission is evaluated is encapsulated in a strategy. The following
strategies are provided by default:

b2bBudgetExceededEvaluationStrategy

b2bOrderThresholdEvaluationStrategy

b2bOrderThresholdTimespanEvaluationStrategy

You can see how these strategies are injected into the service by viewing the b2bapprovalprocess-spring.xml le. These strategies are
provided as a guideline. For your speci c project, you would most likely need to write your own logic. The following sections describe how to do just
that.

 Note
For orders to be placed successfully, the three permissions associated with these evaluation strategies (B2BBudgetExceededPermission,
B2BOrderThresholdPermission, and B2BOrderThresholdTimespanPermission) need to be created in the Backoffice Administration Cockpit and
assigned to at least one customer and one approver. If you do not wish to use a speci c permission, you need to remove the associated evaluation
strategy from the evaluateStrategies property of the defaultB2BPermissionService bean that is de ned in b2bapprovalprocess-
spring.xml.

Note also that permissions created in the Backoffice Administration Cockpit need to satisfy the associated evaluation strategy in order for orders
to be placed successfully.

Adding a New Permission


The permission types provided do not cover all scenarios. It is worth noting that the B2BPermission type de nition is exible as far as storing data
you may need. The B2BPermission.properties le uses a KeyValueCollection type, which means this attribute can store any key-value pair.
You can use this attribute if you want to be generic, or extend from B2BPermission as shown in the section below.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 91/118
1/9/2020
Adding Created Permission Type to the System

In this example, the volume of orders a customer can place is limited. To do it, create a permission type that holds the state needed to achieve
checking for number of orders placed by customer. In the following your_extension_items.xml le, the name of the example permission is
B2BOrderValueExceededPermission.

<itemtype code="B2BOrderValueExceededPermission"
jaloclass="de.hybris.platform.b2b.jalo.B2BOrderValueExceededPermission"
autocreate="true" generate="true" extends="B2BPermission">
<attributes>
<attribute qualifier="orderVolume" type="java.lang.Long">
<modifiers read="true" write="true" search="true"
optional="false" />
<persistence type="property" />
</attribute>
<attribute qualifier="currency" type="Currency">
<modifiers read="true" write="true" initial="false"
optional="false" search="true" />
<persistence type="property" />
</attribute>
</attributes>
</itemtype>

Creating an Evaluation Strategy

The strategy that you create extends AbstractEvaluationStragegy and implements an EvaluateStrategy interface.

You place your logic for permission evaluation in the evaluate method which should return a B2BPermissionResultModel with the correct status
OPEN. It means the permission was not satis ed and PENDING_APPROVAL means the permission was ful lled, in this example this would mean the
order created did not reach maximum value.

public class DefaultOrderValueExccededEvaluationStrategy extends AbstractEvaluationStragegy implements


EvaluateStrategy<B2BPermissionResultModel, AbstractOrderModel, B2BCustomerModel>
{
@Override
public B2BPermissionResultModel evaluate(final AbstractOrderModel order, final B2BCustomerModel employee)
{
PermissionStatus status = PermissionStatus.OPEN;
/*
* add logic here to derive the status for the result

*/

final B2BPermissionResultModel result = this.getModelService().create(B2BPermissionResultModel.class)


result.setApprover(employee);
result.setPermission(permissionToEvaluate);
result.setPermissionTypeCode(B2BCommerceConstants.TC.B2BORDERVALUEEXCEEDEDPERMISSION);
result.setStatus(status);

return result;
}

/**
* Gets the permission to evaluate.
*
* @param permissions
* the permissions
* @param type
* the type
* @return the permission to evaluate
*/
public B2BOrderValueExceededPermission getPermissionToEvaluate(final List<B2BPermissionModel> permissions,
final Class<? extends B2BPermissionModel> type)
{
return (B2BOrderValueExceededPermission) CollectionUtils.find(permissions, PredicateUtils.instanceofP
}

/*
* (non-Javadoc)
*
* @see de.hybris.platform.b2b.strategies.EvaluateStrategy#getPermissionType()
*/
@Override
public Class<? extends B2BPermissionModel> getPermissionType()
{
return B2BOrderValueExceededPermission.class;
}

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 92/118
1/9/2020
Spring Integration

In order for the new permission strategy to get integrated into the PermissionService you need to inject the orderValueExccededEvaluationStrategy
into de.hybris.platform.b2b.services.impl.DefaultB2BPermissionService you should give a permission service de nition a unique ID name, for
example XYZB2BPermissionService and alise it with alias b2bPermissionService so that it overwrites the default de nition.

<alias alias="b2bPermissionService" name="XYZB2BPermissionService" />


<alias alias="orderValueExccededEvaluationStrategy" name="defaultOrderValueExccededEvaluationStrategy" />

<bean id="XYZB2BPermissionService"
class="de.hybris.platform.b2b.services.impl.DefaultB2BPermissionService"
parent="abstractBusinessService">
<property name="evaluateStrategies">
<list>
<ref bean="b2bOrderThresholdEvaluationStrategy" />
<ref bean="b2bOrderThresholdTimespanEvaluationStrategy" />
<ref bean="b2bBudgetExceededEvaluationStrategy" />
<!-- inject new strategy here. -->
<ref bean="orderValueExccededEvaluationStrategy" />
</list>
</property>
<property name="b2bApproverService" ref="b2bApproverService" />
<property name="permissionResultHelper" ref="permissionResultHelper" />
<property name="userService" ref="userService" />
</bean>

<bean id="defaultOrderValueExccededEvaluationStrategy"
class="de.hybris.platform.b2b.strategies.impl.DefaultOrderValueExccededEvaluationStrategy"
parent="abstractEvaluationStragegy">
</bean>

Related Information
Business Process Management
yacceleratorful lmentprocess Extension
basecommerce Extension
The SAP Commerce processengine
The Task Service
Managing Order Permissions in Backoffice

b2bapprovalprocessfacades Extension
The b2bapprovalprocessfacades provides a number of facades that are backed by the services in the b2bapprovalprocess extension.

This facade has been migrated from b2bacceleratorfacades and refactored into smaller facades, where applicable, in order to have a cleaner
separation of concern.

 Note
An SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure to limit your
implementation to the features de ned in your contract license. In case of doubt, please contact your sales representative.

B2B Facades
The following facades expose B2B services from the b2bapprovalprocess extension:

B2BApprovalProcessFacade

B2BApproverFacade

B2BPermissionFacade

b2bcommerce Extension
The b2bcommerce extension enables you to provide B2B functionality to your organization.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 93/118
1/9/2020
For information on how to create an order approval process, see b2bapprovalprocess Extension.

 Note
An SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure to limit your
implementation to the features de ned in your contract license. In case of doubt, please contact your sales representative.

Data Access Security


The data security in B2B scenarios requires enhanced mechanisms to support multiple users from within one B2B organization as well as preventing
access to data from one B2B organization to another.

Visibility

 Note
You can assign customers to more than one unit. User visibility restrictions apply to all of their assigned organizations.

The following image is a visualization of potential organization con guration in a B2B scenario. All the organizations (A-C) are con gured and setup in
the B2B eCommerce system to view prices, place orders, setup new employees, and organizational units.

Units Within Multiple Organizations

B2B customer of the B2B Organization A (Org A) cannot see information (prices, orders, cost center information) from any other B2B organizations
or B2B units (Org B and Org C), place orders on behalf of other B2B organizations or create B2B units in other B2B organization branches.

The restriction in visibility is bound to the B2BGroup item. Every B2B customer has to be a member of this group.

 Note
The reason to have only one group with the restrictions con gured is maintainability. With every custom restriction (for example, B2B customers
can only see their orders) that is introduced, the restriction has to be applied to every item. Maintaining the simple rule is easier and still very
exible and allows for most use cases regarding organization.

If you want to restrict visibility, use standard SAP Commerce personalization.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 94/118
1/9/2020

Structure Behind B2B Unit Personalization

All objects that should apply to personalization rules are related to the B2B Unit and a personalization rule is applied.

Order Restriction Example

Setting the Branch


The personalization reads branch information from session session.branch. Calculating the branch on every request would come with some cost.
The information about the branch is set when the user session in AfterSessionCreationListener or AfterSessionUserChangeListener.

protected void onEvent(final AfterSessionUserChangeEvent event)


{
final JaloSession jaloSession = (JaloSession) event.getSource();
final UserModel currentUser = userService.getCurrentUser();
b2bUnitService.updateBranchInContext(jaloSession, currentUser);
resetCurrency(currentUser);
}

Propagation of Rights
Access rights within a B2B Organization are propagated down in the hierarchy.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 95/118
1/9/2020

Propagation of Rights Within the B2B Organization

In the previous example, Employee (E1) has the right to view orders for the B2B Unit (U2.2). This right gets propagated down the tree and the
employee has the right to view orders for B2B Units (U3.3) and (U3.4) as well.

B2B customers always have the right to view all the information they are granted access to for their B2B branch (the assigned B2B unit and the
descendants).

Related Information
B2B Commerce Module
b2bapprovalprocess Extension
basecommerce Extension

B2B Organization Services


New or migrated services provided with the b2bcommerce extension implement paginated lookups using the commerceservices extension
search infrastructure.

Service Name Lookup Item Description

B2BBudgetService B2BBudget This service provides methods to look up instances


of B2BBudgetModel by UID and getting a
paginated list of budgets.

B2BCommerceB2BUserGroupService B2BUserGroup This service provides methods to manage and look


up instances of B2BUserGroupModel, like
assigning members to a usergroup, getting a
paginated list of usergroups, and more.

B2BCommerceCostCenterService B2BCostCenter This service provides methods to manage and look


up instances of B2BCostCenterModel by UID
and getting a paginated list of cost centers.

B2BCommerceUnitService B2BUnit This service provides some common manipulation


methods for instances of B2BUnitModel, such as
disabling units and editing unit delivery addresses.

B2BCommerceUserService B2BCustomer This service provides some common methods for


B2BCustomerModel instances. In addition to
searching for customers by UID and performing
paginated searches, this service provides methods
for disabling customers and adding user roles.

B2B Types
B2B types represent fundamental entities in the B2B transaction domain.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 96/118
1/9/2020
Every B2B item type should have limited visibility across a B2B organization. It has to have a relation to the B2B unit, as the visibility check is based
on the branch the B2B unit is parent of.

Note the following if the relation to the B2B unit is altered (for example deleted, moved, disabled, or orphaned) with respect to master and
transaction data.

Delete: Master data cannot be deleted (cost center, budget, unit, employee). If transactional data is deleted it is removed from the reports as
well.

Move (when possible): Transactional and master data assigned to a master data item (like a B2B unit) is moved with it.

Disabled: All data is still there, and you can create reports that include or exclude data from disabled units.

Orphaned: All data is still there and can be part of a report. When it loses the connection to a B2B unit it's only accessible by a merchant
admin.

Common B2B Item Fields


B2B items are found in the B2B Commerce section in the Backoffice Administration Cockpit. For example, to view the elds for a B2B unit, navigate
to B2B Commerce B2B Unit , and then select a B2B unit from the list that appears. The details for the units are displayed in the bottom portion of
the page.

All B2B items have the following required and optional elds. The Location column shows which tab and section to access the eld for a selected B2B
item. The required elds may not be null, but may be modi ed.

Name Required Type Location in Backoffice

Name Yes Text General Essential

ID (unique) Yes Text General Essential

Description Optional Text General Properties

Note that the Active status (in the Administration tab) is automatically set to active. Disabling it is permanent on B2B units and has a cascading
effect on all child B2B units.

B2B Unit
A B2B unit is an organizational unit representing a company node, department node, or branch node. It holds relations to almost every B2B type
because the visibility restriction is based on a B2B Unit. Units can have one parent B2B unit assigned and they can have multiple children assigned.
The B2B unit that has no parent B2B unit is the B2B root unit of a B2B organization.

A B2B unit and its descendants form a branch of the B2B organization. The branch of the B2B root unit is the B2B organization. Orders are assigned
to B2B units, so if you move an employee from one B2B unit to another, the order is still assigned to the same B2B unit. B2B units can have an
approver group assigned, which is a list of potential approvers of an order with a set of prede ned permissions. A B2B unit is a subtype of the SAP
Commerce type company, for more information on SAP Commerce types, see Users in the Commerce Platform.

B2B units are accessed by navigating to B2B Commerce B2B Unit and then selecting a unit. B2B units have the following required and optional
elds. The Location column shows which tab and section to access the eld for a selected B2B unit. The required elds may not be null, but may be
modi ed:

Field Required Type Location in Backoffice Comments

Parent B2BUnit Yes B2BUnit Organization Organizational Required for all but the root
Units B2B unit

VAT ID No Text General IDs n/a

DUNS ID No Text General IDs n/a

Contact Person No B2BCustomer General Properties n/a

Cost Centers No B2BCostCenter(s) Cost Center n/a

Approver Groups No B2BPermissionGroup(s) Approvers Approvers n/a

Approvers No B2BCustomer(s) Approvers Approvers n/a

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 97/118
1/9/2020
For more information, see Users in the Commerce Platform.

B2B Core Types


This diagram presents all core types for B2B Commerce:

B2B Order
An order is placed for a B2B organization. The B2B order is assigned to a B2B unit, still holding its owner as the person who placed the order.

An order can only use one currency. B2B customers have no limit on the currency to use, but they are limited by the currency of the cost centers they
can access, and by the permissions they are assigned. A permission of order threshold has a currency and the currency gets checked when the order
gets placed.

For a B2B order the OrderLineItem could have references to cost centers.

B2B orders are accessed by navigating to Order Orders and then selecting an order. B2B orders have the following required and optional elds. The
Location column shows which tab and section to access the eld for a selected B2B order. The required elds may not be null, but may be modi ed:

Field Required Type Location in Backoffice

User Yes B2BCustomer Positions and Prices Essential

Order Status Yes Enumeration Payment and Delivery Status

B2B Comment No Text Positions and Prices B2B Comment

B2B Customer
B2B customers are assigned to a B2B unit. They are members of at least one B2B group. Their visibility and actions are limited to the B2B branch
they are assigned to.

B2B customers can be active or inactive. When inactive, they are not able to log in, and therefore cannot approve orders, place orders, or perform any
action on the system. Only an admin can reactivate a user. When they have access to items, this right is propagated down the branch, so they can see
all items for their B2B unit and descendants.

B2B customers have a set of permissions assigned. A B2B customer with permissions must also be assigned to the appropriate user group that
grants the corresponding CRUD rights for the item the customer wants to modify.
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 98/118
1/9/2020
You can move a B2B customer from one B2B unit to another within the B2B organization by updating the parent B2B unit. New budgets and cost
centers are applied accordingly. However, B2B permission groups are transferred and may need to be adjusted. Order history is maintained both on
B2B customer and B2B unit at the time order was placed, so historical data is maintained.

B2B customers are accessed by navigating to B2B Commerce B2B Customer and then selecting a customer. B2B customers have the following
required and optional elds. The Location column shows which tab and section to access the eld for a selected B2B customer. The required elds
may not be null, but may be modi ed:

Field Required Type Location in Backoffice

Groups (de nes the parent B2B unit) Yes B2BUnit General Properties

Email Yes Text Addresses Addresses

Approvers No B2B Customer(s) Approvers Approvers

Approver Groups No B2B Permission Group(s) Approvers Approvers

Groups No B2B Group(s) General Properties

B2B Cost Center


B2B cost centers are assigned to a B2B budget and have orderLineItems assigned to them. The calculation of cost centers total is done by
summing up all the orderLineItems. When compared to a budget the date range of the budget is taken into consideration. If the cost center's
budget is disabled, all subsequent orders billed to the cost center trigger the BudgetExceededPermission approval process.

B2B cost centers do not sum up over branches or hierarchy levels. Each B2B cost center has its own budget and order line items assigned. A B2B
customer can see all cost centers for his B2B branch

B2B cost centers are accessed by navigating to B2B Commerce B2B Cost Center and then selecting a cost center. B2B cost centers have the
following required and optional elds. The Location column shows which tab and section to access the eld for a selected B2B cost center. The
required elds may not be null, but may be modi ed:

Field Required Type Location in Backoffice

Parent B2BUnit Yes B2BUnit General Essential and


Hierarchy Essential

Budget No B2BBudget Hierarchy Parent B2B Unit

Active (default: true) Yes Boolean General Properties

B2B Budget
A B2B budget is assigned to one or many cost centers. Purchases are billed to budgets using the cost centers.

If a budget is disabled, all subsequent orders trigger the BudgetExceeded order approval work ow. All orders approved prior to a budget being
modi ed are not affected. If orders are in pending states, once they become approved by their approver, they are re-tested against the budget before
moving on to approved state.

B2B budgets are accessed by navigating to B2B Commerce B2B Budget and then selecting a budget. B2B budgets have the following required and
optional elds. The Location column shows which tab and section to access the eld for a selected B2B budget The required elds may not be null,
but may be modi ed:

Field Required Type Location in Backoffice

Parent B2BUnit Yes B2BUnit General Essential and


Hierarchy Essential

Currency Yes Currency General Properties

Budget Yes BigDecimal General Properties

Date Range Start / End Yes Date General Properties

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe2… 99/118
1/9/2020
B2B Escalation Cron Job
A B2B escalation cron job checks orders in pending approval state and escalates them to next approver level if the idle period is exceeded.

B2B Permissions
B2B permission is a type used to verify whether an order placed by a B2B customer can proceed without further approval. There are three
permission provided out of the box; you need to implement and con gure additional permissions. If a B2B customer does not have the necessary
permissions to place an order, order approvers are noti ed and an approver must manually approve the order. Order approvals themselves must have
the necessary permissions to approve the speci c order.

B2BApproveOrderPermission / B2BAmountTimeSpanPermission

B2BApproveOrderPermission: Possessors of this permission are allowed to approve orders that are below the speci ed threshold.

B2BAmountTimeSpanPermission: Possessors of this permission are allowed to spend a speci c amount over a speci ed number of days.

B2B permissions are accessed by navigating to B2B Approval Process B2B Permission and then selecting a permission. B2B permissions have the
following required and optional elds. The Location column shows which tab and section to access the eld for a selected B2B permission. The
required elds may not be null, but may be modi ed:

Field Required Type Location in Backoffice

Parent B2B Unit Yes B2BUnit General Essential and


Hierarchy Essential

Threshold Yes Number General Properties

Currency Yes Currency General Properties

B2BBudgetExceededPermission

Possessors of this permission are allowed to place orders that would result in exceeding the remaining budget.

This table lists the eld used by this permission:

Field Required Type Location in Backoffice

Parent B2B Unit Yes B2BUnit General Essential and


Hierarchy Essential

B2B User Groups


Every B2B customer is member of at least one B2B user group. A B2B user group is a Principal Group which contains a list of B2B permissions. All
B2B customers that are members of a group are granted its permissions.

B2B user groups are accessed by navigating to B2B Commerce B2B User Groups and then selecting a user group. B2B user groups have the
following required and optional elds. The Location column shows which tab and section to access the eld for a selected B2B user group. The
required elds may not be null, but may be modi ed:

Field Required Type Location in Backoffice

Parent B2B Unit Yes B2BUnit General Essential

B2B Permission(s) No B2BPermission General Properties

B2B Units and Organization Tree


Customer-side organizations are composed of B2B units which are in a tree structure with one root node. A B2B unit may represent a department,
sub-company or division within an organization.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 100/118
1/9/2020
The root node is itself a B2B unit with no parent unit. Administrators on the customer-side can manage B2B units within their organizations or
branches. For example, they can create and disable child units. Only an administrator on the merchant side can create a root node.

The structure items of B2B Commerce, such as budgets, cost centers, customers, and permissions are associated to a B2B unit and may also be
managed by customer-side administrators. Visibility is based on branches, where the branch of the root node is in effect the whole organization.
Customers cannot see or manage B2B Items which are not in their branch.

For B2B units and the organization tree, personalization rules and visibility restrictions, see b2bcommerce Extension. For more information on how to
manage units and the organization tree, see Working with B2B Units.

B2B Types for Organization Tree


This section shows all types and services connected to B2B units.

B2BUnit, which extends B2BUserGroup, must be a member of one B2BUnit unless it is a root node.

B2B Services for Managing Organization


This section shows all methods behind B2BUnitService and B2BCustomerService.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 101/118
1/9/2020

Managing B2B Units with Services


The following sections provide examples on how to use some of the selected methods below.

Creating a B2B Unit

Only the system administrator can create a root B2B unit, which is a B2B unit without a parent unit. Customer-side administrators may create and
add child units of this unit in their organization. If you attempt to create a B2B unit without a parent it fails unless you are the system administrator.

/*
* Sample method which creates a B2BUnit
*/
public B2BUnitModel createSubB2BUnit(B2BUnitModel parent)
{
final B2BUnitModel unit = (B2BUnitModel) modelService.create(B2BUnitModel.class);
unit.setUid("uniqueID");
unit.setName("AnyName");
unit.setGroups(Collections.EMPTY_SET);
b2bUnitService.addMember(parent, unit); // Set parent
this.modelService.save(unit);
return unit;
}

Creation of the root B2B unit requires administration rights. You can use the SessionService.executeInLocalView to run code inside its
own session context without affecting the current session.

You need to inject sessionService into your bean.

sessionService.executeInLocalView(new SessionExecutionBody()
{
@Override
public void executeWithoutResult()
{
sessionService.setAttribute(SessionContext.USER, userService.getUser(Constants.USER.A
// Create root B2BUnit here
final B2BUnitModel unit = (B2BUnitModel) modelService.create(B2BUnitModel.class);
unit.setUid("uniqueID");
unit.setName("AnyName");
unit.setGroups(Collections.EMPTY_SET);
this.modelService.save(unit);
}
});

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 102/118
1/9/2020
Finding a B2B Unit

Finding a B2B Unit by UID

You can nd a B2B unit by its UID, although if a B2B unit exists in a different branch than you are trying to load it to, system returns null as if it does
not exist at all.

b2bUnitService.getUnitForUid(String uid);

Checking If UID for B2B Unit Is Unique

Both B2B Customers and B2B units are SAP Commerce principals. UniqueID must be unique across all principal types. Checking if a UID is already
taken is used, for example for validation purposes. Visibility rules are suspended for such call.

b2bCustomerService.principalExists("some uniqueId")

Finding a B2B Unit by Session User

You can search for a B2B unit using Session User:

B2BCustomerModel b2bCustomer = b2bcustomerService.getCurrentB2BCustomer();


B2BUnitModel parent = b2bUnitService.getParent(b2bCustomer);

Disabling a B2B Unit

Deleting a B2B unit is not advisable due to dependencies. B2B Commerce provides a way to disable a B2B unit. When a B2B unit is disabled, all its
B2B Customers, sub-units and their customers are also disabled. This ensures once organization or branch is disabled, commerce, and permissions
are suspended.

b2bUnitService.disableBranch(final B2BUnitModel unit)

Related Information
Working with B2B Units

B2B Customer and Customer Rights


B2B customers can have permissions assigned to them through four different user groups. Each user group has speci c permissions that are
granted to its members.

Customers in the B2B Commerce Module are members of a B2B unit. They are represented by the B2BCustomer type. There are four special B2B
groups that grant abilities and rights to their members:

B2BAdminGroup: Members can create and manage other B2B items, such as cost centers, budgets, and customers.

B2BManagerGroup: Members can only view reports.

B2BApproverGroup: Members approve or reject orders.

B2BCustomerGroup: New customers are automatically placed into this group, which grants the permissions to purchase.

As with other B2B types, B2B customers are subject to visibility rules. Merchant administrators cannot view or manage B2B items not associated
directly to their branch.

For information on how to manage customers and customers rights, see Managing Customer User Groups in Backoffice.

For B2B Units and Organization visibility restrictions, see B2B Units and Organization Tree.

Types
This diagram shows all types and services connected to B2B customers.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 103/118
1/9/2020

Services
This diagram shows all methods behind B2BUnitService and B2BCustomerService.

Propagation of Customer Rights


There are four special B2B user groups that grant rights:

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 104/118
1/9/2020

You can nd their IDs in B2BCommerceConstants:

public B2BCommerceConstants
{ ..
public static final String B2BCUSTOMERGROUP = "b2bcustomergroup";
public static final String B2BAPPROVERGROUP = "b2bapprovergroup";
public static final String B2BADMINGROUP = "b2badmingroup";
public static final String B2BMANAGERGROUP = "b2bmanagergroup";
}

The four user groups have following rights:

User Group Description

b2bcustomergroup Members of this group can view cost centers, create and view their orders.

b2bapprovergroup Members of this group have all privileges of b2bcustomergroup, and can also
approve or reject orders according to order approval work ow.

b2badmingroup Members of these groups have all privileges of b2bcustomergroup, and can
also manage all items within their branch of organization tree.
b2bmanagergroup

Creating B2B Customers

Checking If UID Is Unique

B2B Customers and B2B Units are both principals. IDs must be unique to all principals. You may want to check if the UID is unique:

// Visibility rules do not apply.


boolean isUnique = b2bCustomerService.principalExists("some uniqueId");

For more information, see Users in the Commerce Platform.

Adding a B2B Customer

Find example code snippet showing how to create a B2B customer:

B2BCustomerModel customer = modelService.create(B2BCustomerModel.class);


customer.setName("Customer Name");
customer.setUid("uniqueID"); // Required, must be unique
customer.setEmail("[email protected]); // Required
b2bCustomerService.addMember(itemModel, b2bUnitService.getUnitForUid("parentID")); // Parent B2BUnit is requir
modelService.save(item);

Extending a B2B Customer

You can either append attributes to the B2BCustomer item or extend from it. The following example from the items.xml le shows how to add an
attribute to the customer:

<itemtype code="B2BCustomer" generate="true"


jaloclass="de.hybris.platform.b2b.jalo.B2BCustomer" extends="Customer"

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 105/118
1/9/2020
autocreate="true">
<attributes>
<attribute qualifier="active" type="java.lang.Boolean">
<modifiers read="true" write="true" search="true"
optional="false" />
<defaultvalue>java.lang.Boolean.TRUE</defaultvalue>
<persistence type="property" />
</attribute>
<attribute qualifier="email" type="java.lang.String">
<modifiers read="true" write="true" search="true"
optional="false" />
<persistence type="property" />
</attribute>
</attributes>
</itemtype>

The following is an example from items.xml of how to extend a B2BCustomer:

<itemtype code="CustomB2BCustomer" generate="true"


jaloclass="com.mycompnay.jalo.CustomB2BCustomer" extends="B2BCustomer"
autocreate="true">
<attributes>
<attribute qualifier="customField" type="String">
<modifiers read="true" write="true" search="true" />
<persistence type="property" />
</attribute>
</attributes>
</itemtype>

Adding Customer Rights to a B2B User Group


You can add certain rights to a B2B User Group.

Here is an example of adding rights:

B2BCustomerModel customer = b2bItemFacade.getB2BCustomerForCode("uniqueID");


final Set<PrincipalGroupModel> groups = new HashSet<PrincipalGroupModel>(itemModel.getGroups());
groups.add(UserService.getUserGroupForUID(B2BCommerceConstants.B2BADMINGROUP));
customer.setGroups(groups);
modelService.save(item);

Disabling a B2B Customer


You can delete B2B customers effectively by setting their active status to disabled. They do not show up in subsequent searches and users are not
able to log in and therefore place orders.

Here is an example of deleting of a B2B customer:

B2BCustomerModel customer = b2bCustomerService.getB2BCustomerForCode("uniqueID");


customer.setActive(Boolean.FALSE);
modelService.save(item);

Related Information
Managing Customer User Groups in Backoffice

B2B Budgets and Cost Centers


Learn about the types and services associated with B2B budgets and cost centers, as well as how to create a budget and a cost center.

Companies need to manage their cost centers and budgets. Cost centers are used for accounting purposes. Orders or line items of an order are
charged against a cost center. Budgets help the user monitor their spending. Budgets are assigned to cost centers. You can assign right to maintain
cost centers and budgets to the company administrator or any other user.

By default users who belong to b2badmingroup or b2bmanager group are able to create and edit cost centers and budgets.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 106/118
1/9/2020
For information on how to manage budgets and cost centers using the Backoffice Administration Cockpit or B2B Store front end, see Working with
Budgets.

Visibility of Cost Centers and Budgets


Only the budgets and cost centers assigned to the B2B Unit of the logged in B2B Admin or B2B Manager and the units of their branch can be edited.

 Note
Cost centers and budgets are currency sensitive. You need to make sure to create a separate cost center and budget for each currency which you
use.

Retrieving Available Cost Centers for the Current Session

The code snippet below demonstrates how to retrieve cost centers of a B2B branch for a speci c currency:

b2bCostCenterService.getCostCentersForUnitBranch(b2bUnitService.getParent((B2BCustomerModel) userModel), i18nService.

Retrieving a Budget from a Cost Center That Is Active and Has Not Expired

The code snippet below demonstrates how to retrieve a budget from a cost center associated with an OrderEntry:

// aggregate cost centers from order entries


final Set<B2BCostCenterModel> b2bCostCenters = orderUtils.getB2BCostCenters(order.getEntries());
for (final B2BCostCenterModel b2bCostCenterModel : b2bCostCenters)
{
final B2BBudgetModel currentBudget = b2bCostCenterService.getCurrentBudget(b2bCostCenterModel);
}

Types
This section shows all types and services connected to B2B Cost Centers and Budgets.

Services
B2BCostCenterService provides methods for looking up cost centers available to a branch or a B2B Unit. It can also retrieve available
currencies based on the session.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 107/118
1/9/2020

Creating a Cost Center and a Budget

Find an example of creating a cost center and a budget below:

final UserModel user = userService.getUser("b2badmin");


final B2BUnitModel unit = b2bUnitService.getParent(((B2BCustomerModel)user));
final B2BCostCenterModel costCenter = (B2BCostCenterModel) modelService.create(B2BCostCenterM
costCenter.setCode("costcenter1");
costCenter.setUnit(unit);
costCenter.setCurrency(I18NService.getCurrency("USD"));

final B2BBudgetModel budgetModel = (B2BBudgetModel) modelService.create(B2BBudgetModel.class)


budgetModel.setCode("budget1");
budgetModel.setUnit(unit);
budgetModel.setBudget(java.math.BigDecimal.valueOf(budget.doubleValue()));
budgetModel.setCurrency(I18NService.getCurrency("USD"));
budgetModel.setDateRange(B2BDateUtils.createDateRange(B2BPeriodRange.YEAR));

final HashSet<B2BBudgetModel> b2bBudgetModels = new HashSet();


b2bBudgetModels.add(budget);
costCenter.setBudgets(b2bBudgetModels);
modelService.save(costCenter);

Related Information
Working with Budgets

B2B Price, Product and Catalog Management


Price, product, and catalog management within the B2B Commerce Module is conducted using the impex extension. The following sections
describe B2B data management using ImpEx.

Product and catalog management within the B2B Commerce Module uses technology from the catalog extension.

Setting Up B2B Unit-Speci c Pricing


This example is based on data available in the sampledata extension. It shows how to assign prices for the product HW2120-0341 for 3 B2B units:
IC Sales DE, IC Sales UK, and IC Sales US. This is achieved by creating price rows with a userPriceGroups and then associating those user price
groups to B2BUnit.

$catalogVersion=catalogVersion(catalog(id),version)[unique=true];
##############################################################################
# Create UserPriceGroups
##############################################################################

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 108/118
1/9/2020
INSERT_UPDATE UserPriceGroup;code[unique=true];name[lang=en];
;IC_UK;IC UK PRICING;
;IC_EUROPE;IC EUROPE PRICING;
;IC_US;IC US PRICING;

##############################################################################
# Create price rows and associate them to user price groups.
##############################################################################
INSERT_UPDATE PriceRow; product(code, catalogVersion(catalog(id),version))[unique=true];ug(code)[unique=true];currenc
;HW2120-0341:hwcatalog:Staged;IC_UK;GBP;111;hwcatalog:Staged;1;
;HW2120-0341:hwcatalog:Staged;IC_UK;GBP;99;hwcatalog:Staged;3;
;HW2120-0341:hwcatalog:Staged;IC_UK;GBP;77;hwcatalog:Staged;5;
;HW2120-0341:hwcatalog:Staged;IC_EUROPE;EUR;111;hwcatalog:Staged;1;
;HW2120-0341:hwcatalog:Staged;IC_EUROPE;EUR;99;hwcatalog:Staged;3;
;HW2120-0341:hwcatalog:Staged;IC_EUROPE;EUR;77;hwcatalog:Staged;5;
;HW2120-0341:hwcatalog:Staged;IC_US;EUR;111;hwcatalog:Staged;1;
;HW2120-0341:hwcatalog:Staged;IC_US;EUR;99;hwcatalog:Staged;3;
;HW2120-0341:hwcatalog:Staged;IC_US;EUR;77;hwcatalog:Staged;5;

##############################################################################
# Assign userprice group to b2bUnits
##############################################################################
"update B2BUnit";"uid[unique=true,allownull=true]";"userPriceGroup(code,itemtype(code))"
;"IC Sales DE";"IC_EUROPE:UserPriceGroup"
;"IC Sales UK";"IC_UK:UserPriceGroup"
;"IC Sales US";"IC_US:UserPriceGroup"

 Note
After you load the script, you have to synchronize the data. For more information on synchronization, see Synchronizing Catalogs.

Visibility of Products Based on B2B Unit


The example below illustrates how to assign the visibility of a category to a B2BUnit of GC organization, and how to assign products to the category.

$catalogversion=catalogversion(catalog(id[default='hwcatalog']),version[default='Staged'])[unique=true,default='hwcat
$supercategories=supercategories(code,catalogversion(catalog(id[default='hwcatalog']),version[default='Staged']))
$thumbnail=thumbnail(code,catalogversion(catalog(id[default='hwcatalog']),version[default='Staged']))

INSERT_UPDATE category;code[unique=true];$catalogversion;name[lang=de];name[lang=en];$supercategories;$thumbnail;desc
;specials;;;Specials;;;;;5

INSERT_UPDATE category;code[unique=true];$catalogversion;allowedPrincipals(uid);
;specials;;GC;

########## mainboards ############


INSERT_UPDATE product;code[unique=true];$catalogversion;$supercategories;
;HW2200-0561;;specials
;HW2200-0623;;specials
;HW2200-0812;;specials
;HW2200-0521;;specials
;HW2200-0878;;specials

 Note
After you load the script, you have to synchronize the data. For more information on synchronization, see Synchronizing Catalogs.

Related Information
catalog Extension
ImpEx
Catalog Guide
Setting Customized Prices
Setting Product Visibility

B2B Orders
The following sections discuss the technical aspects of order management within the B2B Commerce Module. The technology behind orders is
based on the basecommerce extension services.

For more information on the basecommerce extension, see basecommerce Extension.


https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 109/118
1/9/2020
Order Replenishment
The order replenishment is used to create orders that should be placed on a scheduled basis. For replenishment orders the same rules apply as when
placing an order using the front end, especially the approval process should be executed. You can nd more information on order replenishment in
About Replenishment and Order Scheduling.

In order to make sure that the con gured approval process is executed when an order is placed using the scheduled order job, the
b2bOrderService is injected into the orderUtility, which in turn is used by the order replenishment when placing an order. This is shown in
the following example from b2bstore-spring.xml.

<!-- for order replenishment we need to inject b2b version of order service
into this bean. -->
<bean id="orderUtility"
class="de.hybris.platform.orderscheduling.impl.DefaultOrderUtilityImpl">
<property name="modelService" ref="modelService" />
<property name="orderService" ref="b2bOrderService" />
</bean>

To avoid side effects, the b2bOrderService is made context-aware and checks if an order is placed in a B2B context by checking the user being
from type b2bcustomer.

The following is an example from the DefaultCartFacade of the B2B Commerce Module that creates a scheduled order from a cart:

public CartToOrderCronJobModel scheduleOrderFromCart(final AddressData deliveryAddress, final TriggerModel trigger)


throws InvalidCartException
{
final CartModel cart = b2bCartService.getSessionCart();
final CartModel clone = modelService.clone(cart);
<...>
b2bCartService.removeSessionCart();
return scheduleOrderService.createOrderFromCartCronJob(clone, delivery, null, null, Collections.singl
}

Cloning the cart is necessary to make sure the cart does not get removed when the session is closed. There were no extra WCMS components
necessary to include scheduling functionality it was incorporated as a part of the checkout process.

For more information on creating a scheduled order, see About Replenishment and Order Scheduling.

Returns
The returns feature of B2B Commerce uses the order management return service. For more information, see Return Service Con guration.

Here is an example taken from the B2B store. Note that the return process was simpli ed, so all return requests get an immediate refund for reason
GOODWILL, with no need for Customer Service interaction or additional WCMS components. To request a return, the B2B store simply adds a drop-
down on the order view in question to each remaining product in order. The following is an example of the OrderReturnController.

private String prepareReturns(final OrderReturnInfo data)


{
ReturnRequestModel request = null;
final String rma = null;

for (int i = 0; i < data.getReturnQuantities().size(); i++)


{
if (data.getReturnQuantities().get(i) > 0)
{
final OrderModel order = orderApprovalFacade.getOrderByCode(data.getOrderCode());
if (request == null)
{
request = returnService.createReturnRequest(order);
request.setRMA(returnService.createRMA(request));
}
// This automatically created a refund
returnService.createRefund(request, order.getEntries().get(i), "no.1",
Long.valueOf(data.getReturnQuantities().get(i)), ReturnAction.IMMEDIA
}
}
return rma;
}

Checkout
https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 110/118
1/9/2020
The main difference between the B2B checkout and the B2C checkout scenarios is the need to have a cost center set on the order line items, and
that an approval process is started after the order is placed.

The B2B checkout process is based on the standard checkout process offered with SAP Commerce. For more information about order services in the
hybris basecommerce extension, see basecommerce Extension.

The ERP OCI Checkout is implemented using technology offered in the hybris oci extension. For more information, see oci Extension documentation.

Cost Center

The cost center is set when a product is added to the cart:

public void addToCart(final String productCode, final long quantity, final String costCenterCode)
{
final B2BCostCenterModel costCenter = b2bCostCenterService.getCostCenterForCode(costCenterCode);
<...>

Approval Process

After placing an order, the approval process starts. The following is an example of the DefaultB2BPlaceOrderStrategy.

public OrderModel placeOrder(final CartModel cart, final AddressModel deliveryAddress, final AddressModel paymentAddr
final PaymentInfoModel paymentInfo) throws InvalidCartException
{
final OrderModel order = this.getPlaceOrderStrategy().placeOrder(cart, deliveryAddress, paymentAddres

final Map<String, Object> contextParams = new HashMap<String, Object>();


contextParams.put(ProcessengineConstants.EVENT_AFTER_WORKFLOW_PARAM_NAME,
B2BCommerceConstants.APPROVAL_WORKFLOW_COMPLETE_EVENT);

final B2BApprovalProcessModel aprovalProcess = (B2BApprovalProcessModel) businessProcessService.creat


String.valueOf(processCodeGenerator.generate()), this.getApprovalProcessName(), conte
aprovalProcess.setOrder(order);
this.getModelService().save(aprovalProcess);
businessProcessService.startProcess(aprovalProcess);
return order;
}

Using the injected strategy, the con gured process is started. You de ne which process the system starts in the approvalProcessName Spring
property. The following is an example from b2bcommerce-spring.xml.

<bean id="defaultB2BPlaceOrderStrategy"
class="de.hybris.platform.b2b.strategies.impl.DefaultB2BPlaceOrderStrategy"
parent="abstractBusinessService">
<property name="placeOrderStrategy" ref="placeOrderStrategy" />
<property name="businessProcessService" ref="businessProcessService" />
<property name="processCodeGenerator" ref="processCodeGenerator" />
<property name="approvalProcessName" value="approval" />
</bean>

This way you can con gure and execute custom processes.

For more information on order approvals, see b2bapprovalprocess Extension

Delivery
B2B Commerce delivery makes use of default order management classes. Find more information on order management in Cart & Checkout
documentation. For technical information refer to basecommerce Extension documentation.

Invoicing
The B2B Commerce invoicing uses the standard Web Services API. For information on the Web Services API, see Key Features and Implementation
Details.

Sample Calls
This section contains examples of Web Services use in B2B.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 111/118
1/9/2020
Example 1: Retrieve B2BBookingLineEntries booked during time range.

http://localhost:9001/ws410/rest/b2bbookinglineentries?b2bbookinglineentries_query={bookingDate} >= '2010-04-15' AND

The encoded URL looks as follows:

http://localhost:9001/ws410/rest/b2bbookinglineentries?b2bbookinglineentries_query=%7BbookingDate%7D%3E%272010-04-15%

Example 2: Retrieve B2BBookingLineEntries for cost center.

Add the PK of the desired cost center:

http://localhost:9001/ws410/rest/b2bbookinglineentries?b2bbookinglineentries_query={costCenter} LIKE '8796093556498'

The encoded URL looks as follows:

http://localhost:9001/ws410/rest/b2bbookinglineentries?b2bbookinglineentries_query=%7BcostCenter%7D%20LIKE%20'8796093

Example 3: Select all booking line entries billed by any cost center of a particular B2B unit

Add the PK of the unit:

b2bbookinglineentries?b2bbookinglineentries_query={costCenter} in ({{ select {PK} from {b2bcostcenter} where {unit} L

The encoded URL looks as follows:

http://localhost:9001/ws410/rest/b2bbookinglineentries?b2bbookinglineentries_query=%7bcostCenter%7d%20in%20(%7b%7b%20

For more information refer to Web Service API - Extended Collection document.

Related Information
About Replenishment and Order Scheduling
Return Service Con guration
Web Service API - Extended Collection

b2bcommercefacades Extension
The b2bcommercefacades extension provides a number of facades that are backed by the services in the b2bcommerce extension.

This facade has been migrated from b2bacceleratorfacades and refactored into smaller facades, where applicable, in order to have a cleaner
separation of concern.

 Note
An SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure to limit your
implementation to the features de ned in your contract license. In case of doubt, please contact your sales representative.

B2B Facades
The following facades expose B2B services from the b2bcommerce extension:

B2BBudgetFacade

B2BCostCenterFacade

B2BUnitFacade

B2BUserFacade

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 112/118
1/9/2020
B2BUserGroupFacade

b2badmincockpit Extension
The b2badmincockpit extension provides the B2BAdmin perspective for the SAP Commerce Administration Cockpit, which lets you manage a
broad range of B2B features in the SAP Commerce.

The b2badmincockpit extension is created using the SAP Commerce Cockpit framework. This means you can also use the customization options
described in the cockpit Extension. Depending on the complexity of customization tasks they are divided into three different categories: easy,
medium and expert customization level.

 Note
An SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure to limit your
implementation to the features de ned in your contract license. In case of doubt, please contact your sales representative.

Organization Wizard
The organization wizard allows an administrator to easily create an organization and its constituent components. With input from the admin, the
wizard creates the following:

Root Unit

Unit Address

B2B Administrator

Account Manager

Cost Center

Budget

Credit Limit

Approval Strategy

The new thing added to the already existing features from the cockpit extension is the Create organization wizard.

To launch the wizard, sign in to the SAP Commerce Administrator Cockpit, go to the B2BAdmin perspective and click the Create organization
button.

For more information, see Creating B2B Organizations with the Wizard.

Wizard Code
The organization wizard consists of 3 components:

Page controllers and a page class for each of the wizard pages.

Bean de nitions.

ZUL les

Page Controllers and a Page Class


The AbstractB2BOrganizationWizardPageController provides the SessionService, generalized data validation, and getter/setter/remove methods
for each of attributesToValidate stored in the sessionService. The generalized validation consists of ensuring that speci ed elds in the wizard are
not blank, see Bean De nitions section for info on how to specify which elds are mandatory.

Many of the wizard pages have a corresponding class that extends the AbstractB2BOrganizationWizardPageController. In addition to providing
getter methods used for displaying page-speci c information, you can create more speci c page-related data validation in the corresponding page
class by overriding the validate method. Note, data validation occurs during the transition from each page of the wizard. Also, if you do not need to
display page speci c information or provide specialized validation, you do not need a corresponding page class.

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 113/118
1/9/2020
The Create organization wizard then creates each item in the B2BOrganizationWizardPageController after all of the pages were validated.

Bean De nitions
All of the relevant beans are de ned in the b2badmincockpit-web-spring.xml. Some things to note:

Every page in the wizard must have a corresponding bean. Point the bean to the AbstractB2BOrganizationWizardPage if you do not create a
page class.

The attributes you want validated are speci ed in each page corresponding bean. Additionally, any attribute you want validated is a
mandatory eld that must be completed. For example, in the code below, the wizard attempts to validate postalCode, town, streetName, and
streetNumber.

Each wizard page bean must specify an id property that identi es the page and a componentURI property that points to a corresponding ZUL
le. Find more information on in the ZUL Files section below.

The attribute sets stored in the session are declared in "organizationWizardPageController".

The following is an example of the b2badmincockpit-web-spring.xml le.

<bean id="addressWizardPage"
class="de.hybris.platform.b2badmincockpit.wizards.impl.AbstractB2BOrganizationWizardPage"
scope="prototype">
<property name="id" value="address" />
<property name="componentURI" value="address.zul" />
<property name="attributesToValidate">
<list>
<value>postalCode</value>
<value>town</value>
<value>streetName</value>
<value>streetNumber</value>
</list>
</property>
</bean>

ZUL Files
The layout and display of the wizard is governed by the ZK framework. As such, each of the wizard's pages requires a corresponding .zul le that is
stored in resource/cockpit/wizards. Please refer to zkoss for documentation regarding the ZK framework.

The ZUL le for the the page above can be found below. Notice that you must de ne each eld in the ZUL le. Each eld label is declared in the
b2badmincockpit.localization.i3-label.properties le. Most importantly, pageBean.setAttribute("attributeName", event.value)
sets the attribute that is later accessible in B2BOrganizationWizardPageController. Attributes that do not need to be validated do not need to be
declared elsewhere. Every attribute is set using pageBean.setAttribute().

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 114/118
1/9/2020

<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver" ?>

<zk xmlns="http://www.zkoss.org/2005/zul" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"


xmlns:h="http://www.w3.org/1999/xhtml" xmlns:zk="http://www.zkoss.org/2005/zk"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd ">
<div style="text-align: left;" onCreate="wizardBean.setShowNext(true);
wizardBean.refreshButtons();">
<div style="padding: 20px; border-bottom: 1px solid #ccc;">
<label value="${c:l('cockpit.wizard.createorganization.common.pleasedefine')}" />
</div>

<div height="20px" style="text-align: right;">


${c:l('cockpit.wizard.createorganization.required')}
</div>

<div style="margin: 30px; margin-top: 20px; font-size: 10px;">


<hbox widths="80px,none">
<label value="${c:l('cockpit.wizard.createorganization.common.id')}" />
<textbox onCreate='self.setValue(pageBean.getAttribute("uid"));'
onChange='pageBean.setAttribute("uid", event.value)' />
</hbox>
</div>

<div style="margin: 30px; margin-top: 20px; font-size: 10px;">


<hbox widths="80px,none">
<label value="${c:l('cockpit.wizard.createorganization.common.name')}" />
<textbox onCreate='self.setValue(pageBean.getAttribute("name"));'
onChange='pageBean.setAttribute("name", event.value)' />
</hbox>
</div>

<div style="margin: 30px; margin-top: 20px; font-size: 10px;">


<hbox widths="80px,none">
<label value="${c:l('cockpit.wizard.createorganization.common.desc')}" />
<textbox onCreate='self.setValue(pageBean.getAttribute("description"));'
onChange='pageBean.setAttribute("description", event.value);' />
</hbox>
</div>

<div style="margin: 30px; margin-top: 20px; font-size: 10px;">


<hbox widths="80px,none">
<label value="${c:l('cockpit.wizard.createorganization.common.contactperson')}" />
<textbox onCreate='self.setValue(pageBean.getAttribute("contactPerson"));'
onChange='pageBean.setAttribute("contactPerson", event.value);' />
</hbox>
</div>
</div>

</zk>

Related Information
B2B Commerce Module
cockpit Extension
b2bcommerce Extension

B2B API AddOn for OCC


The B2B API AddOn for Omni Commerce Connect (OCC) provides API access to B2B-speci c functionality, such as multi-dimensional product
information. Functionality is provided by the b2boccaddon.

When the b2boccaddon AddOn is enabled, standard OCC resources are replaced by B2B API AddOn for OCC resources wherever functionality is
B2B-speci c. Getting product details from a B2B site, for example, includes multi-dimensional product information, something that is only available
through B2B. The B2B API AddOn for OCC also adds new resources to provide access to other B2B-speci c features like organization management.
For example, B2B sites allow customers to place account orders that require selection of a cost center.

For more information, see the following:

Omni Commerce Connect

b2boccaddon

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 115/118
1/9/2020

Overview of B2B actions performed through the B2B API AddOn for OCC
Authenticatation

Get a list of categories and products

Get product details

Get the current cart

Add products to the cart

Update quantities in the cart

Delete items from the cart

Place orders using an account and specifying a cost center

Get users, cost centers, and other organization management information

The B2B API AddOn for OCC was originally created to satisfy API requirements of B2B mobile client development. However the B2B API AddOn for
OCC is not restricted to mobile usage.

Further Information
For information on installing the AddOn, see b2boccaddon AddOn.

For API documentation, see B2B API AddOn for OCC - API Reference.

For OCC features not speci c to B2B, see the API documentation in Omni Commerce Connect Module.

Related Information
b2boccaddon AddOn
B2B API AddOn for OCC - API Reference
ycommercewebservices Extension
Calls Reference - v1
v1 and v2 in ycommercewebservices
SAP Commerce Mobile App SDK

b2boccaddon AddOn
The B2B API AddOn for OCC (b2boccaddon) provides API access to B2B-speci c functionality, such as multi-dimensional products and
organization information. When this AddOn is enabled, standard OCC resources are replaced by B2B REST API resources wherever functionality is
B2B-speci c.

 Note
An SAP Commerce extension may provide functionality that is licensed through different SAP Commerce modules. Make sure to limit your
implementation to the features de ned in your contract license. In case of doubt, please contact your sales representative.

AddOn De nition

Name b2boccaddon

Description This AddOn is responsible for providing B2B-speci c API resources.

Requires
commercewebservicescommons Extension

b2bacceleratorfacades Extension - Deprecated

Author SAP

Supported Markets and Channels

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 116/118
1/9/2020

Supported B2C Commerce B2B Telco


Commerce Commerce

Market

Channel Desktop: Desktop: Desktop:

Mobile: Mobile: Mobile:

Installing the B2B API AddOn for OCC


To install the addon using addoninstall:

1. Ensure that b2boccaddon and ycommercewebservices are listed in config/localextensions.xml and that the entries are not
commented out, as shown in the following example.

...
<extension name="b2boccaddon" />
<extension name="ycommercewebservices" />
...

2. Run the following ant task:

ant addoninstall -Daddonnames="b2boccaddon" -DaddonStorefront.ycommercewebservices="ycommercewebservices"

3. Rebuild (that is, run ant all), then update or initialize the system.

 Note
For further information on installing OCC AddOns, see:

Creating an AddOn for OCC Web Services

Installing an AddOn for a Speci c Storefront

Important Note about version 5.5.1 and higher


The cmsoccaddon addon supports only basic B2B extensions. If you need to display addons, the mappings need to be added.

For example, to support accountsummaryaddon, add the following to cmsoccaddon-beans.xml:

<!-- AccountSummaryAccountStatusComponent -->


<bean class="de.hybris.platform.cms.occ.data.AccountSummaryAccountStatusComponentData"
extends="de.hybris.platform.cms.occ.data.ComponentData">
<property name="gridViewPageSize" type="Integer"/>
<property name="listViewPageSize" type="Integer"/>
</bean>
<!-- AccountSummaryUnitTreeComponent : use ComponentData -->

<!-- AccountSummaryAccountStatusComponent -->


<bean parent="fieldSetLevelMapping">
<property name="dtoClass"
value="de.hybris.platform.cms.occ.data.AccountSummaryAccountStatusComponentData" />
<property name="levelMapping">
<map>
<entry key="BASIC" value="uid" />
<entry key="DEFAULT" value="BASIC,name,type,actions,gridViewPageSize,listViewPageSize
<entry key="FULL" value="DEFAULT,catalogVersion,onlyOneRestrictionMustApply" />
</map>
</property>
</bean>

<!-- AccountSummaryUnitTreeComponent -->


<!-- AccountSummaryAccountStatusComponent -->
<bean parent="fieldMapper">
<property name="sourceClass"
value="de.hybris.platform.accountsummaryaddon.model.AccountSummaryAccountStatusComponentModel
<property name="destClass"
value="de.hybris.platform.cms.occ.data.AccountSummaryAccountStatusComponentData" />
<property name="fieldMapping">
<map />
</property>

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 117/118
1/9/2020
</bean>

<!-- AccountSummaryUnitTreeComponent -->


<bean parent="fieldMapper">
<property name="sourceClass"
value="de.hybris.platform.accountsummaryaddon.model.AccountSummaryUnitTreeComponentModel" />
<property name="destClass"
value="de.hybris.platform.cms.occ.data.ComponentData" />
<property name="fieldMapping">
<map />
</property>
</bean>

Related Information
B2B API AddOn for OCC - API Reference
ycommercewebservices Extension
Calls Reference - v1
v1 and v2 in ycommercewebservices

B2B API AddOn for OCC - API Reference


The B2B API AddOn for OCC provides API access to B2B-speci c functionality such as multi-dimensional product information. Functionality is
provided by the b2boccaddon.

For more information, see b2boccaddon AddOn.

 Note
For features not speci c to B2B, see OCC API Documentation Reference.

API Reference
You can download the ZIP of the API documentation here: B2B API AddOn for OCC API documentation ZIP le

Sample Responses
A REST client is required to generate sample responses. Postman is an example of a REST client that you can download for Google Chrome. A sample
URL looks like the following: https://dev-b2bmobile-
3.yrdrt.fra.hybris.com:9002/rest/v2/powertools/catalogs/powertoolsProductCatalog/Online/categories/1800

You receive a response for GET, POST, PUT, DELETE, and any other action supported by the web service.

Related Information
b2boccaddon AddOn
OCC API Documentation Reference
ycommercewebservices Extension
Calls Reference - v1
v1 and v2 in ycommercewebservices

https://help.sap.com/http.svc/dynamicpdfcontentpreview?deliverable_id=21691319&topics=8b5e53e0866910149645effe… 118/118

You might also like