The inbound web service process is used to receive a request from and send a response to an external application, via an inbound web service.

The inbound web service can be an IIS application or Azure Logic Apps. This inbound web service receives the HTTP requests from the external application.
Depending on the execution mode, the inbound web service process runs directly or asynchronously. When triggered, the inbound web service action runs the defined messages.
This flow shows a general overview of the inbound web service process when run directly (Run asynchronous = 'No').
When the web service action is triggered, the request message is run. Depending on the result and setup, also a response message or error message is run.


D365 FO (Handler class) D365 FO (Handler class) Web service Web service Start Start Inbound web service action is triggered Inbound web service action is triggered The inbound web service application triggers the applicable inbound web service action. Based on these parameters in the HTTP request, the inbound web service calls the executeWebserviceOperation method that determines which web service action is triggered: Project (ProjectId): Does a Connectivity studio project exist in D365 FO with this ID? Web service action (WebServiceId): Does an inbound web service action exist with this ID? HTTP action (HttpMethod): What is the goal of the HTTP request? Does this goal match with the HTTP action as defined for the web service action? User name (UserName): Is this user set up as web service user? And is this user allowed to run the web service action? URL (Url): If REST, does the URL contain arguments? And what are the values of these arguments? Content (content): For both the web service types (Basic or REST), if HTTP action is Post, Put, Delete, Patch, or Post or Put, the content contains the values to be processed. If the web service type is SOAP and the HTTP action is Get, the content contains the arguments of type parameter. What are the values of these arguments? Company ID (companyId): Is the web service action and web service user combination valid for this company? Web service request message is run Web service request message is run When triggered, the inbound web service action first runs the request message, if defined. This is managed by the handler class as defined for the web service action. The goal of the request message depends on the HTTP action of the web service action. In general, the request message provides D365 FO with data from the external application. If the HTTP action is: Post, use the request message to provide the data to be created in D365 FO.  Put, use the request message to provide the data to be updated in D365 FO. Get, no request message is used. The data to be get is defined by arguments. So, if the HTTP action is Get, set up the relevant arguments. Patch, use the request message to provide the data to be updated in D365 FO. Use this to only update a part of a record. For example, only update a contact person of a customer. Delete, use the request message to provide the data to be deleted from D365 FO. Post or put, use the request message to provide the data to be created or updated in D365 FO. For a request message the: Source connector must be of type Azure file storage or Web service Source document must be an external file-based document. Target connector must be of type D365 FO. Target document must be an internal document. Did the request message  run successfully? Did the request message  run successfully? Is a response message defined  for the web service action? Is a response message defined  for the web service action? Web service response message is run Web service response message is run When in an inbound web service process, the requested data is received from D365 FO, the inbound web service action runs the response message, if defined. This is managed by the handler class as defined for the web service action. The goal of the response message depends on the HTTP action of the web service action. In general, the response message sends the response from D365 FO to the inbound web service. If the HTTP action is: Post, Put, Delete, Patch, or Post or Put, you can use the response message to process the answer to the inbound web service. The RecIds that are defined in the request message, are the input for the response message. Get, use the response message to process the requested data from D365 FO to the inbound web service. The arguments that are defined for the inbound web service action, define the input for the response message. For a response message the: Source connector must be of type D365 FO. Source document must be an internal document. Target connector must be of type Azure file storage or Web service. Target document must be an external file-based document. Is an error message defined  for the web service action? Is an error message defined  for the web service action? Web service error message is run Web service error message is run When in an inbound web service process, the request message did not run successfully or an error occurred, the inbound web service action runs the error message, if defined. This is managed by the handler class as defined for the web service action. The error message sends the error information from D365 FO to the inbound web service. For example, you can use an error message to change the status of a record in the external application. If the HTTP action is Post, Put, Delete, Patch, or Post or Put, the errors in the message history of the request message define the input of the response message. For an error message the: Source connector must be of type D365 FO. Source document must be an internal document. Target connector must be of type Azure file storage or Web service. Target document must be an external file-based document. End End Inbound web service receives HTTP request from external application Inbound web service receives HTTP request from external application The inbound web service application receives an HTTP request from the external application. Inbound web service receives response and sends it to external application Inbound web service receives response and sends it to external application The inbound web service receives a response and sends it to the external application. Yes No Yes No response message: A 'True' reaction is  sent to the web service The requested data is  sent to the web service Yes No error message: The error log is sent  to the web service The error information is  sent to the web service

Activities

Name Responsible Description

Inbound web service action is triggered

D365 FO (Handler class)

The inbound web service application triggers the applicable inbound web service action.
Based on these parameters in the HTTP request, the inbound web service calls the executeWebserviceOperation method that determines which web service action is triggered:
  • Project (ProjectId): Does a Connectivity studio project exist in D365 FO with this ID?
  • Web service action (WebServiceId): Does an inbound web service action exist with this ID?
  • HTTP action (HttpMethod): What is the goal of the HTTP request? Does this goal match with the HTTP action as defined for the web service action?
  • User name (UserName): Is this user set up as web service user? And is this user allowed to run the web service action?
  • URL (Url): If REST, does the URL contain arguments? And what are the values of these arguments?
  • Content (content):
    • For both the web service types (Basic or REST), if HTTP action is Post, Put, Delete, Patch, or Post or Put, the content contains the values to be processed.
    • If the web service type is SOAP and the HTTP action is Get, the content contains the arguments of type parameter. What are the values of these arguments?
  • Company ID (companyId): Is the web service action and web service user combination valid for this company?

Web service request message is run

D365 FO (Handler class)

When triggered, the inbound web service action first runs the request message, if defined. This is managed by the handler class as defined for the web service action.
The goal of the request message depends on the HTTP action of the web service action. In general, the request message provides D365 FO with data from the external application.

If the HTTP action is:
  • Post, use the request message to provide the data to be created in D365 FO. 
  • Put, use the request message to provide the data to be updated in D365 FO.
  • Get, no request message is used. The data to be get is defined by arguments. So, if the HTTP action is Get, set up the relevant arguments.
  • Patch, use the request message to provide the data to be updated in D365 FO. Use this to only update a part of a record. For example, only update a contact person of a customer.
  • Delete, use the request message to provide the data to be deleted from D365 FO.
  • Post or put, use the request message to provide the data to be created or updated in D365 FO.
For a request message the:
  • Source connector must be of type Azure file storage or Web service
  • Source document must be an external file-based document.
  • Target connector must be of type D365 FO.
  • Target document must be an internal document.

Web service response message is run

D365 FO (Handler class)

When in an inbound web service process, the requested data is received from D365 FO, the inbound web service action runs the response message, if defined. This is managed by the handler class as defined for the web service action.
The goal of the response message depends on the HTTP action of the web service action. In general, the response message sends the response from D365 FO to the inbound web service.

If the HTTP action is:
  • Post, Put, Delete, Patch, or Post or Put, you can use the response message to process the answer to the inbound web service. The RecIds that are defined in the request message, are the input for the response message.
  • Get, use the response message to process the requested data from D365 FO to the inbound web service. The arguments that are defined for the inbound web service action, define the input for the response message.
For a response message the:
  • Source connector must be of type D365 FO.
  • Source document must be an internal document.
  • Target connector must be of type Azure file storage or Web service.
  • Target document must be an external file-based document.

Web service error message is run

D365 FO (Handler class)

When in an inbound web service process, the request message did not run successfully or an error occurred, the inbound web service action runs the error message, if defined. This is managed by the handler class as defined for the web service action.
The error message sends the error information from D365 FO to the inbound web service. For example, you can use an error message to change the status of a record in the external application.

If the HTTP action is Post, Put, Delete, Patch, or Post or Put, the errors in the message history of the request message define the input of the response message.
For an error message the:
  • Source connector must be of type D365 FO.
  • Source document must be an internal document.
  • Target connector must be of type Azure file storage or Web service.
  • Target document must be an external file-based document.

Inbound web service receives HTTP request from external application

Web service

The inbound web service application receives an HTTP request from the external application.

Inbound web service receives response and sends it to external application

Web service

The inbound web service receives a response and sends it to the external application.

Provide feedback