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 with an example document “ZTEMP - ZTEMP.The interface highlights the “+” button and the Create New Business Document option for adding new entries. 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 ESM Business Documents screen displays a list containing one entry, ZTEMP - ZTEMP. The Create Business Document panel is visible on the right, showing fields for Business Document ID, Name, and a Default Language selection, which is pre-set to English.

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 showing a list of Business Documents. ZDoc - Document 1 is selected, displaying draft version details on the right. Arrows point to the Edit icon and the three-dot Action Menu, which lists options for 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 displays a table featuring columns for Source, Status, Firstname, and Lastname. On the right side, an arrow highlights the + button within the Text Field Properties section, which opens a dropdown menu with field type 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.

Screenshot of the Business Document Designer interface in ESM. The Designer tab shows a data table and a properties panel. Arrows point to the Hidden checkbox under the Configuration heading and a gear icon used for further settings in the Text Field Properties section.

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

Interface for Required Rule Configuration for the Lastname text field. The layout includes an activation dropdown, a condition-building section with operator and value fields, a + OR button for expanding logic, and a condition Summary area. Save and Close buttons are positioned at the bottom right.

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.

Interface of the Business Document Designer showing the Designer tab. A table lists document fields, with an arrow pointing to the Actions menu for the Lastname column. Another arrow points to the delete (trash can) icon in the Text Field Properties panel for the same field.

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 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.Interface showing the Actions tab in the Business Document Designer. An arrow points to the “+” button in the Configure Actions area. To the right, the Create Action sidebar is open with an expanded Action Type menu showing 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.

    Screenshot of the Actions tab in the Business Document Designer. The Post action is highlighted in the list, and its details are shown in the Action Properties panel on the right. An arrow points to the Apply action to segmented control at the bottom, which contains three scope options for document selection.
  3. Add Integration: Choose "Add Integration" within the Integration section.The “Actions” configuration screen in ESM is shown. The left sidebar shows a list of actions with New Button highlighted. The main panel includes radio buttons for document scope, a section for sending business documents, and buttons for Add Integration (indicated by an arrow) and Add Automation. 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.Screenshot of the “Action - Post configuration” screen. The top field, marked by an arrow, shows the outbound setting as Post Payment Advice. Two panels, iFlow Input and iFlow Output, display the number of selected fields (22 and 7, respectively). Arrows point to link icons in both panels for downloading JSON Schemas. A “Close link is visible at the bottom right.
  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 rule conditions to trigger the action automatically.The Create Automation screen is displayed. An arrow points to the event trigger set to Document Extraction successfully. Two conditions are listed: a confidence level of 80.0 and a specific Company Display ID. A text summary of the logic is displayed at the bottom. Another arrow highlights the “+ Add Automation” button at the top right, and a Close link is visible at the bottom.
  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 shows the settings for a New Button with the Action Type set to Post with the scope limited to Selected Business Documents Only. Buttons for Add Integration and Add Automation are visible. Arrows point to the Hidden and Deactivated status checkboxes. Another arrow points to settings icons in the bottom-right, positioned above the Save and Cancel buttons.

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 shown, specifically for the Post (BUTTON-1) control. It includes an activation dropdown (Hidden/Visible), a Condition Block for building logic with fields and values, and a + OR button for additional rules. The Summary section is located above the Save and Close buttons.

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 features data entry settings. The left panel shows active toggles for Manual Entry and Document Extraction (Beta). The right panel shows a Quick Create Fields list with Reference Number included. A yellow arrow points to a “+” icon for adding fields. Save and Cancel buttons are visible at the bottom.

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 field 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 under the Input Options tab is displayed with the feature enabled. The Schema section is set to SAP_paymentAdvice_schema, and the File Types to Extract is set to PDF. Yellow arrows point to the schema and file type dropdowns, an automation gear icon, and the field mapping dropdowns for headers like grossAmount and documentDate. Save and Cancel buttons are visible in the bottom-right corner.

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 shown. The layout includes a Condition Block for selecting functions, fields, and values, a + OR button for expanding logic, and a Summary placeholder. Save and Cancel buttons are visible in the bottom-right corner.

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.

Screenshot showing the Designer tab in ESM with the Validate button highlighted in the top menu bar.

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. As an Administrator, 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 an ESM case type is displayed, showing the ZSRC case type with the name Service Request and a draft status. Under General Settings, the status schema, number range, and catalog are defined. In the Features Settings section, Case Hierarchy and Forms are enabled, while a yellow arrow points to the active Business Documents toggle.

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 the ZSRC case type is shown, with the Additional Features tab highlighted by a yellow arrow. The main area shows an empty state for Business Documents, and a second yellow arrow highlights an open dropdown menu for searching and selecting documents. Activate and Close buttons are visible in the bottom-right corner.

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

Summary

In this lesson, you learned how to:

  • Configure business documents and understand how agents use them within SAP ESM to process cases.

  • Define the document fields and configure the actions to be triggered when the extraction process starts.

  • Select data entry methods, including manual entry, document extraction, or business information extraction.

  • Identify the licensing requirements for business information extraction, which depends on SAP AI Units.

  • Improve agent productivity and efficiency by enriching case data in a structured manner.