Knowledge Hub
Algolia Builder Module

Guide

Algolia Builder Module

August 30, 2016  

5 min read

The Algolia Builder Module can be coupled with any front-end application to support effectiveness of search experience.

Overview

The Algolia Builder Module can be coupled with any front-end application. It has the following features: Relevance Relevance is important. If users cannot find a product, they won't buy it! Algolia Search performs a search by relevance, which increases customer satisfaction significantly. Speed Customers want information quickly, or they might seek out the competitors. Algolia Search delivers lightning-fast results to your customers, anywhere in the world, thanks to an Algolia distributed search network. Typo tolerance Everyone can make a typo, but with Algolia Search, the typo does not prevent customers from finding the products they are looking for because there is typo tolerance built in. Auto-completion menu Implement a rich, auto-completion menu for fast search results. It speeds up customer interactions because it correctly predicts the word the customer starts to type, in real time. Analytics Get valuable information on how your customers are searching, and what they are searching for from an easy-to-use dashboard. You can identify valuable site visitations, and understand your customer's intent. By monitoring popular keywords, the search results history, and the affiliated marketing statistics, you can identify trends that constantly improve the customer experience. About Algolia To find out more about Algolia, visit the website: www.algolia.com

Installation

There are just few steps you must follow to install the Algolia Builder Module properly: Create an Algolia account in www.algolia.com website and select a plan. Subscribe to the Product Content package from the YaaS Market. Configure the Algolia Builder Module synchronization through the Algolia Settings panel in Builder: 3.1 Choose your project. 3.2 Select Commerce Settings > Algolia Settings 3.3 Input the Index Name of the index created in the Algolia dashboard. Users must create index in the Algolia dashboard before they can specify it by name in the Algolia Builder Module. Also, Search API Key and Write API Key should have permissions to use the specified Index Name in the context of the Application ID. 3.4 Copy the Algolia credentials from your Algolia account dashboard into the Algolia Settings in Builder for Application ID, Search API Key, and Write API Key. The image below presents credential settings in the Algolia account dashboard. 3.5 To activate indexing, go to Algolia Settings in the Builder, and select one or more required option(s) in section Include in index: Published products for Builder and Storefront search Non-published products for Builder search 3.6 If you are using the YaaS Storefront, the front-end implementation is built in. If not, use the JavaScript libraries below: https://github.com/algolia/autocomplete.js https://community.algolia.com/instantsearch.js

Configuration

Configuring the Algolia Builder Module in Builder The image below presents an example of the configuration of the properly installed Algolia Builder Module. Search-Only API Keys Both Storefront Search-Only API Key and Builder Search-Only API Key are generated based on the given Search API Key. Let's see what user is allowed to do with help of those keys: Storefront Search-Only API Key: Search for published products Builder Search-Only API Key: Search for all products, both published and unpublished Users can re-generate those keys based on the appropriate Search API Key by clicking REGENERATE SEARCH API KEYS. Next, the user is asked to provide Search API Key, see the picture below. If user changes settings in such a way that new keys are required, the system will ask the user to provide necessary data, as shown in the following picture. Re-indexing product data Newly added products are indexed on the fly. To do so, the Algolia Builder Module follows the Include in index setting. Selecting any of the Include in index settings makes the REINDEX PRODUCT DATA label appear at the bottom. If necessary, users can run the product indexing manually, by clicking REINDEX PRODUCT DATA. If changing the settings results in need of re-indexing the products, the system will inform the user with the dialog shown in the next picture. Old projects and Search-Only API key The old projects, if exist, may still be configured to use the Search-Only API Key. See the Algolia Settings example shown in the following picture. If settings are changed, Storefront Search-Only API Key and Builder Search-Only API Key keys can be generated. When this happens, Algolia Builder Module will be able to perform search, using those keys. Keep in mind that the Storefront Search-Only API Key and Builder Search-Only API Key must be generated with help of a new Search-Only API Key. The old Search-Only API Key should be removed. Configuring the Algolia Builder Module in Algolia dashboard. Default search uses all attributes. Users can change it in the Algolia Dashboard under: Indices > Ranking. See t he picture for an example. There are more sorting strategies, see the below picture: From the Algolia dashboard, create as many Algolia slaves as you want for sorting strategies Update the front-end code to use the appropriate slave, depending on the selected sorting strategy With Algolia's auto-complete search, customers think less about how to search, and think more about what they find. The search returns relevant content from the first keystroke, in only a few milliseconds, as seen in the example below:
C4C Replication Scheduler

Guide

C4C Replication Scheduler

November 08, 2016  

4 min read

A step-by-step guide to the SAP Hybris Cloud for Customer(C4C) Replication Scheduler

Overview

Having Master data in sync is very important when we are developing integration between systems. For any customer who has subscribed to the C4C – Foundation package, it has a feature which can be used to replicate Customers from YaaS into SAP Hybris Cloud for Customer(C4C) system. Use the Scheduler service to keep customer information consistent across YaaS and SAP Hybris Cloud for Customer. The replication scheduler Builder module provides a user interface (UI) in which you can interact with and consume the Replication Service. The builder module allows you to view, manage and create new schedules. To view the replication scheduler builder module, assign the hybris.scheduler-service_manage scope to the user. After you schedule replication from YaaS to SAP Hybris Cloud for Customer, you can: View the list of schedule runs View, edit, and create schedule runs Activate new schedule runs Set active schedule runs to obsolete View jobs created for a particular schedule run View logs generated for a particular job within a schedule run Create a new schedule run Once the C4C – Foundation package is subscribed in a project, the project owner can see the Replication Builder Module coming up in the left navigation. In the Replication Scheduler screen, click Create New to open the Create New Scheduler Run window. Enter these details: Run ID : A unique identifier that is distinct for each run Description : Description of the run The system automatically populates the Run Category , Job Type ,and Run Type fields with these values: Run Category: Delta Job Type: Replication of Individual Customer Run Type: Immediate If you select Run Category: Initial Load , the system replicates the existing customers in SAP Hybris Cloud for Customer. The system will not automatically add newly-created customers after this schedule run. If you select Run Category: Delta , the system replicates the changed or newly-created customers in SAP Hybris Cloud for Customer. The system will not re-add previously replicated customers with this schedule run. Click in the Run Type field. You can select Run Type: Recurring or Run Type: Single Run. If you select Run Type: Recurring , define these fields: Recurrence Frequency : Frequency of the job to be triggered Recurrence Parameter : Specifies the number of times the Run is executed in the given frequency. If you select Recurrence Fequency: Daily, then the Recurrence Parameter is set as 1. It cannot be changed. Start Date: Replication start date Start Time: Replication start time End Date: Replication End date End Time: Replication End time Time Zone: Time zone If you select Run Type: Single Run , define these fields: Start Date: Replication start date Start Time: Replication start time Time Zone: Time zone The schedule run is now configured, but it is not yet active. Click Save to commit the changes. You can also click Save and Activate to commit and activate your updates immediately. Now you will be able to see the newly created schedule run in the list. To activate schedule run, select ACTIVATE from the right menu. The schedule run setup is complete. View Job Details You can view all the details of a selected schedule run. Click on a Run ID to open the details of the selected run. The JOBS tab lists these details: Job ID : A unique autogenerated identifier that job Processing Status: Specifies the state of job Maximum Severity: Shows whether the job ran successfully, has warnings, or failed Started On: Job start date and time Finished On: Job end date and time Error Count: Specifies the number of unsuccessful executions Warning Count: Specifies the number of warnings Success Count: Specifies the number of successful executions View Job Logs Click on a Job ID to view the job logs. The system displays these details: Status: Shows whether the job has run successfully, has warnings, or failed. Object ID: Specifies the id of the customer that is replicated. Message: Specifies the log content. Once the configuration is maintained successfully, customers details will be replicated from YaaS to SAP Hybris Cloud for Customer(C4C) system according to the configuration.
Commerce as a Service Guide

Guide

Commerce as a Service Guide

August 30, 2016  

12 min read

Learn about the services that make up CaaS, how they integrate with one another, and how to extend them.

Overview

The Commerce as a Service Guide provides you with all the information you need to: Understand the different commerce packages and the services that come in those packages. Understand how and which services interact with one another. Extend certain services and understand the logic to customizing the services to accomplish your needs. Understand how APIs work.

Commerce Packages

The commerce packages consists of services that enable you to: Configure and set up your storefront. Add products to your store. Have customers add products to their shopping cart. Have customers checkout their order. Ship the order to the customer. The services are divided into the following packages: Cart Checkout Coupon Management Customer Accounts Order Management Product Content Site Management Each commerce package is accompanied by a corresponding Builder module that lets you use those services within Builder. The Storefront template can be your starting point for some front-end development. You can use the Builder and the Storefront user interface to set up the majority of the site, but, as a developer, you can use the list of APIs which accompanies each service and can be found in each service's documentation in the API Docs section. The following tables describe the services in each of packages and includes information on the services that they interact with. Cart package The Cart package consists of the Cart and Cart Calculation services. Service Description Interacts With Cart Manages the customer's cart and the items within the cart. Checkout, Coupon, Customer, Product, Price, Tax, Avalara Tax, Shipping, and Site Cart Calculation Calculates the total of the customer's cart. Cart, Checkout, Tax, Avalara Tax, Site, and Shipping Checkout package The Checkout package consists only of the Checkout service. Service Description Interacts With Checkout A mashup service that takes the items in the customer's cart, calculates the order, captures the payment, and creates an order for the seller. Configuration, Cart, Email, Site, Shipping, Stripe Payment, Tax, Avalara Tax, Coupon, PubSub, and Order. Coupon Management package The Coupon Management package consists only of the Coupon service. Service Description Interacts With Coupon Issues a discount code to the customer that they can apply on their order. This discount is applied to the order calculation during checkout. Cart, Checkout, and Customer Customer Accounts package The Customer Accounts package consists only of the Customer service. Service Description Interacts With Customer Manages the customer's account and details about the customer. Cart, Coupon, Order, Site, Schema, and PubSub Order Management package The Order Management package consists only of the Order service. Service Description Interacts With Order Manages the order flow. It serves as the primary order storage system and exposes events and notifications for connected fulfillment systems. Checkout and Email Product Content package The Product Content package consists of the Algolia Search, Product, Product Details, Category, Price, and PCM services. Service Description Interacts With Algolia Search Use this service to create a product index of all your active products and allow your customer to search for them in your storefront. Category, Product, Account, and Configuration Category Creates groups to help you organize the products in your store. Product, Product Details, and Algolia Search PCM The Product Content Management (PCM) service supports the user interface application to manage the product content. Algolia Search, Category, and Schema Price To assign a price value in different currencies to a specific product. Product Product To add products and their corresponding images to the store. Algolia Search, Cart, Category, Price, Product Details, and PubSub Product Details A mashup service that takes the information from the Product, Price, and Category services to show you the details of all of the products in your inventory. Product, Price, and Category Site Management package The Site Management package consists of the Site, Tax, Avalara Tax, Stripe Payment, and Shipping services. Service Description Interacts With Avalara Tax This is a combination of the third-party Avalara product with the Avalara Tax service, which calculates the taxes based on the shipping address and the list of items in the cart. This service can only be used for customers in Canada or the United States. Site, Cart, and Checkout Shipping A rate charged to the customer to have their order shipped to them. Checkout and Site Site A collection of language, currency, shipment, payment, and tax configurations. For shipping, payment, and tax, you can have a third-party provider and use the corresponding service to extend it to your site. Avalara Tax, Cart, Shipping, Stripe Payment, and Tax Stripe Payment Works with the API from Stripe to charge the customer's credit card when they make a purchase. The Stripe Payment service needs to be configured in the Site service for it to be used. Checkout and Site Tax A default single-rate tax that is applied on the items in an order. Other tax codes can override the default rate. The tax is configured in the Site service. Cart, Checkout and Site For more detailed information about each of these services, see the API Docs section.

Extension Point and Custom Logic

Apart from the basic service functionality, you have the ability to customize or extend the service to suit your needs. This section of the guide shows you: How to use events as alerts between services to indicate when an action needs to be taken. How to use mixins to create additional attributes. The extra attributes can let you add more details to your services where it is needed. How third-party services are integrated with some of the commerce services to provide you with ease of payment capture, tax calculation, and applying a search engine to your store. Events Events are instances that occur in one service that another service needs to be aware of. One service is known as the publisher or the creator of the event. The other service is known as the consumer or the service that is interested in the event. In order for the consumer service to know that an event has occurred, you need the PubSub service to act as the messaging service. To publish, read, and commit events, you need to ensure the following: Create a topic. Topics are triggers for events. Topics have already been created for services that have events. To create new topics for your own service, see Create a new topic. Ensure the events are being published. See Publish an event. The consuming service reads the event. See Read the event. Once the events are read, they need to be commited as proof of delivery to the client. See Commit the event. Currently the following services have events: Category Checkout Coupon Customer Order Product Currently, you cannot create new events for the services in the commerce packages. Mixins Mixins let you add additional attributes to your service. Once you define a set of attributes for a service, you can reuse them again. For example, in the Product service, you can use mixins to create an additional category to group your products. The following are the services in which you can use mixins. Each service describes how mixins can enhance your service: Cart Customer Order Product Site Third-party providers The Site Management and Product Content packages provide you with services that use a third-party service to search the store's products, calculate the tax, and complete the payment for a customer's order. Currently, the following third-party services are provided: Algolia Search Avalara Tax Stripe Payment Create a Service. Your new application needs to be configured in the Site service before you can use it. --> Algolia Search Algolia Search uses a third-party service (Algolia) to enable customers to search through a store's merchandise. Algolia applies data indexing to the active store products that lets customers find products with ease. To use this service, you need to create an account with Algolia, set your configurations, and create the data indexing information for your products. For more details, see Algolia Search. Avalara Tax There are currently two tax services in the Site Management package: Tax Avalara Tax Avalara Tax applies tax on the items in an order. This service works with the Avalara API to calculate the taxes on the order. It uses the shipping destination address to calculate the tax. For this reason, you can only calculate taxes for Canada and the United States. For Avalara Tax to work, you need to create an account with the third-party provider (Avalara) before you configure the service in the Site service. For more details, see Avalara Tax. Stripe Payment The Stripe Payment service lets you complete an order by charging the customer's credit card. The Checkout service uses the Stripe Payment service along with the Stripe API to create an order. As with the other third-party services, you need to create an account with Stripe and configure the service in the Site service before you can use it. For more details, see Stripe Payment.

Example of API Calls

There are a couple of ways that you can maintain your storefront; you can use the Builder, or you can use the APIs. To show you how easy it is to use the APIs, here's an example of how to checkout a cart and create an order using API calls. For this example to work: Your website must be set up and deployed. The products and their prices must be set up for the website. Tax, payment provider, and shipping cost must be configured in the Site service. This process adds an item to the cart, completes the checkout, and creates an order. Create a token. Create a cart. Add an item to the cart. Checkout the cart. This includes: Validate the cart information. Validate the coupon (if applicable). Redeem the coupon (if applicalble). Capture the payment. Place the order and complete the checkout process. Create a token Before you can start to make any API calls, you need to create an authentication (OAuth2) token. This token is only active for one hour once it is created. To create an authentication token, see Get an Access Token. This token is needed to complete the remaining calls. For more information on OAuth2 and tokens, see OAuth2. Create a cart When a customer begins shopping on the website, a cart needs to be created before they can add an item to the cart. The customer can shop as an anonymous shopper or they can create/log in to their account. In this example, we are going to assume this is a registered customer with an account. Method: POST Request URL: https://api.yaas.io/hybris/cart/v1/{tenant}/carts Example: { "customerId": "C12345", "currency": "USD" } Add an item to the cart The customer found a dress she wants to add to her cart. This call adds the dress to her cart. Method: POST Request URL: https://api.yaas.io/hybris/cart/v1/{tenant}/carts/{cartId}/items Example: { "product": { "id": "555dfac159ce92ce759c2f2c", "sku": "sfd12324", "name": "Polka Dot Dress", "description": "Short sleeved, black and white polka dot dress", "images": [ { "url": "http://img.sheinside.com/images/sheinside.com/201309/1379214988143179502.jpg" } ] }, "quantity": 1, "price": { "originalAmount": 40.0, "effectiveAmount": 40.0, "currency": "USD", "priceId": "555dfac2acce048c99ca890c" } } Checkout process Completing a checkout is an intricate and complex process where the Checkout service needs to go through numerous validations before an order is created. Though you only execute one call, the call completes the following: Validate the cart information. Validate the coupon (if applicable). Redeem the coupon (if applicable). Capture the payment. Place the order. Method: POST Request URL: https://api.yaas.io/hybris/checkout-mashup/v1/{tenant}/checkouts/order Example: { "payment": { "paymentId": "stripe", "customAttributes": { "token": "tok_162ksr4xLYxmKjcz2rybVBQ8" } }, "addresses": [ { "zipCode": "77043", "country": "US", "streetNumber": "10615", "city": "Houston", "contactName": "Peter Priceless", "street": "Shadow Wood Drive", "companyName": "Hybris", "state": "TX", "contactPhone": "1-976-338-9922", "type": "BILLING" }, { "zipCode": "77043", "country": "US", "streetNumber": "10615", "city": "Houston", "contactName": "Peter Priceless", "street": "Shadow Wood Drive", "companyName": "Hybris", "state": "TX", "contactPhone": "1-976-338-9922", "type": "SHIPPING" } ], "shippingCost": 20, "totalPrice": 60, "cartId": "555dff7deb0e108b167244aa", "currency": "USD", "customer": { "id": "jane.doe@email.com", "name": "Jane Doe", "title": "Miss.", "firstName": "Jane", "middleName": "D.", "lastName": "Jane", "email": "jane.doe@email.com", "company": "SAP" } } Once you make a checkout request, the following events are executed. 1. Validate the cart information The Checkout service executes several checks as it validates the cart information. The following information is checked in this order: The Checkout service checks to see if the cart is empty or not. If it is empty, an error is returned. If it is not, it proceeds to the next step. It validates that the product exists and is available by calling the Product service. It validates that the price is current. It checks that the price and product match and verifies that all the price attributes are valid. It ensures that the item is in stock. It verifies that the shipping cost is valid. It calls the customer service to verify that the customer information is valid. Once these validations are passed, it continues to the coupon validation. 2. Validate the coupon If the seller has a promotion that needs to be applied to the cart or the customer has a coupon that they want to redeem, a call is made to the Coupon service to validate this coupon information. This is an optional service that can be configured in the Coupon service. 3. Redeem the coupon If the customer uses a coupon, the coupon must be redeemed so the customer cannot use it again. A call is made to the Coupon service to redeem the coupon. 4. Capture the payment The Checkout service's next step is to capture the payment. Currently, there is only one payment provider that comes with the Site Management package, which is Stripe Payment. 5. Place the order To complete the checkout, the order must be placed. The cart information is sent to the Order service, and an order ID is created. The Order service then sends the order ID back to the Checkout service. If the order is successfully created, the Checkout service calls the Cart service, and the cart status goes from open to closed. This cart ID can no longer be used. If the order is unsuccessfully created, the Checkout service calls the Configuration service to get the customer's email address. Then the Email service is called, and an email with a checkout ID is sent to the customer to let them know that the order was unsuccessfully created.
Extension Definition Management Builder Module

Guide

Extension Definition Management Builder Module

August 30, 2016  

7 min read

Extension Definition Management Builder Module provides an easy way to customize the product commerce records, with customer-defined, individually created sets of properties that supplement predefined schemas.

Overview

The Extension Definition Management Builder module provides merchants with an easy way to customize the product commerce records, with customer-defined, individually created sets of properties that supplement predefined schemas that come by default with our service. You can use the functionality included in the module after you have subscribed to the Product Content package. After you subscribe to and configure the package, you will be able to - for example - extend the basic definitions of your products by creating custom definitions of new, individually invented properties that can describe any product in any way you want. Another example, referring to the Category service, is extending the category metadata. All categories include properties that come from predefined schemas, but are not limited to them. With Extension Definition Management, you can extend your categories in any way to better reflect even the complex nature of your category structures. When you subscribe to the Product Content package, you can employ the Builder module to extend your products. However, to actually use the extended product records in the Storefront and in the sales flow (which includes orders, carts, and checkouts), you must also subscribe to additional packages such as Site Management, Cart, Order Management, and Checkout.

Extend Product Definition

Let's walk through how, with help of the Extension Definition Management Builder module, you can set up additional information for your basic product attributes. The entire process happens in the Builder, so the first step is to sign in. Sign in to Builder and select a project Sign in to the Builder and go to Projects & Sites, where you can select one of your existing projects or create a new one. To create a new project, click +Project/Site. Next, enter the basic project details, including name, description, and identifier. After you add the required project information, click Save. Your project appears on the Projects & Sites page. Click on your project to open it. Subscribe to the required packages To simply extend your products with help of the Extension Definition Management Builder module, you must subscribe to the Product Content package. To use your extended products as part of a sale flow, including Orders, Carts, and Checkout, you may need to subscribe to additional packages such as Site Management, Cart, Order Management, and Checkout. If your project is not open already, click on it in the Projects & Sites. The Overview page that opens provides basic information about your project, including the project's subscriptions to other YaaS packages. To subscribe to packages, click Subscriptions. You can manage your subscriptions in the page that opens. To add a new subscription, click +Subscription. The YaaS Market page opens, where you can view all available packages. Click on any package to view its details and subscribe. On the package details page, click Subscribe Now. You can only subscribe to one package at a time, so repeat this step for each package subscription you need to add. If you click Subscribe Now without first signing into the Builder and selecting a package, you must select a package to associate with the subscription. If you signed into the Builder and selected a package first, your project is already assigned when you click Subscribe Now. Create a definition with attributes Now that you are subscribed to the Product Content package, it's time to create new definitions. Click Extension/Attribute Definitions in the navigation panel. Click +Definition to start creating new definitions. On the New Definition page, complete the Name, Description, and Purpose fields. While you can add any name and description, the available Purpose field values are defined by your package subscriptions. If you subscribed to all the packages as described in this tutorial, you should see two entries in the Purpose drop-down list: product and category. Select one of these entries to define which commerce records can use your extension. When you are done adding meaningful values for your new definition, click Next. In the next page, there are three tabs: Define, Preview, and JSON schema. In Define, you can create new simple attributes for your definition. In JSON schema, you can paste a properly-formatted JSON schema that provides definitions for more complex attributes. We'll return to this option in the next section, Add complex attributes. In Preview, you can view a simple visual of your attributes. Let's create some attributes for a printer. To add simple attributes, click the Define tab, then click +Attribute. In the pop-up window that opens, define these elements: Label: The name of the new property. Type: The type of the new property, such as text, number, and so forth. Let's say you want to add a property that tells a customer whether the printer belongs to one of two types: mono and color. After you add a meaningful label for the attribute and select its type, you can click +, under Options, to add more values for your new attribute. More values can be used to further define the selection, which, in this example, is a printer. You can add as many attributes as needed. Click Done to save your custom attributes. When you are done adding attributes, click Next to define a branch and add tags to your definition. You must click Save in the top-right corner to save your definition. You have now created a definition and added simple attributes. To add complex attributes, see the topic Add complex attributes. View and manage definitions To view and manage your definitions, click Extension/Attributes Definitions in the navigation panel. Add complex attributes In the previous example, we added a Printer Basic Schema definition that includes simple attributes. But with the huge variety of products in your database, you might need to add attributes that have more complex structures. To add complex attributes, prepare a script that defines the entire structure of your attributes. Then, on the New Definition page, click the JSON schema tab and paste the script into the editor. Click Next. To complete the procedure, follow the steps to add information about the branch and add tags, if needed, as described in the Create a definition with attributes topic. When you are done, click Save. Apply your definitions In the preceding sections, we created a definition of additional attributes for a product. In this exercise, let's apply that definition to an appropriate product. To select a product, click Products in the navigation menu. On the Products page, you can select a existing product, or you can create a new product before proceeding. For the purpose of our example, let's select an existing product, the Brother MFC-563 printer. Each printer has attributes that define it as a product. Some basic attributes can apply to all printers, but some advanced configurations might require less common attributes. This is where our attribute definitions come in handy. We assume you already have a product in your own project. Because the product in our example is a printer, our attribute definitions are named accordingly, for example Printer Basic Schema. Because we chose a relevant name when we created the definition, it should be obvious that this definition extends the set of attributes for a printer when it is time to choose the definition for the product. Select a product. There are three tabs on the page: Details, Images, and Extensions/Attributes. For this example, click Extensions/Attributes. As you can see on the Product Detail page, no definitions are applied to the product initially. However, because you already created a definition, you can click +Definition to select or create a defintion to add to the product. If you choose to create a new definition, use the procedures described in the topics Create a definition with attributes. For now, let's click +Existing. A popup window displays your stored definitions. Remember the Purpose you selected when you created a definition? In that step, because we selected the product value, we can now apply that definition to a product. You can have one or more definitions and you can sort them alphabetically, in ascending or descending order. Check one or more boxes to select the applicable definitions and then click Save. Scroll down the page to view the attributes you added based on the definition(s) you selected. Now, all attributes in the selected definition(s) will be available for this particular product.
Hybris Profile Graph Explorer

Guide

Hybris Profile Graph Explorer

August 19, 2016  

6 min read

The Hybris Profile Graph Explorer is a tool in the SAP Hybris Profile Core Services package that enables visual exploration of the Customer Profile Graph.

Hybris Profile Graph Explorer

SAP Hybris Profile data is stored in a graph database. The graph stores data as nodes, and as relationships among nodes called "edges". View and navigate the data stored in the SAP Hybris Profile graph database using the Graph Explorer tool. Purpose The Graph Explorer is a debugging tool that you can use to examine a small portion of the graph database to verify that profile data is stored with the expected nodes and edges. Because the Graph Explorer is not a business tool, inspecting large amounts of data could exceed the tool's limits. Access the Graph Explorer The Graph Explorer is part of the SAP Hybris Profile Core Services package. Subscribe to this package in your project by following the instructions in the Set Up a Project section of the Getting Started Guide. After you subscribe to the SAP Hybris Profile Core Services package, access the Graph Explorer as follows: Open the Builder. Click your project. In the left navigation menu, click Hybris Profile Developer Tools. In the left navigation menu, click Graph Explorer. Graph Explorer elements This image shows the elements of the Graph Explorer interface. Open the image in a new tab to view it in detail. The numbered elements in the image have these functions: Schema – Enter the category of data, for example, commerce/Product or core/Identity, of the target data node. ID – Enter the string that uniquely identifies the targeted data node. Search button – Click to search for a data node based on your search criteria. Full Screen button – Click to enter fullscreen mode, which hides the Portal navigation tool to provide more space for the graph data. When in fullscreen mode, click the x in the upper-right corner to exit fullscreen mode. Result pane – Displays the retrieved section of the graph. Advanced – (Optional) Enter filter criteria to restrict the result set, using the format: ?include=[node schema] : Only include neighboring nodes with the specified [node schema] ?include=[node schema 1]&include=[node schema 2] : Only include neighboring nodes with either of the specified [node schemas] Query – Click to display the search form. Recent Queries – Click to display the last several queries. Detect Hubs – Click to display clusters of densely-connected nodes of the retrieved subgraph. Detect Outliers – Click to display loosely-connected areas of the retrieved subgraph. The results render as a graph that displays each retrieved node and edge, with the edges displayed as directional arrows. The Graph Explorer supports these functions: Zoom in and out using the scroll wheel or pinch gesture Pan the screen by clicking on, and dragging, the background Drag and drop data nodes to restructure the display Hover over a node or edge to display its properties Double-click a node to retrieve its neighbors While holding the Command key (on a Mac keyboard) or the Control key (on a PC keyboard), select multiple nodes and double-click to retrieve their neighbors The Graph Explorer accesses the data of the currently-selected tenant project only. Give and revoke consent Customers manage their consent settings by toggling permissions to collect and access specific types of profile data. When a node depends on a customer's consent and that consent is no longer granted, then a request call does not return the node. If a customer revokes consent for product view data, then associated nodes will not be accessible through the Graph Explorer. For example, Customer A and Customer B both have viewed Product 123. The Graph Explorer displays Product 123 as associated with both Customer A's session and Customer B's session. Then, Customer A revokes consent for tracking product views. As a result, subsequent calls to the Graph Viewer for Product 123 retrieve only Customer B's session node. Execute queries The specified Schema and ID uniquely identify a starting node in the graph database. You can identify any node that has a node type, namespace, and ID as a starting node. The Graph Explorer displays a subsection of the graph database centered on a specified node, and includes the edges that connect it with neighboring nodes. Consent settings determine whether the requested node is accessible, and also restrict the set of displayed neighboring nodes and edges. Because the Graph Explorer retrieves the results from SAP Hybris Profile as a data stream, requesting a node with a large number of neighbors can delay the return and display all of the nodes. If a popular product is viewed thousands of times every day, then millions of session nodes could be associated with a request for that product node. In such cases, the Graph Explorer may not function effectively. You can restrict the size of the returned result set using the Advanced filter, as described in the section, Examine elements of the Graph Explorer. In the image below, a session node with the schema commerce/Session and the ID 8767db91-6a1c-4df8-946e-79b680808861 was fetched from the graph database. Open the image in a new tab to view it in detail. Change queries To specify a new start node at any time: Enter a new Schema and/or ID in the respective text boxes. Click Search. The results of the new query replace the previously-displayed results. To display a chronologically-ordered list of past requests, click Recent Queries. Click on a previous request in this list to run a previous request, which replaces the previously-displayed results. Note that: Double-clicking on a node to retrieve its neighbors logs a new entry in Recent Queries list. The list of recent queries is stored in a cookie on your local machine. If you sign in to the Builder with a different browser, or you clear your cookies, this list is lost. Troubleshooting Error message Explanation Possible Fixes The requested information could not be found A node with this combination of tenant, schema, and ID cannot be found. Verify that you are using the correct values in all fields. Check your spelling: Graph Explorer is case-sensitive. Check whether some of the fields contain leading or trailing white spaces. You don't have permission to view this information The consent to view the requested node doesn't exist, so the data is irretrievable. No fix possible. Choose a different start node. There are some technical problems with your query Technical problems prevent your query from being executed. Post a question to an expert on the Experts Forum.
SAP C4C Configuration Builder Module

Guide

SAP C4C Configuration Builder Module

November 08, 2016  

2 min read

A step-by-step guide to the SAP C4C Configuration Builder Module.

Overview

Customers who have subscribed to any of the below packages – C4C – Field Service C4C – Foundation C4C – Sales C4C – Services Will have to maintain configuration details about SAP Hybris Cloud for Customer(C4C) system and also confirms the authentication mechanism between the two systems. This document gives you a step-by-step procedure of how to maintain this configuration. In order to view the configuration screen, it requires the following: The hybris. c4c-configuration _manage scope must be assigned Authentication configuration In the SAP C4C Configuration screen, enter the SAP Hybris Cloud for Customer System URL to which you would like to connect. Select an authentication method: OAuth authentication or Basic Authentication OAuth method of authentication is recommended since it is more secure. OAuth Method: The certificate generated from a certifying authority is required for OAuth authentication. The certifiying authority provides you with the following: Certificate file JKS file Key Store Password Key Alias Key Password The SAP Hybris Cloud for Customer single sign-on generates the Client ID, Client Secret, and IDP Name. Follow the instructions on how to set up single sign-on here. Enter the following fields on your screen: C4C Client ID C4C Client Secret IDP Name Key Store Password Key Password Key Alias Keystore All users who are part of the Yaas project must have a corresponding user with the same email ID in the SAP Hybris Cloud for Customer system. Basic Authentication: Complete the following fields: C4C User Name: Your User ID for the SAP Hybris Cloud for Customer system. C4C User Password: Your password for the SAP Hybris Cloud for Customer user. The user details that you define here must have the necessary authorization and scope in the SAP Hybris Cloud for Customer system also. Click Save. The system is now configured for connecting Yaas with SAP Hybris Cloud for Customer(C4C). The users can call our extension services through which they can access data in SAP Hybris Cloud for Customer.
Stripe Relay

Guide

Stripe Relay

August 30, 2016  

6 min read

The Stripe Relay In-App & Social Sales Package provides merchants with additional sales channels out-of-the-box.

Overview

The Stripe Relay In-App & Social Sales package provides merchants with additional sales channels out-of-the-box. For the functionality included in the Stripe Relay In-App & Social Sales package to work, additional subscriptions to the Site Management, Product Content, and Order Management packages are required. After you subscribe to and configure the packages, the merchant is able to sell products on Twitter via Stripe Relay, with the click of a few buttons. Be advised that this functionality is only available in the United States. The steps required for the integration between SAP Hybris as a Service (YaaS) and Stripe Relay to work are: Subscribe to the required packages. Configure the required packages. Configure the Stripe settings. Export products. Set up your Stripe and Twitter accounts before you proceed.

Packages Subscription

Go to YaaS Market, scroll down, and click on the Stripe Relay In-App & Social Sales package to go to the product details page. On the product details page, click Subscribe Now and select the project you want to add the subscription to. If you are not already signed in to YaaS.io, you will be prompted to do so when you click Subscribe Now. Make sure that your project is subscribed to the packages that the Stripe Relay In-App & Social Sales package depends on, namely Site Management, Product Content, and Order Management. Since you can subscribe to only one package at a time, you will need to repeat the previous step for each package you subscribe to.

Packages Configuration

After you have subscribed to all required packages, you will want to ensure that they are properly configured. To do so, complete these steps. Sign out of the Builder and sign in again. In the Builder, navigate to your project under Projects & Sites. You should see Categories, Products, Orders, and Commerce Settings in the left-hand navigation panel. Click on Commerce Settings in the navigation panel. Go to Site Settings and select the Default Site. Be aware that Stripe Relay works with the default site of your project and that product data is exported in the default language of the default site. On the Edit Site Settings page, configure the Site URL and Product Path URL of your online shop. This is used to generate a direct link to the original product details page of the product you post to Twitter. The link displays to Twitter users outside of the US. You can also configure the language and currency of the project’s default site in Site Settings, if needed. Now, go to Payment Settings in the navigation panel and select the Default Site. You must activate Stripe Connect for the Default Site of your project in order for Stripe Relay to work. If you haven’t already connected your YaaS project to Stripe via Stripe Connect, click Activate Stripe on the Payment Details page, which redirects you to Stripe.com. On the Stripe.com site, log in and select or create the Stripe account you want to connect to your YaaS project. After you connect your Stripe account, you are redirected back to the Payment Details page in Builder, where you should see the Stripe Relay Status as CONNECTED. Stripe must be set to Live Mode in both the Builder and Stripe for customers to be able to place orders on Twitter.

Stripe Settings Configuration

In Stripe, you must connect your Twitter account and add the order webhook. Go to your Stripe Dashboard. If you have multiple Stripe accounts, select the Stripe account connected to your YaaS project in the top right corner. Click and select Account Settings in the drop-down menu. To enable your Twitter account, click the Order icon. Under Relay Apps, click Sign in with Twitter… This redirects you to a new window to authorize Stripe for Twitter. Click Authorize app. If you are not signed in to Twitter yet, you will be prompted to do so. After you authorize the app, a Twitter settings popup appears. Fill in the obligatory Sales terms and Shipping policy fields, then click Enable. You should now see an Enabled label for Twitter. Click the Webhooks icon. Then click +Add endpoint..., select Account, and click Next. In the URL field, insert the following http link: https://api.yaas.io/hybris/orderwebhook-stripe/v1/{projectId}/main/order-payment-succeeded Make sure to replace {projectId} with your own unique project identifier. Your project identifier can be found in the Builder, under {Project} → Administration → Details, where you will see your Identifier. Select Select Events and order.payment_succeeded as presented in the image. Click Create endpoint. You will see the added endpoint in the list. When you move your mouse cursor over it, you will see two additional buttons that let you delete an existing endpoint or edit the endpoint's details. Click Done to finish.

Exporting Products

To export a product from YaaS to Stripe Relay, navigate to your project in the Builder and then follow these steps. Click Products in the left-hand navigation. You can either select the product you want to export or you can click Add to create a new product. Before completing the next step, make sure you have filled in the necessary product details and added at least one product image. On the product details page, you will see a number of tabs at the top. Click Social. Under this tab, you will export your product to Stripe Relay. Click Export to Stripe Relay to export your product. After the product is successfully exported, the NOT EXPORTED label changes to EXPORT CURRENT and a Tweetable URL displays. The product information and Tweetable URL also display under Products in your Stripe account. In case you have modified an already exported product, the EXPORT CURRENT label changes to EXPORT NOT CURRENT. Click the UPDATE EXPORT button to update the product in Stripe Relay. Copy the Tweetable URL and post it in your Twitter. The product information and the buy button will display as shown below. Customers can now buy the product directly within Twitter. Be aware that if you are outside of the US, only a URL linking to the original product details page in the online store will display in Twitter. To see the orders placed, go to the Builder under {project} → Orders. The orders also display under Orders in your Stripe account.
YaaS Showcases

Guide

YaaS Showcases

September 12, 2016  

5 min read

Showcases is the place people go to connect, discover, and share. It’s all about showcasing projects and business applications built on YaaS.

Overview

Showcases is the place people go to connect, discover, and share. It’s all about showcasing projects and business applications built on YaaS. Showcases supports you, as a developer, project manager, partner, and customer; helping you to present your showcase, built on YaaS, connect to an interested audience, and get in touch with the community. Showcases accompanies your project through the phases of ideation, development, and early validation. Creating a showcase only takes a few simple steps! You can also explore and collaborate on Showcases to find out more about projects and business applications built by others on YaaS, contact the people who built them, and get to know proven YaaS best practices. While a YaaS account is not required to view the existing public showcases, you must register to create a showcase, to view private showcases within your own organization, and to use the contact functionality.

Explore and Collaborate: View showcases and get in touch with showcase owners

To view the current showcases on YaaS, go to YaaS.io and click Community. Click the Showcases tab. Click on a showcase image or name to open the showcase detail view. Here, you can view the showcase description, tags, last update date, status, video, and screenshots. Click on the video to play it. Click on a screenshot to enlarge the image. Click the arrows on the left and right of the screenshot strip to scroll through the images. Click Contact to get in touch directly with the showcase or package owner. To contact a showcase owner, you must sign in to YaaS. If you are not signed in when you click Contact, you can either sign in with your existing sign-in credentials, or, if you haven’t registered, click Register now to create a new account on YaaS.io. After you sign in, your email address appears in the From field of the contact form. In the Subject field, add a subject. In the Message field, type your message. Click Send to deliver your message to the showcase owner. Click Back to Overview to return to the list of current showcases. You can use the type-ahead search to find showcases more easily on Community: Enter the first three letters in the search bar on the top of the current showcase page to display a selection of relevant showcases. Select a showcase from the result list to view the showcase's details.

Create a showcase and publish your project on Showcases

To create a showcase, you must sign in to the Builder. You must also have a package in the Builder. In the Builder documentation, you can learn more about how to create a package. After you create your package, click Showcase to enter showcase creation mode. Complete the mandatory fields, marked with an asterisk (*), in showcase creation mode. Mandatory fields • Showcase name: Enter the name of the showcase as you want it to display to the community. • Short Description: Enter some teaser text for the package. Limit the text to 140 characters. • Long Description: Describe your package content and functionality in detail. Use at least 40 characters. • Contact Email Address: Enter an email address so that your community can get in touch with you. • Status: Choose a status to display with your package, for example, Beta, Development, or Released. • Visibility: Choose Private to share the package within your organization only. Choose Public to share a package externally. Optional fields • YouTube Video ID: Add a YouTube video ID to add a video promoting your showcase. If your video ID is correct, a preview appears. • Upload Image: You can upload a hexagon-shaped, 408 x 362 pixel icon in JPEG or PNG format. If you do not upload an image, a standard cube image appears. • Tags: Add tags to make it easier to find your package. Tag names cannot include spaces, slashes, or commas. After adding a tag, press Enter. When you are done, click Save & Share to create and publish your showcase on Showcases. After you save and share your package, the Show and Delete options appear, as well as Screenshots, which you can click to upload images of your project. Click Show to go to the detailed view of your showcase on the Current Showcases on YaaS page. Statistics Find out how often your showcase was viewed in the last seven days and in the previous seven days. As a showcase owner, you can use the statistics feature to see if the interest in your showcase has increased. Screenshots After you save your showcase, you can add and manage screenshots of your project. To add a screenshot, click Screenshots > Add Screenshot. Select an image from your files. Click Back to return to showcase creation mode, then click Save & Share

Update and delete a showcase

Update a showcase You can access showcase edit mode by returning to your package in the Builder and clicking Showcase. You can then update or delete your showcase. To update an entry, click in the relevant field and change it accordingly. After you change the showcase details, click Save & Share to commit your changes. If you want to know how to add screenshot to your showcase, please take a look at the section "Create showcase". Delete a showcase To delete a showcase, click Delete. In response to the prompt, “Are you sure you want to delete this showcase?” select Cancel to keep your showcase or OK to proceed with deleting the showcase. If you click OK, your showcase is deleted and removed from the Showcases page.
YaaS Essentials

Training

YaaS Essentials

September 27, 2016  

5 min read

YaaS Essentials is a short online training presenting a high level introduction of YaaS. It focuses on key elements of YaaS—the YaaS Market and YaaS packages—while also giving participants a basic understanding of the underlying technology.

Introduction

Welcome to YaaS Essentials - a brief online training introducing SAP Hybris as a Service at a high level. The course includes an explanation of the YaaS Market and YaaS packages while also giving you a basic understanding of the underlying technology. It starts with the basics: packages, subscriptions and the pricing model. Then, we will use the publicly available Storefront template to demonstrate capabilities of one of the YaaS solutions - Commerce as a Service. You will see an example of how to create a fully functional online shop in just 20 minutes. Since YaaS covers more than just a commerce scenario, the course explains different journeys you can take. You will see that anyone can use it; from individual developers, small and mid-size companies to big corporations. To complete the picture, technical concepts are described in simple manner. Finally, you will get a set of recommendations on how to start working with YaaS and what your next steps should be. Target Audience This training is aimed at everyone—from business users, to functional leads and developers—who want to understand YaaS quickly and easily.  Duration:  The actual course duration is 42:03 min. Depending on your bandwidth and time allocation this course might take between 1 and 2 hours to complete. 

What is YaaS?

In this video, you will learn about the following topics: the YaaS Market, packages, subscriptions and the pricing model. By the end of this video, you’ll have an overview of the solutions built by SAP Hybris using the YaaS platform. kWidget.embed({ 'targetId': 'target_0_b5o0ei0n', 'wid': '_1673981', 'uiconf_id' : '36282491', 'entry_id' : '0_b5o0ei0n' });

Set up a Storefront in Less than an Hour

In this video, you will see how to create a storefront, customize it, add products and categories to it, and enable payment and shipping methods. kWidget.embed({ 'targetId': 'target_0_3du1yxt2', 'wid': '_1673981', 'uiconf_id' : '36282491', 'entry_id' : '0_3du1yxt2' }); You can also read more in: Working with Builder Builder document in the Dev Portal. Create an Organization section in the Dev Portal. Create Projects section in the Dev Portal. Storefront Template article. Commerce as a Service Guide article. Working with User roles: Account service documentation in the Dev Portal. Add a User Role in an Organization section in the Dev Portal. Add a User Role in a Project section in the Dev Portal.

YaaS Journey

In this video, you’ll take a look at a simple business case for YaaS. kWidget.embed({ 'targetId': 'target_0_gcd9fipt', 'wid': '_1673981', 'uiconf_id' : '36282491', 'entry_id' : '0_gcd9fipt' }); You can also read more in Loyalty package description in the YaaS Market.

Where Can I Use YaaS?

In this video, you will see how YaaS can be used by anyone, from individual developers, small and mid-size companies to even big corporations. kWidget.embed({ 'targetId': 'target_1_a8wsoktb', 'wid': '_1673981', 'uiconf_id' : '36282491', 'entry_id' : '1_a8wsoktb' });

Underlying Technology

This video provides you with an overview of the technical aspects of YaaS. kWidget.embed({ 'targetId': 'target_1_5nzvi8l3', 'wid': '_1673981', 'uiconf_id' : '36282491', 'entry_id' : '1_5nzvi8l3' }); You can also read more in API Best Practices document in the Dev Portal.

How Do I Start Working with YaaS?

By now, you have already seen some of the main YaaS building blocks, for example the YaaS Market. YaaS Market is an online marketplace where you subscribe to packages. Also, you have seen the Builder.  The Builder is an orchestration and publishing component. It´s where you manage your organization, projects, packages and perform different daily tasks such as managing products. So, what else is there? There is the DevPortal - an information and knowledge hub for developers. In it, developers can read documentation and access free online trainings to learn about YaaS and available services. Additionally, all necessary technical information about microservices and packages is available on the DevPortal. There is also the Knowledge Hub - the information and learning hub for non-technical people. It contains various guides, articles and free online training. If you want to receive updates on new package releases, YaaS teams publish release notes for each new version of every package. You can read them here. If you need help, YaaS uses the established Hybris Experts forum. You can simply submit your question and one or more of our experts or maybe even your peers will answer it. Hybis Experts is part of the YaaS Community. Both are open to everyone. You can read questions and answers on Hybris Experts without registration, but if you want to write a question you will have to register. Finally if you want to stay tuned and build your network, SAP Hybris experts are taking part in many conferences and meet-ups throughout the year. You can find the list here.

Where Do I Go Next?

After finishing this online training, you might be wondering: "What's next?".  This depends on who you are and what interests you have. For example, if you are a developer, you can explore the Dev Portal. You can try our Getting Started Guides. If you are interested in a particular solution, such as SAP Hybris Profile, the Solutions section of the DevPortal is what you are looking for. Finally, if you prefer reading documentation, have a look at the API Docs section where every service published on the YaaS Market is thoroughly documented. Most documents include tutorials, so you can try out the service as you read through the documentation. If you are not a developer, then the Knowledge Hub is the right place for you. As you have already seen in this section, the training provides you with free online training on various YaaS topics. We provide you with the guides that help you configure and use your packages efficiently. Also, you can get recommendations, examples of common pitfalls and best approaches, news, and more. Finally, if you are interested in using YaaS to build on your existing SAP portfolio, you can use guides and articles in the Knowledge Hub or look on the DevPortal for the technical details.