Highlighted

Use of variables/temp schema data in an alert

davidh2892249

06-09-2017

Hi

I've been using this example https://forums.adobe.com/thread/2345035 a lot, it's really great 🙂

I have just been trying to implement a solution where I loop in information from the delivery schema (I'm also aggregating recipient delivery log data and adding to the temp schema using enrichment).

I have what I believe should be a working solution (I did a similar much simpler example with recipient data + recipient tracking log data that worked) however, when my workflow gets to the alert activity it errors and gives me the following message in the log:

Failed to load delivery ID 3611 into the cache: This delivery does not exist, has been deleted or the login does not have the required rights.

Firstly, all the deliveries that i want to loop into my alert exist and are visable when viewing "display target" of the temp schema.

Secondly, the delivery ID reference (ID 3611) doesn't make sense to me - delivery ID's are usually a longer number?

Could anyone shed any light on what this alert could be or how i could remedy?

Thanks

David

Replies

Highlighted

Vapsy

Employee

06-09-2017

Hi David,

Delivery with ID 3611 is the notification template available inside Administration > Production > Campaign Management > Technical delivery templates

It seems that your operator does not have access to it or someone has deleted this template

Regards,
vipul

Highlighted

davidh2892249

07-09-2017

Hi Vipul,

Thank you for your response. Very much appreciated.

I can see that delivery template. It does exist, and my operator does have access.

I sent myself an alert which uses it via workflow with a simple "alert test" static HTML message and it worked - so I don't understand why i'm getting that error.

I've given more detail on the workflow where the error occurs below, if you can offer any further insight - that would be great.

Thanks

David

---

Workflow build

1294216_pastedImage_0.png

Deliveries info Query (query)

To return deliveries that have success ratio less than 95% in last month (messages to send > 99 )

1294256_pastedImage_1.png

Failed Logs Info Query (query2)

To get the failed recipient delivery logs for each the same deliveries

Group by and count by Email Domain

1294257_pastedImage_2.png

Failed Logs Info - Deduplication - Keep Top 5 Error Domains Per Delivery ID (dedup)

Keep the top 5 email domains per delivery

1294258_pastedImage_3.png

Failed Logs Info - Enrichment - Add an auto PK (enrich)

Enrichment activity just to add a PK for each record (I didn't know an alternative way, but without this step the next enrichment complained about no PK)

1294271_pastedImage_4.png

Enrichment 2 (enrich2)

Joins the top 5 failed recipient delivery logs to each delivery

1294273_pastedImage_5.png

Alert (alert)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

</head>

<body>

<p>The following deliveries had a Success Ratio of less than 95%. The last column details the top 5 error domains.</p>

<% 

 

var query = xtk.queryDef.create( 

<queryDef  

schema="temp:enrich2" operation="select">          

<select>          

    <node expr="@deliveryFolder"/>         

    <node expr="@deliveryId"/>

    <node expr="@deliveryLabel"/>

    <node expr="@contactDate"/>

    <node expr="@initialTargetPopulation"/>

    <node expr="@messagesToSend"/>

    <node expr="@processed"/>

    <node expr="@success"/>

    <node expr="@successRatio"/>

    <node expr="@errors"/>

    <node expr="[failedLogs/@emailDomain]"/>

    <node expr="[failedLogs/@errorCount]"/>

</select>                              

</queryDef> 

);

var items = query.ExecuteQuery();

%>

<table cellpadding="2" cellspacing="2" border="2">

    <tr>

        <td>Folder</td>

        <td>Delivery ID</td>

        <td>Delivery Label</td>

        <td>Contact Date</td>

        <td>Initial Target</td>

        <td>Messages To Send</td>

        <td>Processed</td>

        <td>Success</td>

        <td>Success Ratio</td>

        <td>Errors</td>

        <td>Top 5 Error Domains</td>

    </tr>

<% for each (var item in items){%>  

    <tr> 

        <td><%= item.@deliveryFolder %></td>         

    <td><%= item.@deliveryId %></td>

        <td><%= item.@deliveryLabel %></td>

        <td><%= item.@contactDate %></td>

        <td><%= item.@initialTargetPopulation %></td>

        <td><%= item.@messagesToSend %></td>

        <td><%= item.@processed %></td>

        <td><%= item.@success %></td>

        <td><%= item.@successRatio %></td>

        <td><%= item.@errors %></td>

        <td>

        <% for each (var logs in item.failedLogs){%>  

          <%= logs.@emailDomain %>: <%= logs.@errorCount %><BR>

      <% } %>

        </td>

    </tr> 

<% } %>

</table>

</body>

</html>

Audit Logs

1294287_pastedImage_6.png

Highlighted

florentlb

10-10-2017

Hi David,

Sorry for the late reply. I think your workflow looks ok. I don't have a way to test that right now. Have you contacted support regarding this? They'll be able to track down why you are getting this error related to the alert template.

Florent

Highlighted

davidh2892249

11-10-2017

Hi florentlb​,

Thanks for your response.

Any help would be greatly appreciated. Really keen to get this example working. It would be very helpful for future use.

Thanks

David

Highlighted

marcinkacz

11-10-2017

Hi David,

Unfortunately I don't know answer, but I have a clue. I saw mentioned error lately, when I had removed workflow's operator form Admin group. We also have some dynamic content incoming from query in Alert activity. So it is probably access right issue. Try to run this workflow as Admin.

Regards,

Marcin

Highlighted

florentlb

30-10-2017

Hi David,

Could you find a way to resolve your issue? Did you contact the support team to have it checked?

Let me know,

Florent

Highlighted

davidh2892249

30-10-2017

Hi florentlb​,

I haven't found a resolution yet.

I'll be honest, I read your response as you'd be contacting support! (whoops).

I'll raise a support ticket now and share if a resolution is found.

Thanks

David