Creating a service profile

  1. Select System > Service > Create Service Profile.
  2. Specify this information:
    Service Profile Name
    Specify a name for the service profile.
    Format
    Select Json or Xml.
    Host Address
    Specify the endpoint for the service profile. This is the URL of the API that you're connecting to. It may include a query string, depending on the requirements of the API. For example, you may need to pass in authentication credentials or a search term.

    The query string can include template variables, which are placeholders for values from your database. To add a template variable, enclose the name of the property that you want in double curly braces.

    Note that you're entering a property name without specifying which object or component this property belongs to. Identification of the object or component depends on the context in which the service profile is used. For example, if a service profile is used for AutoComplete, the component is defined in the AutoComplete configuration.

    Request Method
    Select the request method, such as Get or Post.
    Headers
    Specify the headers for the service profile. The required headers are defined by the API that you're using. For example, you may need to include an authorization token.
    Business Objects
    Add any business objects that you want to use for this service profile. This makes the properties of the selected objects available for use in the request contents.
    Contents
    Specify the request body for this service profile. For example, this might be a SOAP message or a chunk of XML, as required by the API.
    Note: Whether you need to specify a request body depends on the request method. For example, this field is typically not used for GET requests.

    You can include template variables in the request contents. The properties of the objects in the Business Objects grid are listed in a tree to the right of the Contents field. To add a template variable to the request contents, double-click the property that you want to use.

    Response Mapping
    Define the response mappings for this service profile.

    A response mapping takes either a hard-coded value or a property from the response to the API request and maps it to a destination. The destination is not any particular property in Infor Public Sector, it is simply the name that you want to use for this value when processing the response.

    To use a hard-coded value, enter it in the Value column. To use a property from the response, enter it in the Source column. Use either XPath or JSONPath syntax for the Source column, depending on the response format.

    Success Conditions
    Specify the conditions under which the response to this service profile's request message is considered a success. The value in the Name column refers to a destination in the Response Mapping grid.
    Note: The Success Conditions grid assumes an AND when multiple conditions are defined. To implement an OR, you must use a condition configuration formula.
  3. Click Save.