Expand my Community achievements bar.

Custom Channel delivery error

Avatar

Level 4

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. 

 

ShineVv0823_0-1667207756887.png

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.

ShineVv0823_1-1667208467717.png

 

 

could some one please help me out? please let me know if i'm missing something.

 

 

 

 

 

 

 

Thanks,

Shine v.v

1 Reply

Avatar

Level 4

i was able to make progress, i was sure that the new message Type along with it's external routing account has an issue, since the new routing was not calling the java script function xmlDeliveryPart at all during delivery execution.

 

And so i tried using an External Account Routing as Mobile(SMS) and the Connector as iOS Depricated, this has an connector to call a javascript as well. which i have called the whatsApp connector JS and tried executing the delivery, the delivery triggered fine and i was able recieve whatsApp message on my phone.

 

Can someone help me letting me know what are the changes i have to do for the new channel?

 

Thanks,

Shine v.v