...
- On the Connected Apps page, click Create Instance as shown below.
The Create Instance page appears as shown below.. - Enter the instance Name and Description. The next step is to define the credentials and connection details for this instance.
Enter the base URL to which Luma needs to connect.
The Authorization Type is used by Luma to login and perform the specified operations as part of the Web Service operation.
Luma supports the following authorizations types:
- No Auth: Use this option, if you do not need any authentication to log in to the third-party systems.
- Basic Auth: Use this option to authenticate the external applications to interact with the Luma tenant. Basic auth consists of the following fields:
- Username: Specify the Username. Luma uses it as an authentication username to login to third-party systems.
- Password: Specify the Password. Luma uses this password while authenticating to the third-party system.
- Authorization Header Name: By default the Authorization Header Name is specified as Authorization by Luma.
- Bearer Token: This is the unique authentication token required for external applications to communicate with the Luma API.
Bearer token consists of the following fields:- Authorization Header Name: By default the Authorization Header Name is specified as Authorization by Luma.
- Token: Enter the unique authentication token required for external applications to communicate with the Luma API.
- Path Parameter: The path parameter is part of a path segment that occurs after its name. Path parameters offer a unique opportunity to dynamically replace the values and pass them in the URL. Example, http://myserver.com/some-path/{parameter1}/path-continued/{parameter2}.
- Enter the External Field and the Value.
- Query Parameter: The query parameters are sometimes referred to as optional parameters. The query parameters are separated from the hierarchical parameters by the question mark. Query parameters appear in the URL after the question mark (
?
) after the resource name. https://myserver.com/resource-name?param1=value1¶m2=value2.- Enter the External Field and the Value.
- Headers: Headers are mostly classified as request headers. You will have to set the request headers when you are sending the request.
- Enter the External Field and the Value.
The following sample headers are encountered the most.- Authorization: Includes credentials containing the authentication information of the client for the resource being requested.
Accept-Charset: This is a header that is set with the request and tells the server about which character sets are acceptable by the client.
Content-Type: Indicates the media type (text/HTML or text/JSON, XML/custom) of the response sent to the client by the server, this will help the client in processing the response body correctly.
- Enter the External Field and the Value.
Click Create to create the app instance.
Info The first instance that you add is considered as the default instance.
...
- On the Connected Apps page, click Create Operation as shown below.
The Create Operation page appears as shown below. - In the Operation Details tab, enter the Operation Name.
- The system automatically displays the default Skill Domain of the tenant.
- Uniform Resource Identifier (URI), is used to refer to the information resource. Enter the URI.
- Select the operation Method. It uses an API request chaining framework for bots to push or request data from your websites, systems, and web applications using Webservices.
The following operation methods are available:- Get: To retrieve data
- Post: To create data
- Put: To edit the data
- Delete: To delete the data
- Patch: To make partial updates to the resource
- The system automatically displays the Supported Operation as invoke REST API.
- Specify the operation Timeout (in milliseconds), the amount of time to wait for a web service response when invoking an outbound request. The default value is 10000 milliseconds, 10 seconds, and the maximum allowed value is 3 mins, 180000 milliseconds.
- Click Next to specify the Request Configuration details.
The Request Configuration page appears as shown below. - Path Parameters: The path parameter is part of a path segment that occurs after its name. Path parameters offer a unique opportunity to dynamically replace the values and pass them in the URL. Example, http://myserver.com/some-path/{parameter1}/path-continued/{parameter2}. You can overwrite the configuration defined at the instance level or continue using the same and you may need to add the operation-specific variable and values.
- Enter the External Field and the Value.
- Query Parameters: The query parameters are sometimes referred to as optional parameters. The query parameters are separated from the hierarchical parameters by the question mark. Query parameters appear in the URL after the question mark (
?
) after the resource name. https://myserver.com/resource-name?param1=value1¶m2=value2. You can overwrite the configuration defined at the instance level or continue using the same and you may need to add the operation-specific variable and values.- Enter the External Field and the Value.
- Headers: Headers are mostly classified as request headers. You will have to set the request headers when you are sending the request. You can overwrite the configuration defined at the instance level or continue using the same and you may need to add the operation-specific variable and values.
- Enter the External Field and the Value.
The following sample headers are encountered the most.- Authorization: Includes credentials containing the authentication information of the client for the resource being requested.
Accept-Charset: This is a header that is set with the request and tells the server about which character sets are acceptable by the client.
Content-Type: Indicates the media type (text/HTML, text/JSON, XML/custom or multipart/form-data) of the response sent to the client by the server, this will help the client in processing the response body correctly.
Info - Use multipart/form-data as Content-Type to send an attachment file to the client-server.
- If you wish to overwrite the Global Header configurations defined at the Instance level, select Ignore Global Headers. The system will then consider the configurations defined at the Operation level. Similarly, you may overwrite the Path Parameter and Query parameter as well.
- Enter the External Field and the Value.
- Outbound Payload: Request payload needs to be passed to complete the request. Form Data is the default encoding a web form uses to transfer data. The text box area accepts simple key-value pairs and complex/nested JSON.
To send an attachment as Outbound payload, use Attachment Mapping. Enter a External Field and select an attribute with datatype File as Value.
- Click Next to create the Response Configuration.
...
- Click on Add Attribute
- To Set an attribute, add the below details.
- Expression Type and Expression: These represent the type (Value or JSON) and the location path of the value to be assigned to attribute.
- Use Expression Type → Value when a value to be assigned to the attribute e.g. @{response.body}, @{response.code}.
- Use Expression Type → JSONPath when a value from the received JSON response is to be assigned to the attribute e.g. Expression points to a JSON path e.g. $.data.TicketIdentifier, $.data.items[*].Priority.
- Use Expression Type → Indirect JSONPath when a value from a JSON-type attribute is to be assigned to the attribute e.g. Expression points to an attribute that holds a JSON path e.g. @{local.items}→$.[*].TicketIdentifier
- Use Expression Type → Xpath when a value to be assigned to the attribute i.e. Expression points to a Path e.g. //AddResponse/Description
- Use Expression Type → Script when a value to be assigned to the attribute using a javascript.
- Scope: Represents the scope of the attribute to be used to hold the inbound values
- Use Global to assign value to a Global attribute to be used in the skill. Though the attributes are available for other skills to use, the value is retained during the skill execution.
- Use Local to create and set the value to a local attribute. These attributes are only valid and available during skill execution. The local variable value is retained between the prompts and is used to pass data between multiple integrations, user messages, or rules. If used after a bot response, the value in the Local attribute is lost.
- Use User Custom to assign value to a User Custom Attribute. These attributes retain values assigned unless overwritten.
- Attribute: This is the name of the attribute
- Data Type: Represents the data type of the value
- Expression Type and Expression: These represent the type (Value or JSON) and the location path of the value to be assigned to attribute.
- To use the Transformation function use Transform. For more information on how to use Transform functions, refer Transformation functions
Info |
---|
|
Error Handling
This section is used to define the behavior and bot response to the user when the operation execution results in an error. You can create multiple rules handling errors from web service operations.
...