Real-time SAP Access: Custom Hook

This guide explains how to use a custom hook to enable real-time events from SAP Service Cloud by configuring a webhook flow. These webhooks notify the Tekst platform whenever a case is created or updated.

Use case

Use a custom hook when you want more control over real-time event delivery.

  • Avoid relying on other tools or extensions.
  • Trigger only the update events you care about.
  • Limit which cases are sent to Tekst.

Hook request

Configure SAP Service Cloud to send a POST request to the Tekst hook endpoint.

Request typePOST
URLhttps://hooks.tekst.com/v1/webhook/v1/sapservicecloud/{orgId}/{integrationId}
Payload
{
  "event-type": "{EventType}",
  "event-id": "{EventID}",
  "event-time": "{EventTime}",
  "data": {
    "root-entity-id": "{CaseID}",
    "entity-id": "{EntityID}"
  }
}
Extra payloadYou can also send extra fields such as body and subject. Tell Tekst customer success before you add them.

You can find the full webhook URL (including your org ID and integration ID) in the Settings tab of your SAP Service Cloud integration in the Tekst dashboard.

Configure the webhook in SAP Service Cloud

SAP Service Cloud's standard Event Notification sends the payload shown above, so no custom code is needed.

Open Event Notification

In SAP Service Cloud, open the Administrator menu and go to General Settings. Under System Administration, click Event Notification.

General Settings in SAP Service Cloud, with the Event Notification link under System Administration

Add a consumer

  1. Above the All Consumers list, click Add
  2. Fill in the consumer:
    • Type: External Consumer
    • Name: any name, for example Tekst Service Connector
    • Endpoint: the webhook URL from the Settings tab of your SAP Service Cloud integration in Tekst
  3. Click Save

The consumer needs no credentials: its Authentication Method stays None.

Consumer dialog with Type External Consumer, a Name and the Tekst webhook URL as Endpoint

Add the subscriptions

  1. In the All Consumers list, select the consumer. Its subscriptions show in the Subscriptions section below the list. Click Add there.
  2. Set Business Object to Ticket (there is no "Service Request" business object in the list). Node is set to Root.
  3. Set Created and Updated to Yes. Leave Deleted and Enhanced Payload set to No.
  4. Click Save

Edit Subscription dialog for the Ticket business object, node Root, with Created and Updated set to Yes

For closed tickets, add a second subscription. Field changed cannot be combined with Created and Updated, so this needs its own subscription.

  1. In the Subscriptions section, click Add
  2. Set Business Object to Ticket. Node is set to Root.
  3. Set Field changed to Yes, Field name to ServiceRequestLifeCycle and Field changed to to 3 - Completed
  4. Click Save

Edit Subscription dialog for the Ticket business object with Field name ServiceRequestLifeCycle and Field changed to 3 - Completed

With the consumer selected, the Subscriptions section then lists both subscriptions on Ticket, node Root.

The Tekst consumer selected in All Consumers, with its Subscriptions below: one Ticket subscription for the Created and Updated events and one for tickets changed to Completed

Activate the consumer

In the All Consumers list, select the consumer and click Actions > Activate.

All Consumers list with the Actions menu open on the Activate option

The consumer's Status changes to Active.

All Consumers list with the Tekst consumer's Status shown as Active and Authentication Method None

To check the setup, create a ticket in SAP Service Cloud. It appears in Tekst shortly after.

Related to

0 comments

Please sign in to leave a comment.