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

Forms 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 Settings → Forms.
  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 Settings → Forms.
  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.

Summary

  • Prepare required information before starting the configuration, such as identifying communication systems and required integrations for API definitions.

  • Use SAP Cloud Integration to complete configuration steps for the relevant iFlow.

  • Use form buttons to trigger actions in external systems.

  • As an example, you can trigger DocuSign requests to send signature emails to employees.

  • You can also trigger external approval workflows via form buttons.

  • Set up outbound calls to connect with external applications.