You can use the inbound web service process to receive a request from and send a response to an external application, via an inbound web service. To manage the inbound web service process, set up an inbound web service action.


Application Consultant Application Consultant Start Start How to run the  web service application? How to run the  web service application? Set up inbound web service - Azure App Service

Set up inbound web service - Azure App Service

If you want to run the inbound web service application in the cloud, use an Azure App Service.

Set up inbound web service - Azure Logic Apps

Set up inbound web service - Azure Logic Apps

Instead of an Azure App service, you can use other applications to run an inbound web service in the cloud. An often-used alternative is an Azure Logic App.

This topic explains globally how to set up the web service using Azure Logic App. For more information on Azure Logic Apps, refer to Azure Logic Apps documentation.

Set up inbound web service - IIS application

Set up inbound web service - IIS application

If you want to run the inbound web service application on premise, use the predefined IIS application.
You can use the IIS application to route external HTTP requests to the applicable inbound web service actions in D365 FO.
Prerequisites:
Before you set up the IIS application, make sure:
  • The on-premises server has Internet Information Services installed and .NET 4.6 (or higher).
  • A D365 FO environment with Connectivity studio installed runs in the cloud or on premises.

Apply custom code to directly use custom services Apply custom code to directly use custom services You can develop custom code outside D365 FO to directly run a custom service that is provided for Connectivity studio web services.To use the external custom code to run a:SOAP-based custom service, use this URL:https://Instancename.cloudax.dynamics.com/soap/services/BisWsWebserviceOperation?wsdlJSON-based custom service, use one of these URLS:https://Instancename.cloudax.dynamics.com/api/services/BisWsWebserviceOperation/BisWsWebserviceCall/executeOperation. This is the basic URL.https://Instancename.cloudax.dynamics.com/api/services/BisWsWebserviceOperation/BisWsWebserviceCall/executeOperationV2. Use this URL if you want to run the web service for a specific company. The 'companyId' parameter in the body parameters is only applicable if you use this URL. Make sure the D365 FO user has permission to access the specified company. Set up web service action - Inbound Set up web service action - Inbound You can use the inbound web service process to receive a request from and send a response to an external application, via an inbound web service. For each inbound web service action, you can define these messages: Request message: The request message provides D365 FO with data from the external application. Response message: The response message sends the response from D365 FO to the inbound web service. Error message: The error message sends the error information from D365 FO to the inbound web service. An inbound web service action can only be triggered by an inbound web service. When triggered, the inbound web service action automatically runs the defined messages. Procedure 1. Click Connectivity studio Integration Design. 2. Click the Web service tab. 3. Click New. 4. In the Web service action field, type the unique name of the web service action. 5. In the Project field, enter or select a value. 6. In the HTTP action field, select an option. 7. Sub-task: Set web service action properties. 8. Expand the Properties section. 9. In the Acts as field, select 'Inbound'. 10. In the Web service type field, select an option. 11. In the Run asynchronously field, select an option. 12. Define the request message 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. In the Request message field, enter or select a value. Note: If the HTTP action is Get, no request message is used. 13. In the Response message field, enter or select a value. 14. In the Error message field, enter or select a value. 15. Sub-task: Set up arguments. 16. Expand the Arguments section. 17. Click New. 18. In the Document field field, enter or select a value. 19. Use the range type to indicate how the document field value of the source document of the response message is defined. You can use these types: - Value: Use a fixed value for the document field. - Custom: Use a static method to define the value of the document field. - Parameter: Use a value of a parameter in the HTTP request as the value for the document field. In the Range type field, select an option. Note: If the range type is Parameter and the web service type is: - REST, the parameter is added to the URL as shown in the Properties section. On receipt of the HTTP request, the parameter value is retrieved from the HTTP request URL and used as value for the document field. - Basic (SOAP), make sure the parameter argument names are communicated to the external application. These parameters must be added to the content of the HTTP request. On receipt of the HTTP request, the parameter value is retrieved from the HTTP request content and used as value for the document field. 20. In the Range field, type a value. 21. The style is only applicable if the web service type is REST and the range type is Parameter. For an inbound web service action, only these styles are applicable: - QUERY - TEMPLATE In the Style field, select an option. Note: If you use parameter arguments and the web service type is REST, the sequence of the arguments is important. You can use the Move up and Move down buttons to change the argument sequence. 22. Sub-task: Set custom handler. 23. Expand the Custom section. 24. In the Handler field, enter or select a value. 25. Sub-task: Set history settings. 26. Expand the History section. 27. Select Yes in the Create history report field. 28. Close the page. Notes In the Properties section, the URL to trigger the inbound web service action is shown. When you have finished the setup of the inbound web service action, you can communicate the URL to the external application. So, they can use it to call the inbound web service to get the requested data.This URL consists of these parts, in this sequence:- IIS application path: To be filled in manually before you communicate the URL to the external application. If you use Azure Logic Apps as inbound web service, this part of the URL is not applicable.- biswebservice: This is a fixed part of the URL that is added automatically. So, each URL always contains this part.- Web service type as defined for the web service action.- HTTP action: Only added if the web service type is Basic (SOAP).- Project of the web service action.- Web service action name.- Parameter of type TEMPLATE, if defined as argument. In the URL, template parameters are always positioned between the web service action name and QUERY parameters. A template parameter is shown between braces ({}). This is only added if the web service type is REST.- Parameter of type QUERY, if defined as argument. In the URL, query parameters are always positioned at the end and preceded with a question mark (?). This is only added if the web service type is REST.On the web service action page, the URL can, for example, be:[Your URL]/biswebservice/rest/Project1/IWSA-Customer/{TemplateParameter1}?QueryParameter1=Your Value[Your URL]/biswebservice/SOAP/Post/Project1/IWSA-Customer Run inbound web service  asynchronously? Run inbound web service  asynchronously? Set up default response text Set up default response text If you run the inbound web service process asynchronously, define the default response text that is sent back to the web service when the web service action is triggered.You run an inbound web service process asynchronously if, for the inbound web service action, the Run asynchronously field has one of these values:AsynchronousBatchExample of a default response text:{"response": "We have received the request."} Procedure 1. Click Connectivity studio Integration Design. 2. Click the Web service tab. 3. In the list, find and select the desired inbound web service action. 4. Click Edit. 5. On the Action Pane, click Design. 6. Click Default response text. 7. In the Default response text field, type a value. 8. Click OK. 9. Close the page. Set up web service user Set up web service user Set up the external users that are allowed to access the inbound web service to start an inbound web service action.For each external web service user, define:The allowed inbound web service actions.The companies in which the web service action is allowed to run.If the inbound web service application (IIS application or Azure Logic Apps) receives an HTTP request from an external application, it calls a D365 FO method to check:If the external user, as defined in the HTTP request, is defined as web service user.If it is allowed to start the web service action for the web service user.If it is allowed to run the web service action for the web service user in the company, as defined in the HTTP request. Procedure 1. Go to Connectivity studio > Setup > Web service > Web service user. 2. Click New. 3. In the UserName field, type a value. 4. In the Display name field, type a value. 5. In the Note field, type a value. 6. Sub-task: Define allowed web service actions. 7. Expand the Web service section. 8. Click New. 9. In the Web service action field, enter or select a value. 10. In the Valid for field, select an option. 11. In the Company group field, enter or select a value. 12. In the Company field, enter or select a value. 13. Close the page. 14. Close the page. End End Azure  App Service Others: for example  Azure Logic Apps On premise Custom development Yes No

Activities

Name Responsible Description

Set up inbound web service - Azure App Service

Application Consultant

If you want to run the inbound web service application in the cloud, use an Azure App Service.

Set up inbound web service - Azure Logic Apps

Application Consultant

Instead of an Azure App service, you can use other applications to run an inbound web service in the cloud. An often-used alternative is an Azure Logic App.
This topic explains globally how to set up the web service using Azure Logic App. For more information on Azure Logic Apps, refer to Azure Logic Apps documentation.

Set up inbound web service - IIS application

Application Consultant

If you want to run the inbound web service application on premise, use the predefined IIS application.
You can use the IIS application to route external HTTP requests to the applicable inbound web service actions in D365 FO.
Prerequisites:
Before you set up the IIS application, make sure:
  • The on-premises server has Internet Information Services installed and .NET 4.6 (or higher).
  • A D365 FO environment with Connectivity studio installed runs in the cloud or on premises.

Apply custom code to directly use custom services

Application Consultant

You can develop custom code outside D365 FO to directly run a custom service that is provided for Connectivity studio web services.
To use the external custom code to run a:
  • SOAP-based custom service, use this URL:
    • https://Instancename.cloudax.dynamics.com/soap/services/BisWsWebserviceOperation?wsdl
  • JSON-based custom service, use one of these URLS:
    • https://Instancename.cloudax.dynamics.com/api/services/BisWsWebserviceOperation/BisWsWebserviceCall/executeOperation. This is the basic URL.
    • https://Instancename.cloudax.dynamics.com/api/services/BisWsWebserviceOperation/BisWsWebserviceCall/executeOperationV2. Use this URL if you want to run the web service for a specific company. The 'companyId' parameter in the body parameters is only applicable if you use this URL. Make sure the D365 FO user has permission to access the specified company.

Set up web service action - Inbound

Application Consultant

You can use the inbound web service process to receive a request from and send a response to an external application, via an inbound web service.
For each inbound web service action, you can define these messages:
  • Request message: The request message provides D365 FO with data from the external application.
  • Response message: The response message sends the response from D365 FO to the inbound web service.
  • Error message: The error message sends the error information from D365 FO to the inbound web service.
An inbound web service action can only be triggered by an inbound web service. When triggered, the inbound web service action automatically runs the defined messages.

Set up default response text

Application Consultant

If you run the inbound web service process asynchronously, define the default response text that is sent back to the web service when the web service action is triggered.
You run an inbound web service process asynchronously if, for the inbound web service action, the Run asynchronously field has one of these values:
  • Asynchronous
  • Batch
Example of a default response text:
{
"response": "We have received the request."
}

Set up web service user

Application Consultant

Set up the external users that are allowed to access the inbound web service to start an inbound web service action.
For each external web service user, define:
  • The allowed inbound web service actions.
  • The companies in which the web service action is allowed to run.
If the inbound web service application (IIS application or Azure Logic Apps) receives an HTTP request from an external application, it calls a D365 FO method to check:
  • If the external user, as defined in the HTTP request, is defined as web service user.
  • If it is allowed to start the web service action for the web service user.
  • If it is allowed to run the web service action for the web service user in the company, as defined in the HTTP request.

Inbound web service process

Inbound web service process - Asynchronous

Set up inbound web service - Azure App Service

Set up inbound web service - IIS application

Set up inbound web service - Azure Logic Apps

Provide feedback