Target mapping in a delivery cannot read the worktable data

Alexandros2

02-08-2018

Summary: I cannot get my worktable data to get saved to the delivery log (broadLog). I'm using a custom target mapping that uses the [targetData/@fieldName] convention.

Detailed Explanation and steps

I have extended the delivery logs schema, nms:broadLogRcp, to include three additional fields that we need to use.

I have created this target mapping:

screenshot-adobe-1.png

And use this in my delivery:

screenshot-adobe-2.png

Once I run my workflow, I can confirm that the worktable data is there correctly, this is the worktable after the  delivery:

screenshot-adobe-3.png

and it might also be useful to mention that my variable names are correct, for instance in the delivery subject line I print out '<%= targetData.persadoVariationCode %>' and it's there.

Unfortunately, when I inspect my delivery logs, it seems that these attributes have not been copied over there after all:

screenshot-adobe-4.png

Am I doing something wrong with the target mapping, or missing a step somewhere?

Is there perhaps a way to debug what the target mapping does?

Client: Adobe Campaign v7 (7.0 build 8850)

Application server: 1.1 build 8850

Instance version: 6.1.1 build 8850

Thank you,

Alexandros

Accepted Solutions (1)

Accepted Solutions (1)

Vapsy

Employee

04-09-2018

Hi Alexandros2,

I'm testing on build 8896 which is different from yours. My broadlogRcp extension. Have dedicated a field for you

1564457_pastedImage_1.png

Here is the target mapping setup

1564461_pastedImage_10.png

1. Using a one time delivery with targetData coming directly from query activity in the form of hard-coded data.

1564458_pastedImage_3.png

When the workflow is executed the broadLogRcp gets the right value

1564459_pastedImage_4.png

2. Using One-time delivery but targetData is hardcoded and prepared in Enrichment

1564460_pastedImage_9.png

Executed the workflow and checked delivery logs. It is a success

1564462_pastedImage_11.png

3. Using one-time but targetData is prepared from schema inside query itself

1564466_pastedImage_14.png

Executed the workflow - Success

1564467_pastedImage_15.png

4. Using one-time but targetData is picked from schema and prepared in Enrichment

1564464_pastedImage_12.png

Executed workflow - Success

1564465_pastedImage_13.png

5. Recurring delivery with content hardcoded in query activity

1564468_pastedImage_16.png

Executed workflow - success

1564469_pastedImage_18.png

6. Recurring delivery with targetData content coming from schema in query activity

1564470_pastedImage_19.png

Executed workflow - Success

1564471_pastedImage_20.png

Since the update is too long, I tried with Enrichment as well and it works in every case.

I'll try to setup 8850 build to see if the issue is specific to it.

Regards,
Vipul

Answers (9)

Answers (9)

Alexandros2

04-09-2018

Vipul, first of all thanks so much for your thorough answer.

I don't think you should bother installing a different version. We just upgraded our sandbox two weeks ago and I have the same issue.

I did notice in your screenshots that the enrichment's column's alias is displayed as '@alexTest', but I don't recall using the @ notation there. It worked fine though. I'll double check that.

I will also check other details that you mention in your message in case I'm missing something obvious, and I'll get back to you.

Again, thanks!

Alexandros

Alexandros2

05-09-2018

Thank you Ankur, you had the answer from the start. It was indeed this, in my enrichment the alias did not have the @. I did not realize that was what you were saying before. I also realized that after Vipul's thorough message.

How can I mark 3 messages as the correct answer?

I really appreciate your time and effort, thank you.

Ankuragr

Employee

05-09-2018

Hi Alex,

When you are defining alias you should use @ with the fieldName for example @persadoVariationCode, If you use just persadoVariationCode then it won't work.

Regards,

Ankur A.

Vapsy

Employee

04-09-2018

Works on 8850 as well

1564479_pastedImage_1.png

I now feel there is something more to it. Can you please log a support ticket for the team to be able to check the root cause. works both for one-time and recurring delivery.

Alexandros2

04-09-2018

Thank you Vipul for the SQL logs hint, this was very useful.

I examined the logs and they seemed to do the correct thing. Here's the INSERT statement during the delivery:

INSERT INTO NmsBroadLogRcp (iBroadLogId, iDeliveryId, sAddress, iStatus, iFlags, tsEvent, tsLastModified, iMsgId, sPersadoCampaignName,sPersadoVariationCode,sPersadoGenopediaId,iRecipientId ) SELECT BL.iMessageId, 1136493815, BL.sAddress, CASE WHEN BL.iFailureReason = 0 THEN 6 ELSE 0 END, CASE WHEN BL.iFailureReason = 127 THEN 8 WHEN BL.sTargetCode = E'__MAIN__' THEN 0 WHEN BL.sTargetCode = E'__BAT__' THEN 2 ELSE 4 END, GetDate(), GetDate(), BL.iMsgId, BL.sPersadoCampaignName,BL.sPersadoVariationCode,BL.sPersadoGenopediaId,BL.iRecipientId FROM wkDlv_1136493815 BL WHERE BL.iFailureReason IN (0, 127)

I tried this again and I'm still having problems, I wonder if I'm missing something. I entered a static string value as the "source" of one column in the mapping and it worked correctly. So it seems that the data can either not be read from the workflow table for some reason.

Has anyone ever gotten this to work succesfully? Is the [targetData/@columnName] notation actually supported as that UI text says?

Alexandros2

04-09-2018

Ankur, could you elaborate a bit? I'm not sure I understand what you mean, especially on the first point.

Schema edit shouldn't be needed. I'm adding the proper alias in the enrichment and this adds my column just fine.

Ankuragr

Employee

03-09-2018

Hi Alex,

It could be the issue of element and attribute, when you defining alias for field you want to write in delivery log define it as @fieldname.

If field names are fine, then I suggest try using edit schema activity before delivery.

Regards,

Ankur A.