Apply communication rules

The communication rules are applied by the CCM_Communication standard process on each communication that it creates. The communications to create for a correspondence are determined by the correspondence rules, which are also applied by CCM_Communication.

The communication rules are applied one by one, first in the order in which the rule sets are referenced from the alias table, and then within each rule set.

The communication rules are applied to an XML serialization of a communication under construction, which is an intermediary form between a correspondence and a communication. A communication under construction begins as a copy of a correspondence, and is gradually extended with information about the communications. After the communication rules are applied, the correspondence specific components are removed, leaving a normal communication at the end.

For the communication rules, a communication under construction is simply called a communication. The XML serialization is defined by the CcmBomCommunicationInput XSD. You can find the B&OM XSD files in: <deploy root>\KCM\Documentation\<KCM version>\Resources\Schemas\Output Management.

Example

<ccm:Communication Label=”Original” RecipientType="Customer" Channel="Print"
                   xmlns:ccm=”http://www.kofax.com/ccm”
                   xmlns:data="http://www.kofax.com/ccm/data" 
                   xmlns:ct=”http://www.kofax.com/ccm/contact”
                   xmlns:st="http://www.kofax.com/ccm/slottype">
  <ccm:Sender>
    <ct:Id>PQR</ct:Id>
    <ct:Name>John</ct:Name>
  </ccm:Sender>
  <ccm:Recipients>
    <ccm:Recipient Type="Customer">
      <ct:Id>XYZ</ct:Id>
      <ct:Name>Bob</ct:Name>
    </ccm:Recipient>
    <ccm:Recipient Type="Intermediairy">
      <ct:Id>ABC</ct:Id>
      <ct:Name>Alice</ct:Name>
    </ccm:Recipient>
  </ccm:Recipients>
  <ccm:OrganisationalMetadata>
    <data:Key1>value1</data:Key1>
    <data:Key2>value2</data:Key2>
  </ccm:OrganisationalMetadata>
  <ccm:Slots>
    <ccm:Slot Name="Cover" 
              Selected=”true” Disposable=”true”>
      <ccm:SlotType Name="MySlotType">
        <ccm:Customs>
          <st:Field/>
        </ccm:Customs>
      </ccm:SlotType>
    </ccm:Slot>
    <ccm:Slot Name="Document"
              Overlay="MyOverlay"
              Selected=”false” Disposable=”false”>
      <ccm:SlotType Name="MySlotType">
        <ccm:Customs>
          <st:Test>Test</st:Test>
        </ccm:Customs>
      </ccm:SlotType>
    </ccm:Slot>
  </ccm:Slots>
  <ccm:AllowedChannels>
    <ccm:All>Print:Email</ccm:All>
    <ccm:First>Print</ccm:First>
  </ccm:AllowedChannels>
</ccm:Communication>

The following information of the communication under construction is available to the communication rules:

  • Contact data of the sender, if any.
  • Selected recipient type. Initially not filled in.
  • Type and contact data of the allowed recipients. Removed at the end, with the exception of the contact data of the selected recipient type.
  • Organisational metadata.
  • Composed slots. Of each slot, the following information is available:
    • Slot type.
    • Slot identifier.
    • Overlay to be applied, if any.
    • Selected flag. Modifiable, boolean. Initially set to false. At the end, all slots with Selected set to false are removed, and the Selected flag itself is removed.
    • Disposable flag. Non-modifiable. Initially set to false. You can set it to true for cover letters that are added to the communication.
    • List of allowed channels. Modifiable. Initially, this list is empty and is removed at the end. Access to the channels is provided to the list as a whole, and to the first element on the list.

  • Selected channel. Initially not filled in.

Objects defined in the B&OM Repository are always referenced by their names. In the input communication, this concerns the channels, slot type, and overlay of a slot.