Adding Business Interfaces
Business interfaces are encapsulated from third-party interfaces, and are then associated and invoked by the Interface Invoking diagram element. The IVN supports RESTful interfaces.
According to the analysis in Configuration Scenario, you need to add multiple business interfaces. All the business interfaces are used in cache variable mode, and no real interface is invoked. If you need to invoke a real interface in actual scenarios, refer to this section.
The business interface orchestration capability is insufficient. Therefore, in actual applications, the interface adaptation team must provide the invoked interfaces to prevent the interface definition differences between different systems.
For example, if we need to invoke an interface to obtain the values of two parameters from two interfaces in the actual business system, the interfaces need to be orchestrated to one interface for invocation.
Prerequisites
You have contacted the system administrator to add the IP address or domain name of the third-party interface to be invoked to the trustlist.
Procedure
- Sign in as a tenant administrator and choose .
- Choose New. . Click
- Add an interface by automatically generating a message body or manually entering a message body. The following describes how to add an interface in either of the two ways.
- Add an interface by automatically generating a message body.
- On the Automatic Message Body tab page, set basic information about the interface to be invoked, including the interface name, request method, and request URL.
- When Request Method is set to TUC, enter one of the following URLs in the Request URL text box based on site requirements. For details about the input and output parameters of the interface, see TUC Interfaces.
Table 1 Request URLs when Request Method is set to TUC URL
Description
/chatbot/rest/tuc/v1/nlp/detectRegularEntity
Rule entity detection used in the case flow.
/chatbot/rest/tuc/v1/nlp/identify
Language interface.
/chatbot/rest/tuc/v1/recommendFaq
FAQ recommendation interface.
/chatbot/rest/tuc/v1/qualityInspection/qiOnline/recognize
Interface for intelligent assistant real-time inspection.
/chatbot/rest/tuc/v1/nlp/feedback
Satisfaction feedback interface.
/chatbot/rest/tuc/v1/nlp/textClassify
Text classification interface.
/chatbot/rest/tuc/v1/nlp/detectEntity
Entity recognition interface.
/chatbot/rest/tuc/v1/qualityInspection
Intelligent training interface.
HTTP is not secure and may cause security risks. HTTPS is recommended.
- Sign: Set this parameter based on whether signature verification is performed on the third-party interface. If signature verification is enabled, contact the third party to provide the shared key.
- If signature verification is disabled, security risks exist. You are advised to enable signature verification.
- If signature verification is enabled, after the shared key provided by the third party is changed periodically, change the shared key on this page accordingly.
- When Request Method is set to TUC, enter one of the following URLs in the Request URL text box based on site requirements. For details about the input and output parameters of the interface, see TUC Interfaces.
- (Optional) If the interface has query parameters, add the query parameters, that is, Interface request URL?Path parameter 1=Parameter value&Path parameter 2=Parameter value.
- Add interface input parameters. On the Input Parameter tab page, click Add. Generally, the input parameters of the interface are the same as those of the third-party system interface specifications.
For security purposes, set Encrypted to if the input parameter contains personal data, such as the customer ID card number.
- Add interface output parameters. On the Output Parameter tab page, click Add. The output parameters of the interface are the same as those of the third-party system interface specifications.
For security purposes, set Encrypted to if the output parameter contains personal data, such as the customer ID card number.
The following figure shows how to set Path. To obtain the entire return result, set Path to $. To obtain a field, add $ at the beginning and use periods (.) to separate each level. The level structure must be the same as the structure of the return result. Otherwise, the parsing fails, or the required field cannot be obtained.
Figure 1 Output parameter configuration example
- (Optional) Add an interface message header. On the Message Header tab page, add the authentication information required by the interface. If the information does not exist, ignore this step. The authentication information is configured based on the specifications of the third-party system.
For security purposes, set Encrypted to YES if the interface message header contains personal data, such as the customer ID card number.
- On the Message Body tab page, view the automatically generated message body. You can copy the generated message to the commissioning tool to check whether the interface can be invoked successfully.
- Click Confirm.
- On the Automatic Message Body tab page, set basic information about the interface to be invoked, including the interface name, request method, and request URL.
- Add an interface by manually entering a message body.
- Click the Manual Message Body tab. Set basic information about the interface to be invoked, including the interface name, request method, and request URL. For details about the parameters, see 4.a.
- (Optional) If the interface has query parameters, add the query parameters, that is, Interface request URL?Path parameter 1=Parameter value&Path parameter 2=Parameter value.
- Add interface output parameters. On the Output Parameter tab page, click Add. The output parameters of the interface are the same as those of the third-party system interface specifications.
For security purposes, set Encrypted to if the output parameter contains personal data, such as the customer ID card number.
The following figure shows how to set Path. To obtain the entire return result, set Path to $. To obtain a field, add $ at the beginning and use periods (.) to separate each level. The level structure must be the same as the structure of the return result. Otherwise, the parsing fails, or the required field cannot be obtained.
Figure 2 Output parameter configuration example
- (Optional) Add an interface message header. On the Message Header tab page, add the authentication information required by the interface. If the information does not exist, ignore this step. The authentication information is configured based on the specifications of the third-party system.
For security purposes, set Encrypted to YES if the interface message header contains personal data, such as the customer ID card number.
- Add a message body. On the Message Body tab page, enter the request message body. The following is an example:
{ "callId": "${businessReqId}", "provId": "202205130514", "busiType": "0", "params": { "tenantId": "${tenantId}" } }
If a message body is manually entered, the input parameters cannot be manually added. Instead, the input parameters are automatically generated by parsing the message body content. In the preceding example, two input parameters businessReqId and tenantId are generated. The input parameters businessReqId and tenantId can be variables that need to be transferred when the interface is invoked in the subsequent flow.
- Click Confirm.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot