Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Delivery Input Form Modification

Avatar

Level 3
Hi, I need to create one more tab in the delivery template Properties Input form. What tags and modifications need to be added in the nms:delivery Input form. Thanks, Ram.
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @ramprakasht3196 

 

You will to add another container tag to your nms:delivery form to add more tabs.

 

Copy the code from nms:delivery in a code editor and search for the below code:

<container colcount="2" name="general">
      <container colcount="2" colspan="2" type="visibleGroup" visibleIf="[/ignored/@dlvNotReady]=''">
        <input discardReadOnly="true" xpath="@label"/>
        <input xpath="@internalName"/>
      </container>
      <container colspan="2" type="visibleGroup" visibleIf="[/ignored/@dlvNotReady]!=''">
        <input xpath="@label"/>
      </container>
      <container applicableIf="HasPackage('nms:messageCenter')" colspan="2" type="visibleGroup"
                 visibleIf="[/ignored/@triggerMessage]=1">
        <input xpath="triggerMessage/@eventType"/>
      </container>
      <container colcount="3" type="visibleGroup" visibleIf="[/ignored/@triggerMessage]!=1">
        <input xpath="@deliveryCode"/>
        <input xpath="@campaignWave"/>
        <input xpath="@iCPSegment"/>
        <input xpath="@campaignSegment"/>
        <input xpath="@sendType"/>
        <input xpath="@deliveryVersion"/>
      </container>
      <input colspan="2" xpath="@nature"/>
  <!-- Display landingPage linkedit. Filter on landingPage of the operation or landingPage without operation -->
      <container applicableIf="HasPackage('crm:lead')" colspan="2" type="visibleGroup"
                 visibleIf="EV(@messageType, 'mail') and ([/ignored/@useLandingPage] or [/ignored/@operationId]=0)">
        <input img="crm:landingPage.png" notifyPathList="[renderApp/@internalName],[renderApp/@id]"
               writeAccess="true" xpath="landingPage">
          <sysFilter>
        <!-- Two tests here to prevent use of BoolOperator which seems to be weird sometimes -->
            <condition enabledIf="$(/ignored/@operationId)!=0" expr="[@operation-id] = 0 OR [@operation-id] = $long(/ignored/@operationId)"/>
            <condition enabledIf="$(/ignored/@operationId)=0" expr="[@operation-id] = 0"/>
          </sysFilter>
        </input>
      </container>
      <input colspan="2" discardReadOnly="true" xpath="desc"/>
      <container colspan="2" type="visibleGroup" visibleIf="@isModel and ([/ignored/@dlvNotReady]='' or [/tmp/@showFolder]==1)">
        <input img="nms:campaign.png" xpath="folderProcess">
          <sysFilter>
            <condition expr="@model = 'nmsDelivery'"/>
          </sysFilter>
        </input>
        <input img="nms:deliveryModel.png" writeAccess="true" xpath="folder">
          <sysFilter>
            <condition expr="@model = 'nmsDeliveryModel'"/>
          </sysFilter>
        </input>
      </container>
      <container colspan="2" type="visibleGroup" visibleIf="@isModel=false and ([/ignored/@dlvNotReady]='' or [/tmp/@showFolder]==1) and ([/tmp/processId]==0 or [/tmp/processId]==''or [/tmp/@showFolder]==1)">
        <input img="nms:campaign.png" writeAccess="true" xpath="folder">
          <sysFilter>
            <condition expr="@model = 'nmsDelivery'"/>
          </sysFilter>
        </input>
      </container>
      <container colspan="2" type="visibleGroup" visibleIf="[/ignored/@dlvNotReady]=''">
        <input enumImage="@messageType" img="nms:extAccount.png" notifyPathList="@messageType,@deliveryMode,@id,@messageType,@deliveryMode,@account,@mobileConnector,@active,@label,lineService/@id"
               xpath="deliveryProvider">
          <enter name="onChange">
            <if expr="HasPackage('nms:mobileApp') AND @isModel">
          <!-- When creating a delivery model for push, we have to generate some default parameters needed for the connector -->
          <!-- Ensure that the values below are the same than the ones in the delivery templates located in the mobileApp package -->
          <!-- Reset any existing params. Can happen when switching models -->
              <reset xpath="/delivery/content/iosCheckParams/source[*]"/>
              <reset xpath="/delivery/content/iosNotifType/source[*]"/>
              <reset xpath="/delivery/content/androidCheckParams/source[*]"/>
              <reset xpath="/delivery/content/androidService/source[*]"/>
              <reset xpath="/delivery/content/androidCollapseKey/source[*]"/>

              <if expr="EV(@messageType, 'ios')">
                <set value="0" xpath="/delivery/content/iosNotifType/source"/>
                <set value="&lt;%   if( appSubscription.mobileApp.password!='' &amp;&amp; appSubscription.mobileApp.uuid !='' &amp;&amp;       appSubscription.mobileApp.certificate!='' &amp;&amp; String(appSubscription.mobileApp.sandbox)!='' &amp;&amp;       appSubscription.mobileApp.label &amp;&amp; appSubscription.mobileApp.img &amp;&amp;       String(message.delivery.idTracking)!='' &amp;&amp; String(message.delivery.idMarketing)!='' )   { %&gt; 'OK' &lt;%   }   else   { %&gt; 'Error' &lt;%   } %&gt;"
                     xpath="/delivery/content/iosCheckParams/source"/>
              </if>

              <if expr="EV(@messageType, 'android')">
                <set value="&lt;%= appSubscription.mobileApp.uuid %&gt;" xpath="/delivery/content/androidService/source"/>
                <set value="&lt;%= message.id %&gt;" xpath="/delivery/content/androidCollapseKey/source"/>
                <set value="&lt;%   if( appSubscription.mobileApp.label!='' &amp;&amp; appSubscription.mobileApp.img!='' &amp;&amp;       appSubscription.mobileApp.senderId!='' &amp;&amp; appSubscription.mobileApp.password!='' &amp;&amp;       String(message.delivery.idTracking)!='' &amp;&amp; String(message.delivery.idMarketing)!='' )   { %&gt; 'OK' &lt;%   }   else   { %&gt; 'Error' &lt;%   } %&gt;"
                     xpath="/delivery/content/androidCheckParams/source"/>
              </if>
            </if>
          </enter>
          <sysFilter>
            <condition expr="@type = 3 and @active = 1"/>
            <condition enabledIf="!$(/delivery/@isModel)" expr="@messageType = $(/delivery/@messageType)"/>
            <condition enabledIf="!$(/delivery/@isModel)" expr="(@deliveryMode = $(/delivery/@deliveryMode) or (@deliveryMode in (1,4) and $(/delivery/@deliveryMode) in (1,4)))"/>
          </sysFilter>
        </input>
        <container applicableIf="HasPackage('nms:campaign')" type="visibleGroup"
                   visibleIf="[@operation-id]!=0 and [@workflow-id]!=0 and (EV(@deliveryMode, 'external') or [@linkedDelivery-id]!=0)">
          <container label="Main delivery" type="frame">
            <input createMode="none" fullLoad="true" label="Deliveries" notifyPathList="@offerSpace-id"
                   xpath="linkedDelivery">
              <sysFilter>
                <condition expr="@id!=$(@id)"/>
                <condition expr="@messageType=$(@messageType)"/>
                <condition enabledIf="$(@isModel)==false" expr="@isModel=0"/>
                <condition enabledIf="$(@isModel)" expr="@isModel=1"/>
                <condition expr="[@linkedDelivery-id]=0 and [@operation-id]!=0 and [@workflow-id]!=0"/>
                <condition expr="([@operation-id]=$(@operation-id) or [@operation-id]=$long(/ignored/@linkedOperation-id))"/>
              </sysFilter>
            </input>
            <input expr="Iif([@linkedDelivery-id]!=0, 1, 0)" type="expr" xpath="/ignored/@hasParentDelivery"/>
            <static label="The file extraction is performed from the specified main delivery."
                    type="help"/>
          </container>
        </container>
      </container>
    </container>
   

Just paste  the same code again and make the new modification and if you want to save these values to the database then you will have extend the nms:delivery schema and map the xpath with the input fields.

 

Let me know if that helps

 


     Manoj
     Find me on LinkedIn

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @ramprakasht3196 

 

You will to add another container tag to your nms:delivery form to add more tabs.

 

Copy the code from nms:delivery in a code editor and search for the below code:

<container colcount="2" name="general">
      <container colcount="2" colspan="2" type="visibleGroup" visibleIf="[/ignored/@dlvNotReady]=''">
        <input discardReadOnly="true" xpath="@label"/>
        <input xpath="@internalName"/>
      </container>
      <container colspan="2" type="visibleGroup" visibleIf="[/ignored/@dlvNotReady]!=''">
        <input xpath="@label"/>
      </container>
      <container applicableIf="HasPackage('nms:messageCenter')" colspan="2" type="visibleGroup"
                 visibleIf="[/ignored/@triggerMessage]=1">
        <input xpath="triggerMessage/@eventType"/>
      </container>
      <container colcount="3" type="visibleGroup" visibleIf="[/ignored/@triggerMessage]!=1">
        <input xpath="@deliveryCode"/>
        <input xpath="@campaignWave"/>
        <input xpath="@iCPSegment"/>
        <input xpath="@campaignSegment"/>
        <input xpath="@sendType"/>
        <input xpath="@deliveryVersion"/>
      </container>
      <input colspan="2" xpath="@nature"/>
  <!-- Display landingPage linkedit. Filter on landingPage of the operation or landingPage without operation -->
      <container applicableIf="HasPackage('crm:lead')" colspan="2" type="visibleGroup"
                 visibleIf="EV(@messageType, 'mail') and ([/ignored/@useLandingPage] or [/ignored/@operationId]=0)">
        <input img="crm:landingPage.png" notifyPathList="[renderApp/@internalName],[renderApp/@id]"
               writeAccess="true" xpath="landingPage">
          <sysFilter>
        <!-- Two tests here to prevent use of BoolOperator which seems to be weird sometimes -->
            <condition enabledIf="$(/ignored/@operationId)!=0" expr="[@operation-id] = 0 OR [@operation-id] = $long(/ignored/@operationId)"/>
            <condition enabledIf="$(/ignored/@operationId)=0" expr="[@operation-id] = 0"/>
          </sysFilter>
        </input>
      </container>
      <input colspan="2" discardReadOnly="true" xpath="desc"/>
      <container colspan="2" type="visibleGroup" visibleIf="@isModel and ([/ignored/@dlvNotReady]='' or [/tmp/@showFolder]==1)">
        <input img="nms:campaign.png" xpath="folderProcess">
          <sysFilter>
            <condition expr="@model = 'nmsDelivery'"/>
          </sysFilter>
        </input>
        <input img="nms:deliveryModel.png" writeAccess="true" xpath="folder">
          <sysFilter>
            <condition expr="@model = 'nmsDeliveryModel'"/>
          </sysFilter>
        </input>
      </container>
      <container colspan="2" type="visibleGroup" visibleIf="@isModel=false and ([/ignored/@dlvNotReady]='' or [/tmp/@showFolder]==1) and ([/tmp/processId]==0 or [/tmp/processId]==''or [/tmp/@showFolder]==1)">
        <input img="nms:campaign.png" writeAccess="true" xpath="folder">
          <sysFilter>
            <condition expr="@model = 'nmsDelivery'"/>
          </sysFilter>
        </input>
      </container>
      <container colspan="2" type="visibleGroup" visibleIf="[/ignored/@dlvNotReady]=''">
        <input enumImage="@messageType" img="nms:extAccount.png" notifyPathList="@messageType,@deliveryMode,@id,@messageType,@deliveryMode,@account,@mobileConnector,@active,@label,lineService/@id"
               xpath="deliveryProvider">
          <enter name="onChange">
            <if expr="HasPackage('nms:mobileApp') AND @isModel">
          <!-- When creating a delivery model for push, we have to generate some default parameters needed for the connector -->
          <!-- Ensure that the values below are the same than the ones in the delivery templates located in the mobileApp package -->
          <!-- Reset any existing params. Can happen when switching models -->
              <reset xpath="/delivery/content/iosCheckParams/source[*]"/>
              <reset xpath="/delivery/content/iosNotifType/source[*]"/>
              <reset xpath="/delivery/content/androidCheckParams/source[*]"/>
              <reset xpath="/delivery/content/androidService/source[*]"/>
              <reset xpath="/delivery/content/androidCollapseKey/source[*]"/>

              <if expr="EV(@messageType, 'ios')">
                <set value="0" xpath="/delivery/content/iosNotifType/source"/>
                <set value="&lt;%   if( appSubscription.mobileApp.password!='' &amp;&amp; appSubscription.mobileApp.uuid !='' &amp;&amp;       appSubscription.mobileApp.certificate!='' &amp;&amp; String(appSubscription.mobileApp.sandbox)!='' &amp;&amp;       appSubscription.mobileApp.label &amp;&amp; appSubscription.mobileApp.img &amp;&amp;       String(message.delivery.idTracking)!='' &amp;&amp; String(message.delivery.idMarketing)!='' )   { %&gt; 'OK' &lt;%   }   else   { %&gt; 'Error' &lt;%   } %&gt;"
                     xpath="/delivery/content/iosCheckParams/source"/>
              </if>

              <if expr="EV(@messageType, 'android')">
                <set value="&lt;%= appSubscription.mobileApp.uuid %&gt;" xpath="/delivery/content/androidService/source"/>
                <set value="&lt;%= message.id %&gt;" xpath="/delivery/content/androidCollapseKey/source"/>
                <set value="&lt;%   if( appSubscription.mobileApp.label!='' &amp;&amp; appSubscription.mobileApp.img!='' &amp;&amp;       appSubscription.mobileApp.senderId!='' &amp;&amp; appSubscription.mobileApp.password!='' &amp;&amp;       String(message.delivery.idTracking)!='' &amp;&amp; String(message.delivery.idMarketing)!='' )   { %&gt; 'OK' &lt;%   }   else   { %&gt; 'Error' &lt;%   } %&gt;"
                     xpath="/delivery/content/androidCheckParams/source"/>
              </if>
            </if>
          </enter>
          <sysFilter>
            <condition expr="@type = 3 and @active = 1"/>
            <condition enabledIf="!$(/delivery/@isModel)" expr="@messageType = $(/delivery/@messageType)"/>
            <condition enabledIf="!$(/delivery/@isModel)" expr="(@deliveryMode = $(/delivery/@deliveryMode) or (@deliveryMode in (1,4) and $(/delivery/@deliveryMode) in (1,4)))"/>
          </sysFilter>
        </input>
        <container applicableIf="HasPackage('nms:campaign')" type="visibleGroup"
                   visibleIf="[@operation-id]!=0 and [@workflow-id]!=0 and (EV(@deliveryMode, 'external') or [@linkedDelivery-id]!=0)">
          <container label="Main delivery" type="frame">
            <input createMode="none" fullLoad="true" label="Deliveries" notifyPathList="@offerSpace-id"
                   xpath="linkedDelivery">
              <sysFilter>
                <condition expr="@id!=$(@id)"/>
                <condition expr="@messageType=$(@messageType)"/>
                <condition enabledIf="$(@isModel)==false" expr="@isModel=0"/>
                <condition enabledIf="$(@isModel)" expr="@isModel=1"/>
                <condition expr="[@linkedDelivery-id]=0 and [@operation-id]!=0 and [@workflow-id]!=0"/>
                <condition expr="([@operation-id]=$(@operation-id) or [@operation-id]=$long(/ignored/@linkedOperation-id))"/>
              </sysFilter>
            </input>
            <input expr="Iif([@linkedDelivery-id]!=0, 1, 0)" type="expr" xpath="/ignored/@hasParentDelivery"/>
            <static label="The file extraction is performed from the specified main delivery."
                    type="help"/>
          </container>
        </container>
      </container>
    </container>
   

Just paste  the same code again and make the new modification and if you want to save these values to the database then you will have extend the nms:delivery schema and map the xpath with the input fields.

 

Let me know if that helps

 


     Manoj
     Find me on LinkedIn