Hi Team,
i have created an external account for whatsApp routing and extended the nms:delivery
and added the below enumeration:
<enumeration basetype="byte" default="mail" label="Channel" name="messageType">
<value desc="WhatsApp" img="cus:whatsApp.png" label="WhatsApp" name="whatsApp"
value="85"/>
</enumeration>
now i can see the same in the routing.
i have also configured a js for the connector with the below code
loadLibrary("xtk:shared/nl.js");
NL.require('/nl/core/shared/xtk.js')
.require('/nl/core/shared/js.js');
function processDeliveryPart(xmlDeliveryPart)
{
//logInfo(xmlDeliveryPart.toXMLString());
var deliveryId = xmlDeliveryPart["@delivery-id"].toString()
var returnMessage = <messages successOnSent="false"/>;
//Send WhatsApp Message
for each(var message in xmlDeliveryPart.message){
//configure the https post call
}
}
------------------------------------------
i have updated the delivery form with below to use whatsApp same as SMS
<!--[of]:Mobile-->
<container img="nms:mobile.png" label="SMS" name="mobileDefinition" visibleIf="EV(@messageType, 'sms', 'whatsApp') and @deliveryMode!=0">
--------------------------
<container name="smsContentEditor" propagateConstraints="false" type="visibleGroup"
visibleIf="EV(@messageType, 'sms', 'whatsApp') and EV([smsParameters/@mobileMsgType], 'mms')=false">
<container name="notebook" type="contentEditor" xpath="smsParameters">
<container img="xtk:text.png" label="Text content" name="tabSMS" readOnlyIf="[/tmp/@readOnly] or ([/ignored/@limitEdition] and [/ignored/@contentStatus]!=10)">
<input fullToolbar="true" htmlMode="false" name="ctSource" nolabel="true"
type="htmlSource" xpath="../content/sms/source" xpathInsert="/ignored/customizeSMSContent">
<container>
<input menuId="deliveryMenuBuilder" type="customizeBtn" xpath="/ignored/customizeSMSContent"/>
</container>
</input>
</container>
now when i execute the delivery i am getting the below warning and the message is not getting sent.
could some one please help me out? please let me know if i'm missing something.
Thanks,
Shine v.v