Skip to main content

SAP Request Webhook

Overview

A diagnostic tool for viewing SAP requests and responses made through Link.

This functionality is currently only available on version 5.0 and above.

Enable Webhook

  • To enable the webhook, user must first set the LoggingWebhookEnabled flag to Enabled on your Route and restart your app.
Routes__0__LoggingWebhookEnabled: Enabled
  • To enable the webhook for Proxies, user must first set the Proxies__[name]__LoggingWebhookEnabled flag to true on the Proxies and restart the app.
Proxies__0__LoggingWebhookEnabled: true
  • To enable the webhook for API-Proxies, user must first set the ApiProxies__[name]__LoggingWebhookEnabled flag to true on the API Proxies and restart the app.
ApiProxies__0__LoggingWebhookEnabled: true

This will allow requests with the webhook headers to be forwarded only for the routes/proxies that have been enabled.

Request Headers

For the SAP request and response to be sent to the webhook, the SERVER_LOG_WEBHOOK_URL must be provided in the call to the API Proxy. The value should be the URL of the listening server.

If the listening server requires authentication the SERVER_LOG_WEBHOOK_AUTHENTICATION header must also be provided. The value of this header will be forwarded in the AUTHENTICATION header when calling the listening server.

Configure Header in Salesforce

The following steps describe how to add webhook header in Salesforce:

  1. Create or update the external credential and add a Custom Header with the information below, then save:
Field NameValue
NameSERVER_LOG_WEBHOOK_URL
ValueWebhook Service URL
Sequence Number1
  1. Example of webhook message:
{
"Request": {
"Body": "<PARAMS>\n\t<SECONDS>1</SECONDS>\n</PARAMS>",
"Headers": [
"User-Agent: insomnia/8.6.1",
"Server_log_webhook_url: https://webhook.site/c56ba023-385c-4d91-b3aa-4aaf91a2295a",
"Server_log_webhook_authorization: [Omitted]",
"Cookie: [Omitted]",
"Proxy-Authorization: [Omitted]",
"Authorization: [Omitted]",
"Accept-Encoding: gzip",
"Accept-Encoding: deflate"
],
"Uri": "http:[Omitted]?function=RFC_PING_AND_WAIT",
"Method": "POST"
},
"Response": {
"Body": "<?xml version=\"1.0\"?>\r\n<RESULT></RESULT>",
"Headers": [
"Set-Cookie: [Omitted]",
"Server: SAP",
"Server: NetWeaver",
"Server: Application",
"Server: Server/ABAP",
"Server: 731"
],
"StatusCode": 200
}
}