Mapping typecodes to external system codes

Your PolicyCenter application can share or exchange data with one or more external applications. If you use this functionality, Guidewire recommends that you configure the PolicyCenter typelists to include typecode values that are one-to-one matches to those in the external applications. If the typecode values match, sending data to, or receiving data from, those applications requires no additional effort on the part of an integration development team.

However, there can be more complex cases in which mapping typecodes one-to-one is not feasible. For example, suppose that it is necessary to map multiple external applications to the same PolicyCenter typecode, but the external applications do not match. Alternatively, suppose that you extend your typecode schema in PolicyCenter. This can possibly cause a situation in which three different codes in PolicyCenter represent a single (less granular) code in the other application.

To handle these more complex cases, edit the file typecodemapping.xml in the configuration > config > typelists.mapping folder. This file specifies a namespace for each external application. Then you identify the individual unique typecode maps by typelist.

A typecode mapping example

The following code sample illustrates a simple typecodemapping.xml file:

<?xml version="1.0"?>
<typecodemapping>
  <namespacelist>
    <namespace name="accounting"/>
  </namespacelist>

  <typelist name="AccountSegment">
    <mapping typecode="PR" namespace="accounting" alias="ACT"/>
  </typelist>
</typecodemapping>

The namespacelist element contains one or more namespace elements—one for each external application. Then, to map the actual codes, specify one or more typelist elements as required. Each typelist element refers to a single internal or external typelist in the application. The typelist, in turn, contains one or more mapping elements. Each mapping element must contain the following attributes:

Attribute

Description

typecode

The PolicyCenter typecode.

namespace

The namespace to which PolicyCenter maps the typecode

alias

The code in the external application.

In the previous example, the PR PolicyCenter code maps to an external application named accounting. You can create multiple mapping entries for the same PolicyCenter typecode or the same name space. For example, the following specifies a mapping between multiple PolicyCenter codes and a single external code:

<typelist name="BoatType">
  <mapping typecode="AI" namespace="accounting" alias="boat"/>
  <mapping typecode="HY" namespace="accounting" alias="boat"/>
</typelist>

After you define the mappings, from an external system you can use the TypelistToolsAPI web service to translate the mappings. See Mapping typecodes and external system codes.