Fun article this time !
Contact me /comment if you want to apply 😂😂😂 for the role!
Customer Paradigm Executive
Candidates must be able to mesh e-business users and grow proactive networks and evolve 24/7 architectures as well.
This position requires to syndicate innovative infomediaries and morph them with viral metrics in order to synergize back-end convergence.
The objective is to deliver brand wearable eyeballs and architect granular eyeballs deployed to B2B markets incentivizing leading-edge e-business and disintermediating 24/7 relationships.
You will also have to aggregate revolutionary communities and whiteboard end-to-end systems in order to orchestrate dynamic convergence and effectively monetize efficient interfaces that can morph scalable e-markets.
Hi this time instead of downloading data from Neolane or updating recipients in it , we want to use Neolane as email cannon leveraging its powerful template engine to manage the email look & feel and deciding on the fly ,using Neolane API, the targets of our mass email campaign.
So the use case is the following : define in Neolane an email template with some fields mapping and leverage Neolane API to send email using this template but defining the email recipients externally and also the contents of the mapped fields .
According to the official Adobe documentation this can be done using the Neolane Business Oriented Apis (we looked into the Data Oriented Apis in our previous articles) as specified here:
Unfortunately the documentation is not really clear/complete and I had really to dig inside adobe logs, error codes and soap responses to have this working properly, and here is some sample code that can help you.
The code is made using the sample provided inside the Adobe documentation (external file mapping with data coming from the CDATA section inside the delivery xml tag structure).
Here the c# code:
string sessionToken = "Look at other Neolane Code samples on how retrieve the session token";
string securityToken = "Look at the other Neolane Code samples on how retrieve the security token";
string scenario ="Write here the internal name of the delivery template";
HttpWebRequest reqData = (HttpWebRequest)WebRequest.Create(adobeApiUrl);
reqData.ContentType = "text/xml; charset=utf-8";
reqData.Headers.Add("cookie", "__sessiontoken=" + sessionToken);
reqData.Method = "POST";
string strWriteHeader = "<?xml version='1.0' encoding='ISO-8859-1'?>" +
"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:urn=\"urn:nms:delivery\">" +
"<urn:sessiontoken>" + sessionToken + "</urn:sessiontoken>" +
" <urn:strScenarioName>" +scenario+ "</urn:strScenarioName>"+
string strWriteRecipientBody = "<delivery> " +
"<targets fromExternalSource=\"true\"> " +
"<externalSource><![CDATA[MsgId|ClientId|Title|Name|FirstName|Mobile|Email|Market_segment|Product_affinity1|Product_affinity2|Product_affinity3|Product_affinity4|Support_Number|Amount|Threshold " +
"</targets> " +
string strWriteFooter = " </urn:elemContent>" +
string bodyData = strWriteHeader + strWriteRecipientBody + strWriteFooter;
byte byteArrayData = Encoding.UTF8.GetBytes(bodyData);
// Set the ContentLength property of the WebRequest.
reqData.ContentLength = byteArrayData.Length;
// Get the request stream.
Stream dataStreamInputData = reqData.GetRequestStream();
// Write the data to the request stream.
dataStreamInputData.Write(byteArrayData, 0, byteArrayData.Length);
// Close the Stream object.
var responseData = reqData.GetResponse();
Stream dataStreamData = responseData.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader readerData = new StreamReader(dataStreamData);
// Read the content.
string responseFromServerData = readerData.ReadToEnd();
// Clean up the streams and the response.