Posts

Showing posts with the label Adobe Campaign Classic

Campaign classic sequence of execution of different Javascript Code Bloc inside a workflow delivery

Image
 Every time I have to add some advanced JS code inside Delivery I am confused about the sequence of JS. When it comes to Delivery, then there are multiple places where you can write the JS  Right Click on Delivery > Open > Go to Script Tab  Right Click on Delivery > Open > Go to Advanced Tab Typology Rule of type Control There are many phases where the rule will be run. I was trying to run the rule as much late as possible and thus had chosen "At the end of the analysis" Ignoring the option of adding JS code inside the Routing External account > Connector and Post processing workflow as I didn't run that Here is the result While the delivery is waiting at "Approve Targeting" , the log for the recurring delivery activity at workflow level looks like below The delivery log looks like below for the Typology Rules Note: At this stage the broadlog is not created and that makes sense as the Targeting is not approved yet While the  delivery is waiting at...

Looping using subset inside a big batch in Adobe Campaign

Image
 I had many scenarios where I ran a costly query to select some good no of records and then process them further. But when it comes to processing I had to restrict the number of records to be processed in one go. And once the subset is processed, then select from the table again and then process the subset. Something like below where the end activity calls the signal when the complement from Split has more than 0 records to start the whole process again. But the problem is every time you have to run the costly select process to process a fraction of the records. As a result the overall throughput is decreased heavily. As an alternate I used a looping through the selected records avoiding selection every time I need to process the subset. Here the JS Activity after select is dummy one but required. I added a log in it with count. Test activity is also needed to ensure we have the exit path from the loop. In the above example the select query fetched 8680 records and then split restr...

Broadlog Resequencing in Adobe Campaign Classic

 As we all know, the max value for any auto primary key field in Adobe is limited by the max of int which is 2.15B [[+/-) 2,147,483,647]]. As ACC doesn't support bigint as the auto pk column data type, you have to recycle the number every time it reaches near to that 2.14B mark.  Now Broadlog tables being the most heavily used table in ACC, we observe the issue often with this table but this can happen with other tables as well like Tracking and so on. It is not difficult to recycle the value of the sequence in ACC, but most of the time the BL and TL data is shared with downstream systems. So, once you reset the sequence, you have to make sure the downstream system knows about it and handle it properly without overwriting the existing historical records. And that is where these types of challenges are faced How do we inform downstream when ACC is resetting its sequence If downstream is managing the uniqueness of the records, then they have to prefix something to make sure it i...

Displaying data in an email from one to many relation table

Image
We know that boradLogRcp has a one to many relationship (1 to N) with recipient schema. So for every recipient I want to show all the emails sent to him/her Create a simple workflow to select the recipients of your choice Add a delivery/recurring delivery and pull the OTB default email template and configure it with below code <TABLE> <TBODY> <TR> <TD>Campaign name</TD> <TD>Delivery Name</TD> <TD>Event Date</TD> </TR> <% for(var i = 0 ; i<recipient.broadLog.length; i++) { document.write("<tr>"); document.write("<td>" + recipient.broadLog[i].delivery.operation.label + "</td>"); document.write("<td>" + recipient.broadLog[i].delivery.label + "</td>"); document.writ...

Avoid Proxy for HttpClientRequest - IOB-090007 Network error (send(), errno=10054: an existing connection was forcibly closed by the remote host

This is Friday night 8:10 PM and I was frustratingly stuck with an annoying issue on something that I have done so many times, but still unable to figure out what is wrong since last night. Finally it was a silly mistake and I found that. So wanted to capture it so that I don't need to spend another day and half just to figure out why the same thing is not working I was making a call to Silverpop XMLAPI to get the jessionid via the login method. And the code is something like below, very basic one var http = new HttpClientRequest ( "http://api2.ibmmarketingcloud.com/XMLAPI" ); try { http . method = 'POST' ; http . header [ "ClientId_Internal" ] = "XYZABCD" ; http . header [ "ClientSecret_Internal" ] = "DSFDSOFNJSDF" ; http . header [ "Content-Type" ] = "application/x-www-form-urlencoded" ; var reqestBody = "xml=" + encodeURIComponent ( "...

Call stored procedure from Adobe Campaign Classic

Image
One member of our team working on a different project asked me if there is a way to call Stored Procedure from Adobe Campaign Classic workflow. He was looking to get an option to receive an output parameter also. So I thought of trying a POC and here is the outcome. In my local instance I had Sql Server and thus thought about testing few other sql server specific features Step 1: Create a basic stored procedure ALTER PROCEDURE USP_GetRecipient     -- Add the parameters for the stored procedure here     @ageGreaterThan int = 0,     @state Varchar(20) = '',     @totalRows int OUTPUT AS BEGIN     SET NOCOUNT ON;        SELECT @totalRows = Count(1) from NmsRecipient r;     SELECT iRecipientId,sEmail from NmsRecipient r where [dbo].[YearsDiff](GETDATE(),r.tsBirth) > @ageGreaterThan and sStateCode = @state     Select top 10 iOfferId,sName from NmsOffer where...