Import a DE Import Error Results file to a Data Extension

Create the DE_Import_Error_Template

Data Extension Setup

Import the file from FTP

Import
Configure Mapping
Import Email Confirmation
SELECT
XmlData.value('/x[1]','nvarchar(max)') AS Node1,
XmlData.value('/x[2]','nvarchar(max)') AS Node2,
XmlData.value('/x[3]','nvarchar(max)') AS Node3,
XmlData.value('/x[4]','nvarchar(max)') AS Node4,
XmlData.value('/x[5]','nvarchar(max)') AS Node5,
XmlData.value('/x[6]','nvarchar(max)') AS Node6
FROM
(
SELECT
CONVERT(XML, Replace(Replace([Row Data], '[', '<x>'), ']', '</x>')) AS XmlData
FROM
[mobile_connect_import_error_2021-11-07]
) AS X
SELECT
XmlData.value('/x[2]','nvarchar(max)') AS SubscriberKey,
XmlData.value('/x[5]','nvarchar(max)') AS Locale,
XmlData.value('/x[6]','nvarchar(max)') AS PhoneNumber,
[Error Code],
[Error Details]
FROM
(
SELECT
CONVERT(XML, Replace(Replace([Row Data], '[', '<x>'), ']', '</x>')) AS XmlData,
[Error Code],
[Error Details]
FROM
[mobile_connect_import_error_2021-11-07]
) AS X
<script runat="server">
Platform.Load("core","1.1.1");
try {
var prox = new Script.Util.WSProxy();
var cols = [
"ImportDefinitionCustomerKey",
"ImportType",
"ImportStatus",
"ID",
"ObjectID",
"NumberDuplicated",
"NumberErrors",
"NumberSuccessful",
"DestinationID",
"TaskResultID",
"TotalRows",
"StartDate",
"EndDate"
];
var filter = {
Property: "ImportDefinitionCustomerKey",
SimpleOperator: "equals",
Value: "X6473F2C-51CX-412A-8791-ED20F131C2X2"
};
var result = prox.retrieve("ImportResultsSummary", cols, filter);Write(Stringify(result));
} catch(ex) {
Write("An error has occurred: " + Stringify(ex));
}
</script>

--

--

--

I am a certified Salesforce Marketing Cloud Consultant at Bower House Digital in Melbourne, Australia.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Transaction Management in Cassandra

KNOLDUS-advt-sticker

Schedulist is Featured today on ProductHunt!

Cannot print the dashboard in Power BI #TAIK18 (9-11) https://youtu.be/9ZHS-nFDl5k

How To Patch Using AWS Systems Manager

Data Preparation for Analytics

Why Teams Adopting Kubernetes Fight over Capacity Management?

The power of terminology in codebase

Android v1.3.0 — Now with auto-fill!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Charlie Fay

Charlie Fay

I am a certified Salesforce Marketing Cloud Consultant at Bower House Digital in Melbourne, Australia.

More from Medium

Top Salesforce Spring ’22 Features in Nonprofit and Education Cloud

Convert XML to JSON using XSL in Salesforce Marketing Cloud

CSV to Salesforce Multipicklist upsert

Selenium vs. OATS vs. Opkey: How To Choose Right Oracle Test Automation Solution