This article contains the following topics:
As an administrator, you can set up the Web Service Lookup attribute. You can configure the attribute to retrieve information from an external system and display on the ticket. For example, you can populate ticket fields with hardware information such as the purchase date and warranty data that is stored on a CMDB tool.
Prerequisites
Before you configure the Web Service Lookup attribute, ensure that you have completed the following prerequisite tasks:
- Enable Web Service Invocation
- Select the ticket type to which the Web Service Lookup Attribute is associated.
Considerations
Two web service operations are configured:
One which returns multiple records. We can call it List Web Service operation. Map the List Web Service operation with the List Web Service field on the attribute. Configure this web service operation to accept one of the input parameters as a search string. The parameters are later mapped to the web service lookup.
One which returns a single record. We can call it Detail Web Service operation. Map the Detail Web Service operation with the Detail Web Service field. Input parameters for this web service call can map to one or more fields that are populated in list web service.
Configure the List Web Service and the Detail Web Service operations, such that they are related to each other.
Note: For more information about configuring Web Service Credentials and Web Service Operations, see Configure Outbound Web Services.The List Web Service operation retrieves records that are based on the search string that is provided in the lookup.
If Detail Web Service operation returns multiple fields, only the first record from the result is displayed.
When you configure the inbound mapping for the web services, you can map up to ten display Entity Fields. The display fields provide extra information for reference purpose, but are not saved on the ticket. The display fields appear on the web service lookup custom field.
- When you map a DateTime type attribute, the values appear on the ticket for reference purpose only. The values are not saved on the ticket.
- You can configure Web Service Lookup attribute only for SOAP web service calls and not for RESTful web service calls.
- You can enter up to 4000 characters as a search string in the lookup field on a ticket.
The search string that you enter in the lookup is not retained on the ticket. When you select a record from the search result, the related information appears in the mapped fields on the ticket.
The mapped fields on the ticket can display up to 4000 characters of the values that are returned from the web service lookup.
Configure Web Service Lookup Attribute
You can configure the Web Service Lookup attribute type as you would any other attribute.
For more information about creating attributes, see Create and Manage Attributes.
Configure Custom Field with Web Service Lookup Attribute
You can associate the Web Service Lookup attribute to a custom field template and can display it on a ticket. When you search on the custom field on a ticket, retrieved information from the web services displays on a pop-up. You can configure the following two fields for the web service lookup custom field:
- List Web Service: The service helps retrieve the records and display in a grid on the pop-up. You can populate the ticket with the fields mapped from the List Web Service.
- Detail Web Service (Optional): The service helps retrieve information for each record fetched by List Web Service. The information that the Detail Web Service retrieves is not populated on the ticket.
Note: Only the first 25 records that are retrieved from the external system are displayed on the custom field.
For more information about creating custom field templates, see Create and Manage Custom Field Templates.
Map Custom Fields with Web Services
After you have created the custom fields, map them with both the web services. You can follow this example to map the custom fields.
If the web service response is like shown in this example:
Then the field mappings for both Display Fields and Ticket Fields for both web services point to required attributes.
- Display Field 1: /result/record/attribute1
- Ticket/Custom Field: /result/record/attribute3
See standard XPath notations for more details.
Note: To pass the search string to the list web service, map the web service lookup attribute to the required web service parameter.
Best Practices for Setting Up Web Service Lookup Attributes
- To validate the web service operation that is created for a list web service, use a dummy ticket. When you use a ticket to validate the web service operation, the ticket is updated with the mapped information. Do not use a valid ticket for this purpose.
- Add the mapped custom ticket fields under a single section header. Users can easily spot the mapped values from the web service when they appear under a single section.
0 Comments