Hi,
I have created a custom delivery channel for outbound messages. The problem I have is that the service provider is returning with an Message ID once the message has been received our failed to a jssp on the Adobe campaign server. How can I find the providerId that I set in the connector so I can match the status to a broadlog entry.
I use the following JS connector:
//-----------------------------------------------------------------------------
// Neolane Delivery Connector Methods
//-----------------------------------------------------------------------------
function processDeliveryPart(deliveryPart){
var msgs = <messages/>;
for each( var msg in deliveryPart.message ) {
var broadLogId = msg.@id.toString(); // always the "good" broadlog ID
var mobilePhone = msg.custom.recipient.@mobilePhone.toString().replace('+','').replace(/ /g,''); //Remove + and spaces
var address = msg.@address;
logInfo(msg.toXMLString());
try{
var messageId = send(mobilePhone, broadLogId, msg.mmsInternal); //Custom code for sending the message return the messageId that can be used later to reconcile the status repport.
msgs.appendChild(<message id={broadLogId} status="1" providerId={messageId} address={address}/>);
}catch(e){
var errorMessage = e.toString();
msgs.appendChild(<message id={broadLogId} address={address} status="2" noRetry="false"
log={errorMessage} failureReason="20" failureType="1"/>);
}
}
return msgs;
}
//-----------------------------------------------------------------------------
// Useless here, but needed by Neolane
//-----------------------------------------------------------------------------
function getStatus(xml){
var msgs = <messages/>;
return msgs;
}
//-----------------------------------------------------------------------------
// Useless here, but needed by Neolane
//-----------------------------------------------------------------------------
function getMessages(xml){
var msgs = <messages/>;
return msgs;
}