Assigning API Calls to Form Buttons in ESM

Objective

After completing this lesson, you will be able to describe the role of API calls in forms and assign them to form buttons

Forms Buttons

Form buttons can trigger API calls to external systems through SAP Cloud Integration making forms adaptable and more powerful.

Administrators can access and configure Forms by using the dedicated settings available at the following path: Settings → All Settings → Forms.

the settings UI showing, All settings and then Forms.

Assign API Calls to Form Buttons

Set API URLs for form buttons to send or retrieve data or validate data from external systems.

Prerequisites

Before you can use Buttons and link them to APIs, you need to define the corresponding outbound configurations under Form Integration. Below you can see a 'Form Integration' preview showing the existing communication configuration.

Form integration preview showing the existing communication configuration.

Assuming this prerequisite is fulfilled, the following procedure will explain the configure steps required for adding a button to an existing Form and make the link to an API call.

Procedure

  1. Go to your profile menu and choose SettingsForms.
  2. Select an existing form from the list and select Open Form Builder for the version you want to edit.
  3. Select the button to which you want to add the API call.Button Form configuration panel showing the selected button.
  4. In the Configuration area, select the Add actions button to open the Action button Configuration screen.
  5. Select the applicable HTTP data from the outbound configuration that was configured in the Form Integration section. If this button is meant to perform a post action, then select the Is Post Action checkbox.

    If the post action is successful, then the form is set to read-only.

  6. Select data that you want to send with the API as the iFlow Input. Choose form case, user, or form fields.

    Action button preview showing outbound configuration set-up.

    Select Download Request JSON Schema to download the request schema as a file in a JSON format. Upload this file in SAP Cloud Integration while creating a message mapping for the API request.

  7. Select the form fields to update with the API response data as iFlowOutput.

    Select Download Response JSON Schema to download the response schema as a file in a JSON format. Upload this file in SAP Cloud Integration when creating a message mapping for the API response.

  8. Save the iFlow Configuration.

Note

If you've selected the Is Post Action checkbox, you can map additional fields in the response schema including systemId (string), entityName (string), keys (array of attribute and value), objectNumber (string), description (string), and url (string).

The URL enables agents to access information posted to an external system from the case detail view (form tab).

Additional Configuration - Disabled and Hidden Button

The button set-up can be further configured with the rules:

  1. The button can be Disabled based on a certain condition.
  2. The button can be Hidden based on a certain condition.

Action button configuration showing Hidden and Disabled options.

Procedure

  1. Go to your profile menu and choose SettingsForms.
  2. Select an existing form from the list and select Open Form Builder for the version you want to edit.
  3. Select the button to which you want to apply the Disabled and/or Hidden rule.
  4. Click the configuration button.
  5. In the rule configuration area enter the control type you want to activate when the conditions are met (Hidden or Visible / Enabled or Disabled).Control type activation showing the two available options, Hidden or Visible.
  6. In the Condition Block enter the conditions under which the control type selected from the previous step must be activated.Condition Block for Control type activation showing an example of condition.
  7. Once all conditions are maintained, choose Save and navigate back to the Form configuration area.

Lesson Summary

This lesson explains how to configure buttons for Forms in SAP ESM, highlighting the information required before starting with the configuration. Form buttons enable users to trigger actions from external sources, such as the creation of a request to DocuSign for sending via email a request for signature by the employee. Another example could be a button that triggers a request for an approval workflow that will be managed by an external application. The lesson outlines the steps required for the configuration of a new Button within a Form and the steps required for the configuration of the outbound call. The prerequisites when configuring Buttons for Forms are the following:

  • Identification of the communication systems and integrations required for the API definition.
  • An existing Form where buttons must be added.
  • Access to SAP Cloud Integration to perform the additional steps required for the configuration for the respective iFlow.