The outbound web service process is used to request data from an external application and to process the response in D365 FO, via an external web service.

Only D365 FO can trigger an outbound web service action. When triggered, the outbound web service action automatically runs the defined messages.
This flow shows a general overview of the outbound web service process that is started when an outbound web service action is triggered.


D365 FO (Handler class) D365 FO (Handler class) Web service (Client HTTP class) Web service (Client HTTP class) Web service action  triggered by batch job Web service action  triggered by batch job Web service request message is run Web service request message is run When triggered, the outbound 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 the web service with data from D365 FO. If the HTTP action is: Post, use the request message to provide the web service with the data to be created in the external application.  Put, use the request message to provide the web service with the data to be updated in the external application. Get, you can use the request message to provide the web service with search criteria to get the desired data. If no request message is defined, the web service is triggered based on the resource. In this case, the web service defines which data is sent back. Note: If the web service access type is: SOAP: The output of the request message is added to the request in a SOAP envelope. In this case, make sure this is properly set up in the target document and the field mapping of the request message. REST: The output of the request message is used to parameterize the URL. Patch, use the request message to provide the web service with the data to be updated in the external application. Use this to only update a part of a resource. For example, only update a contact person of a customer. Delete, use the request message to provide the web service with the data to be deleted from the external application. Post or put, use the request message to provide the web service with the data to create or update data in the external application. To determine if the data must be created or updated, on the web service action, an attribute must be defined with the Key check box selected. For a request 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. What is the  web service response? What is the  web service response? 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 outbound web service process, the requested data is received from the web service, the outbound 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 processes the response from the web service in D365 FO. If the HTTP action is: Post, Put, Delete, Patch, or Post or Put, you can use the response message to process the answer from the web service. Get, use the response message to process the requested data, as received from the web service, in D365 FO. For a response 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. The received data is imported in D365 FO  and the web service history status is updated The received data is imported in D365 FO  and the web service history status is updated The web service history status is set to Finished The web service history status is set to Finished 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 outbound web service process, an error is received from the web service, the outbound 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 processes the error from the web service in D365 FO. For example, you can use an error message to change the status of a record in D365 FO. For an error 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. The D365 FO data is updated, the received error is logged in the web service history,  and the list The D365 FO data is updated, the received error is logged in the web service history,  and the list The received error is logged in the web service history and the history status is set to Error The received error is logged in the web service history and the history status is set to Error Web service action  triggered by project/task Web service action  triggered by project/task Web service action  triggered by outbound queue Web service action  triggered by outbound queue Web service action  triggered manually Web service action  triggered manually External web service receives request and responds to it External web service receives request and responds to it The external web service receives the request and responds to it. Requested data  is received from  web service Error is received  from web service Yes No

Activities

Name Responsible Description

Web service request message is run

D365 FO (Handler class)

When triggered, the outbound 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 the web service with data from D365 FO.
If the HTTP action is:
  • Post, use the request message to provide the web service with the data to be created in the external application. 
  • Put, use the request message to provide the web service with the data to be updated in the external application.
  • Get, you can use the request message to provide the web service with search criteria to get the desired data. If no request message is defined, the web service is triggered based on the resource. In this case, the web service defines which data is sent back. Note: If the web service access type is:
    • SOAP: The output of the request message is added to the request in a SOAP envelope. In this case, make sure this is properly set up in the target document and the field mapping of the request message.
    • REST: The output of the request message is used to parameterize the URL.
  • Patch, use the request message to provide the web service with the data to be updated in the external application. Use this to only update a part of a resource. For example, only update a contact person of a customer.
  • Delete, use the request message to provide the web service with the data to be deleted from the external application.
  • Post or put, use the request message to provide the web service with the data to create or update data in the external application. To determine if the data must be created or updated, on the web service action, an attribute must be defined with the Key check box selected.
For a request 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 response message is run

D365 FO (Handler class)

When in an outbound web service process, the requested data is received from the web service, the outbound 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 processes the response from the web service in D365 FO.

If the HTTP action is:
  • Post, Put, Delete, Patch, or Post or Put, you can use the response message to process the answer from the web service.
  • Get, use the response message to process the requested data, as received from the web service, in D365 FO.
For a response 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 error message is run

D365 FO (Handler class)

When in an outbound web service process, an error is received from the web service, the outbound 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 processes the error from the web service in D365 FO. For example, you can use an error message to change the status of a record in D365 FO.
For an error 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.

External web service receives request and responds to it

Web service (Client HTTP class)

The external web service receives the request and responds to it.

Provide feedback