Creating Business Documents in ESM

Objective

After completing this lesson, you will be able to create business documents in ESM to mainatin information in a structured format.

Creating Business Documents in ESM

The main goal for creating business documents in SAP ESM is to help agents identify and further process back-end records easily and more efficiently, while working on assigned Cases. Agents often receive inquiries via emails, and in some scenarios, they get documents attached, like payment advice, invoice or purchase order. Creating business documents, for these types of attachments, to display information in a structured manner consists of multiple steps. The first is to define the business document, with its document ID, name and language. Next, as an Administrator, you have the option to choose from different input options which will allow the Agents to maintain the business document within the Case while handling the inquiries. The available options are: manual data entry, document extraction, and business information extraction* (*only available with SAP AI Units). You will learn in more detail how each option works and how it can be configured.

Let’s start now by creating a business document.

Creating a Business Document

To create a business document, choose the (+) symbol and select ‘Create New Business Document’, fill in the necessary details, and save your work.

The Business Documents interface in ESM is displayed. It shows an example with one document listed as ZTEMP - ZTEMP under the Business Documents section. An arrow points to the + button. A second arrow points to “Create New Business Document”. Details about the selected document and its draft version are displayed below

Your newly created business document will then be displayed in the Business Documents list, with the header information visible on the right-hand side. A draft version of the business document will be listed in the Versions table.

The Business Documents interface in ESM is displayed with a list showing one document, ZTEMP - ZTEMP, under Business Documents. On the right side, the Create Business Document panel is open with fields for Business Document ID, Name, and Default Language, set to English by default.

On the right-hand side, under Action use the three dots (...) symbol to ‘Activate’ the version, or ‘Copy to New Business Document’.

To open the business document designer, choose the symbol below ‘Version’.

The Business Documents interface in ESM is displayed, showing two documents listed: ZDoc - Document 1 and ZTEMP - ZTEMP. On the right side, details of ZDoc - Document 1 are visible with status DRAFT and version information. An arrow points to the Edit icon for Version 1, and another arrow points to the action menu (three dots), displaying options: Activate, Copy to New Business Document, and Create New Version.

Note

Only one draft version is allowed to be edited at any given time.

To perform the configuration of a business document, there are three features which must be maintained, and these are available in three different tabs within the Business Document settings:

  • Tab 1: Designer
  • Tab 2: Actions
  • Tab 3: Input Options

In the following sections, you will be guided through the scope of each tab.

Configuring a Business Document - Using the Designer Tab

The objective of the Designer Tab is to identify which fields and field properties are required for creating the business document. Imagine for example that you want to create an Invoice by extracting data from a PDF document attached to a Case in SAP ESM. You as an Administrator can define here the structure of the business document required for processing an Invoice in the back end.

In the Designer tab, choose + to add controls and fields to the business document table. The elements you add will appear as columns within the table. Some elements like "dropdown" allow you to add a dynamic data source, which will be covered at a later point. The elements "source" and "status" are default and cannot be removed. Each element will have its associated properties displayed on the right side of the screen alongside the business document layout. The properties may differ depending on the element in question. The current text element has among its properties "display id", "initial value", "description", "minimum" and "maximum" character limit.

The Designer tab of the Business Document Designer in ESM is displayed, showing a table with columns, including Source, Status, Firstname, and Lastname. An arrow points to the + button in the Text Field Properties section on the right, which opens a dropdown menu with options: Text, Checkbox, Number, Date, and Dropdown.

Elements can have different conditions. They can be set to "required", "hidden", "read only" or be defined as the main navigation column. By selecting the gear icon next to a condition, it would be possible to implement a rule based on which an element condition would take place. An example would be a field becoming "required" or "optional" when a specific country has been selected.

The Designer tab of the Business Document Designer in ESM is displayed, showing a table with columns such as Source, Status, Firstname, and Lastname. On the right, the Text Field Properties panel is open, displaying settings like Placeholder, Initial Value, Character Limit with minimum (0) and maximum (100), and Configuration options. Arrows point to the Hidden checkbox under Configuration and a related gear icon for additional settings.

The rules can be defined in the Condition Block that will appear after selecting the gear icon.

The Required Rule Configuration interface for the business document control Lastname (TEXT_FIELD-2) is shown. At the top, a dropdown labeled Activate the control allows the user to choose an action. Below, a Condition Block provides options to define conditions with dropdowns for selecting a function, field, operator (e.g., Equals), and value, alongside a text field labeled Enter target value. A + OR button enables adding more conditions. A Summary section is indicated below for condition summaries. Save and Close buttons are located at the bottom-right corner.

A property can be deleted by selecting the ‘Delete’ icon in the menu next to the element title or in the property section of the element.

The Designer tab of the Business Document Designer in ESM is displayed, showing a table with columns such as Source, Status, Firstname, and Lastname. An arrow points to the Actions menu of the Lastname column, which shows options like Move Left, Move Right, and Delete. On the right-hand side, an arrow points to the trash can icon in the Text Field Properties panel, indicating the delete functionality for the TEXT_FIELD-2 field labeled Lastname.

Configuring a Business Document - Using the Actions Tab

The objective of the Actions tab is to define Actions which are capable of initiating API calls to external systems via SAP Cloud Integration, enhancing the adaptability and effectiveness of business documents.

Under the ‘Actions’ tab it is possible to set API URLs for business document actions to send or retrieve data or validate data from external systems.

  1. Create Action: To create an action, choose the plus icon next to ‘Configure Actions’. This will open up a new window. In there, add an action text, a description as well as select the action type. The action type can be "custom", "post" or "lookup". When selecting the "post" action an arrow will be displayed at this location in the business document. When selecting the "lookup" action, a magnifying glass will be visible. After a business document is posted, the business document is set to read only.The Actions tab of the Business Document Designer in ESM is displayed. An arrow points to a plus (+) button under the Configure Actions section, indicating the option to create a new action. On the right, the Create Action panel is open, showing fields like Action Text, Description, and Action Type. The Action Type dropdown is expanded, revealing options like Custom, Post, and Lookup. Save and Cancel buttons are located at the bottom of the panel.
  2. Apply Action to: Choose whether to apply to:
    • Single Business Document
    • Single and Multiple Business Documents
    • Multiple Business Documents Only

    This selection lets you choose either to apply the action to multiple business documents simultaneously or restrict it to a single business document.

    The Actions tab of the Business Document Designer in ESM is displayed. Under Configure Actions, options such as View Extraction Results, Extract From Attachment, and Post are listed, with Post highlighted. On the right, the Action Properties panel is shown, with fields like Display ID, Button Text, and Description. The Action Type field is set to Post. At the bottom, a segmented selection labeled Apply action to provides options: Single Business Document, Single or Multiple Business Documents, and Multiple Business Documents Only. An arrow points to this section.]
  3. Add Integration: Choose "Add Integration" within the Integration section.The Actions configuration screen in ESM is displayed. The left panel lists View Extraction Results, Extract from Attachment, and New Button, with New Button highlighted. On the right, the Action Type is set to Post, and options for Apply action to are available with radio buttons for Single Business Document, Single or Multiple Business Documents, Multiple Business Documents Only, and All Business Documents. Below, a section for Business Documents to Send provides a choice between Selected Business Documents Only and All Business Documents, with an informational note about attachments. An arrow points to the Add Integration button, which is followed by an Add Automation button. At the bottom, checkboxes for Hidden and Deactivated are available, and Save and Cancel buttons are visible in the bottom-right corner.]
  4. Select HTTP Data: Choose the relevant HTTP data from the outbound configuration set up in the ‘Business Document Integration’ section. Decide on the data you wish to send with the API as the iFlow Input, selecting from options such as case, user, or business document fields.
  5. Download Request JSON Schema: Select "Download Request JSON Schema" to download the schema file in JSON format, which can then be uploaded to SAP Cloud Integration when creating a message mapping for the API request. Choose the business document fields you want to update with the API response data as the iFlow Output.
  6. Download Response JSON Schema: Select "Download Response JSON Schema" to download the response schema file in JSON format, which can then be uploaded to SAP Cloud Integration for creating a message mapping for the API response.The Action - Post configuration screen in ESM is displayed. At the top, the Outbound Configuration field shows Post Payment Advice, indicated by one arrow. Below, the screen is divided into two panels: iFlow Input on the left and iFlow Output on the right. The iFlow Input panel indicates that 22 fields are selected, with an option to Download Request JSON Schema and a link icon highlighted by an arrow. The iFlow Output panel shows that 7 fields are selected, with an option to Download Response JSON Schema, also accompanied by a highlighted link icon. Both sections provide an overview of input and output fields for integration flows. At the bottom-right is a Close link.
  7. Save iFlow Configuration: Save the iFlow configuration settings.
  8. Add Integration Automation: To enable automatic execution of this action when specific conditions are met, select "Add Integration Automation" in the Automation section. Set up rule conditions that will trigger the action to be performed automatically.The Create Automation screen is displayed. At the top, Automation 1 is configured. An arrow points to the dropdown field labeled When the following event occurs, which is set to Document Extraction successful. Below, a checkbox for Always perform this automation (no conditions) is unselected. In the And the following conditions are met section, a Condition Block is configured with two rules. Payment Advice > Document Extraction Confidence Level set to Equals and the value 80.0., Case > Company > Company Display ID set to Equals with the value field left blank. A Summary section below describes the complete condition in plain text. At the top right, an arrow points to a button labeled + Add Automation. At the bottom, a Close link is visible..
  9. Configuration Section: In the Configuration section, you can hide or deactivate the action using the available options. Check the box to have the action hidden or deactivated by default. To establish conditions for visibility or deactivation, select (gear icon) Configure rule, which allows you to set rules governing when the action is visible or appears as deactivated. For example, mark the Hidden flag if you want to always hide an action (the same principle applies to the Deactivated flag). Alternatively, if you want to hide or deactivate a specified action only under certain conditions, select the gear icon and maintain the required logic.
The Actions configuration screen in ESM is displayed, focusing on the New Button action. On the right, the Action Type is set to Post. Apply action to options include radio buttons for Single Business Document, Single or Multiple Business Documents, Multiple Business Documents Only, and All Business Documents. Selected Business Documents Only is chosen under the Business Documents to Send section. There are buttons for Add Integration and Add Automation. At the bottom, an arrow points to the Configuration section, which includes checkboxes for Hidden and Deactivated. Another arrow points to settings icons in the bottom-right corner. Below these options are Save and Cancel buttons for confirming or discarding changes.

Making an action Visible (or Hidden) under a certain condition can be achieved by creating a Rule configuration as shown in the following image: simply select the control you want to activate (Hidden or Visible) and then enter the logic in the condition block. Select the Save button when finished.

The Hidden Rule configuration screen in ESM is displayed, focusing on setting visibility rules for a business document control labeled Post (BUTTON-1). At the top, there is a dropdown menu labeled Activate the control with options Hidden and Visible. Below, the interface shows a Condition Block for defining rule criteria, including options such as Select a function and Select field, with fields to specify Value and Enter target value. A + OR button is available for adding additional conditions. The summary section states, You can view the summary of conditions here. At the bottom, there are Save and Close buttons for finalizing or discarding the configuration changes.

Configuring a Business Document – Using the Input Options Tab

The objective of the Input Options tab is to choose one or more input methods for the business document. Agents will be able to leverage the defined methods while working on the assigned cases.

There are three input options:

  1. Manual Entry: as an administrator you can add elements from your business document layout that you want to display for manual data entry by using a quick create form. You can also reorder the elements as desired.
  2. Document Extraction: as an administrator you can choose a schema and type of files from which to extract data.
  3. Business Information Extraction: as an administrator you can use the generative AI-based information extraction capability to extract business information from the subject or description of the case and add that information to the business document table.

Manual Entry

Manual Entry is used for fields that are supposed to be maintained manually by an agent.

The Input Options configuration screen in ESM is displayed, showing options for selecting data entry methods. On the left, toggles are available for Manual Entry, Document Extraction (Beta), and Business Information Extraction, with the first two being activated. On the right, a section titled Quick Create Fields lists a single field labeled Reference Number. A yellow arrow directs attention to a + icon for adding new fields. At the bottom of the screen, Save and Cancel buttons provide options to confirm or discard changes.

Document Extraction

Schemas specify what information to extract from attachments and how that information maps to business document header and line-item fields. As an administrator you can use different schemas for different business document scenarios.

SAP ships standard schemas that you can use as-is or copy and modify for your specific needs. You can also create new schemas for additional scenarios. The standard schemas are:

  • Invoice
  • Payment advice
  • Purchase order

‘Document Extraction’ allows you to select a previously created business document schema and define what file types should be extracted in this schema. In the next image, a PDF type of file has been selected. The extraction can be executed manually or automatically, when the related checkbox is ticked. A confidence score can also be displayed next to each extracted data when the related checkbox is ticked.

As an administrator, after selecting the schema and the type of file, you must perform the Field Mappings: it is necessary to map each business document fields to the respective header field from the selected schema: on the right-hand side the header and line item fields defined in the document schema can be selected and on the left-hand side the fields created under the designer tab are visible.

The Document Extraction (Beta) configuration screen in ESM is displayed under the Input Options tab. On the left, the Document Extraction (Beta) toggle is enabled. On the right, the Schema section indicates the selected schema as SAP_paymentAdvice_schema, with a dropdown menu and Configure Schemas link. The File Types to Extract option is set to PDF. There are checkboxes for Automatically extract attachments when case is created and Show confidence level, with both checked. Yellow arrows highlight the schema dropdown, File Types dropdown, a gear icon next to Automatically extract attachments, and the mapped Extracted Header Field dropdowns in the Field Mappings section showing mappings for fields like grossAmount and documentDate, while others remain Not Mapped. At the bottom right, Save and Cancel buttons allow confirming or discarding changes.

Once the field mapping has been completed, you can define how the extraction should be executed. As mentioned previously, you can select the manual or the automated option, and if you choose the second one, you can also define the condition that should be relevant for such option, as shown in the next image, for the business document Payment Advice. The business logic must be entered in the Condition Block.

The Document extraction condition for business document Payment Advice configuration screen is displayed. At the top is the Condition Block section, which includes dropdown menus to Select a function, Select field, and input fields for Value and Enter target value. An option to add conditions is provided via a + OR button below the block. The Summary section beneath the condition block contains placeholder text stating, You can view the summary of conditions here. At the bottom-right corner, Save and Close buttons allow for confirming or exiting the configuration without saving.

Business Information Extraction

Business information extraction is the process of identifying, extracting, and organizing relevant data from business-related content such as text descriptions to create, update, or identify business documents.

Note

Pre-requisite: Generative AI features are available only when you have a valid license for usage of SAP AI Units. To enable Generative AI features, you must raise an incident with the CEC-CRM-ML component, mentioning that you have a valid license for SAP AI Units. After you activate the Generative AI features, you must assign the sap.crm.service.mlScenarioManagementGenAIService service and app to your role.

Further details on how to use and configure the Business Information Extraction capability are available at the dedicated optional session: Unit 5 Lesson 2: Configuring Business Information Extraction in ESM – Optional

Validating and Activating the Business Document

Now that you have maintained the business document structure, you identified the required actions and the relevant information extraction method, if no additional configuration is required, you can navigate back to the Designer Tab and select the Validate button.

If there are no inconsistencies, the business document can be activated.

The designer tab is open with the validate button highlighted.

The next and final step is to link the business document to one or multiple cases.

Connecting the Business Document to a Case Type

Now that you have created, configured and activated the business document, the last step would be to connect it to a case type. You as an Administrator should navigate to the following path: Settings -> All Settings -> Case -> General Tab.

Under Features Settings, you must activate the Business Document flag as shown in the next image.

The General settings screen for a case type in ESM is displayed. At the top, the Case Type section shows Name as ZSRC, Description as Service Request, Version Description as Sample Case Type, and Version Status as DRAFT. The Self-Service toggle is set to Yes. Below, under General Settings, the Status Schema is Default, Number Range is listed as cxmcase with a clickable View/edit number range table link, Party Schema is Case, and Catalog is BestRun Customer Support. In the Features Settings section, toggles for Case Hierarchy and Forms are enabled, while Task Management and Business Information Extraction are disabled. A yellow arrow highlights the Business Documents toggle, which is enabled.

Next, you should navigate to the Additional Features tab, select the plus icon and select the required business document from the pick list.

The Additional Features settings screen for a case type in ESM is displayed. At the top, the Case Type section specifies Name as ZSRC, Description as Service Request, Version Description as Sample Case Type, and Version Status as DRAFT. A yellow arrow highlights the Additional Features tab, which is selected. Below, in the Business Documents section, there is a message stating, No business document available. It looks like you haven’t selected a business document yet, accompanied by a small illustration. On the right side of this section, a dropdown menu labeled Search Business Documents is open, listing options such as Action Automation Test and several Alex-named business documents (e.g., Alex 20241104). A yellow arrow highlights this dropdown menu. At the bottom-right corner of the screen, Activate and Close buttons are visible for confirming or exiting the screen.

Choose the Activate button.

Now you have successfully configured a business document and linked it to the respective Case type in SAP ESM.

Creating a Business Document in SAP ESM

The following video will demonstrate how to create a business document in SAP ESM.

You will configure the three different tabs within the Business Document settings:

  • Tab 1: Designer
  • Tab 2: Actions
  • Tab 3: Input Options

Lesson Summary

In this lesson, you learned how to configure a business document and how agents can leverage these elements in SAP ESM while processing cases. The first step is to define the fields that are maintained in the document, followed by the action that is supposed to be executed when the extraction has started. The last step is to define how data is added to the fields defined in the first step, as an administrator you can choose from the manual data entry, the document extraction and the business information extraction, the last one being conditional to the SAP AI Units license. This allows to enrich cases related data in a structured manner, improving Agent’s productivity and efficiency.