<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="Definitions_P07_GuaranteeRequirement" name="P07 Guarantee Requirement" namespace="http://hotel-national-zermatt/dmn">
  <decision id="Decision_P07_GuaranteeRequirement" name="Guarantee requirement decision">
    <decisionTable id="DecisionTable_P07_GuaranteeRequirement" hitPolicy="FIRST">
      <input id="Input_P07_RateType" label="Rate type">
        <inputExpression id="InputExpression_P07_RateType" typeRef="string">
          <text>rateType</text>
        </inputExpression>
      </input>
      <input id="Input_P07_ChannelRisk" label="Channel risk">
        <inputExpression id="InputExpression_P07_ChannelRisk" typeRef="string">
          <text>channelRisk</text>
        </inputExpression>
      </input>
      <input id="Input_P07_LeadDays" label="Lead days">
        <inputExpression id="InputExpression_P07_LeadDays" typeRef="number">
          <text>leadDays</text>
        </inputExpression>
      </input>
      <input id="Input_P07_StayValue" label="Stay value CHF">
        <inputExpression id="InputExpression_P07_StayValue" typeRef="number">
          <text>stayValueChf</text>
        </inputExpression>
      </input>
      <output id="Output_P07_Required" label="Guarantee required" name="guaranteeRequired" typeRef="boolean" />
      <output id="Output_P07_HoldPct" label="Hold percent" name="holdPercent" typeRef="number" />
      <output id="Output_P07_Reason" label="Reason" name="reason" typeRef="string" />

      <rule id="Rule_P07_NonRefundable">
        <inputEntry id="Rule_P07_NonRefundable_Rate"><text>"non_refundable"</text></inputEntry>
        <inputEntry id="Rule_P07_NonRefundable_Channel"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_NonRefundable_Lead"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_NonRefundable_Value"><text>-</text></inputEntry>
        <outputEntry id="Rule_P07_NonRefundable_Required"><text>true</text></outputEntry>
        <outputEntry id="Rule_P07_NonRefundable_HoldPct"><text>100</text></outputEntry>
        <outputEntry id="Rule_P07_NonRefundable_Reason"><text>"non-refundable plan requires full guarantee"</text></outputEntry>
      </rule>

      <rule id="Rule_P07_HighRiskShortLead">
        <inputEntry id="Rule_P07_HighRiskShortLead_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_HighRiskShortLead_Channel"><text>"high"</text></inputEntry>
        <inputEntry id="Rule_P07_HighRiskShortLead_Lead"><text>&lt;= 14</text></inputEntry>
        <inputEntry id="Rule_P07_HighRiskShortLead_Value"><text>-</text></inputEntry>
        <outputEntry id="Rule_P07_HighRiskShortLead_Required"><text>true</text></outputEntry>
        <outputEntry id="Rule_P07_HighRiskShortLead_HoldPct"><text>60</text></outputEntry>
        <outputEntry id="Rule_P07_HighRiskShortLead_Reason"><text>"high-risk channel close to arrival"</text></outputEntry>
      </rule>

      <rule id="Rule_P07_HighValue">
        <inputEntry id="Rule_P07_HighValue_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_HighValue_Channel"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_HighValue_Lead"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_HighValue_Value"><text>&gt;= 2000</text></inputEntry>
        <outputEntry id="Rule_P07_HighValue_Required"><text>true</text></outputEntry>
        <outputEntry id="Rule_P07_HighValue_HoldPct"><text>40</text></outputEntry>
        <outputEntry id="Rule_P07_HighValue_Reason"><text>"high booking value requires protection"</text></outputEntry>
      </rule>

      <rule id="Rule_P07_DefaultNoGuarantee">
        <inputEntry id="Rule_P07_DefaultNoGuarantee_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_DefaultNoGuarantee_Channel"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_DefaultNoGuarantee_Lead"><text>-</text></inputEntry>
        <inputEntry id="Rule_P07_DefaultNoGuarantee_Value"><text>-</text></inputEntry>
        <outputEntry id="Rule_P07_DefaultNoGuarantee_Required"><text>false</text></outputEntry>
        <outputEntry id="Rule_P07_DefaultNoGuarantee_HoldPct"><text>0</text></outputEntry>
        <outputEntry id="Rule_P07_DefaultNoGuarantee_Reason"><text>"standard booking risk accepted"</text></outputEntry>
      </rule>
    </decisionTable>
  </decision>
</definitions>
