cancel
Showing results for 
Search instead for 
Did you mean: 

Export Contact from Marketing Cloud using CPI

0 Kudos

Hello,

How can I export contacts from Marketing Cloud to SFTP (CSV File) using CPI.

I used The pre-installed package "SAP Marketing Cloud - Offline Sales Data Export" and I maked some changes on the artifact "Export Contacts Data". But I am facing some problems with the XSL"OData Receiver may not pass Xml message to XSLT Mapping. XSLT Mapping supports Xml input only." and the converter from xml to CSV (XSLT Mapping may not pass Xml message to XML To CSV Converter. XML To CSV Converter supports Xml input only.)

Attached a screenshot of the iflow.

Has anyone run into the same problem?

Thank you!

captureiflow.png

Accepted Solutions (0)

Answers (5)

Answers (5)

papsoc
Explorer
0 Kudos

Thank you michae_ray08 for your reply. I created a ticket and got a reply 2 weeks ago. I received the package and working on it already. thank you so much.

Kind regards.

Sokratis

papsoc
Explorer
0 Kudos

Hello johannes.hirling , i just read your article for External Landing Page Data Integration with SAP Marketing Cloud. We have deployed exactly that integration, however we need to upgrade to API v.3 to support subscriptions.

The strange is that in CPI-Discover the package no longer includes the artifacts to be used. I also added a request on the blog below.

Deprecation of External Landing Page Data Integration with SAP Marketing Cloud

Could you please send me the latest version of those artifacts?

Regards

Sokratis.

MichaelRey
Advisor
Advisor

Hi Sokratis,
can you please create a ticket and mention in it that is shall be forwarded to me? Then I can attach the artefact from before the deprecation for your copy and adaptation.

Best regards
Michael

former_member247020
Active Participant
0 Kudos

Hi,

Might be an error in the xsl script.

change template match="/" to template match="/Contacts/Contact"

That should work. also wasn't sure how the inbound message looks like.

Inbound message:

<Contacts> <Contact> <CreatedByUser>SAP_SYSTEM</CreatedByUser> <ContactOrigin>TEST</ContactOrigin> <ContactID>123456</ContactID> <FirstName>firstname</FirstName> <YY1_NUM_CIN_TVA_MPS>aaa</YY1_NUM_CIN_TVA_MPS> <BirthDate>bbb</BirthDate> <YY1_TELEPHONE_MPS>5551112222</YY1_TELEPHONE_MPS> <YY1_PROFESSION_MPST>ccc</YY1_PROFESSION_MPST> <YY1_VILLE_MPSF>ccc</YY1_VILLE_MPSF> <YY1_Type_Operation_MPS>ddd</YY1_Type_Operation_MPS> </Contact> </Contacts>

XSLT:

<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/Contacts/Contact"> <Contact> <ContactOrigin><xsl:value-of select="ContactOrigin" /></ContactOrigin> <ContactID><xsl:value-of select="ContactID" /></ContactID> <FirstName><xsl:value-of select="FirstName" /></FirstName> <YY1_NUM_CIN_TVA_MPS><xsl:value-of select="YY1_NUM_CIN_TVA_MPS" /></YY1_NUM_CIN_TVA_MPS> <BirthDate><xsl:value-of select="BirthDate" /></BirthDate> <YY1_TELEPHONE_MPS><xsl:value-of select="YY1_TELEPHONE_MPS" /></YY1_TELEPHONE_MPS> <YY1_PROFESSION_MPST><xsl:value-of select="YY1_PROFESSION_MPST" /></YY1_PROFESSION_MPST> <YY1_VILLE_MPSF><xsl:value-of select="YY1_VILLE_MPSF" /></YY1_VILLE_MPSF> <YY1_Type_Operation_MPS><xsl:value-of select="YY1_Type_Operation_MPS" /></YY1_Type_Operation_MPS> </Contact> </xsl:template> </xsl:stylesheet>

Output:

<Contact><ContactOrigin>TEST</ContactOrigin><ContactID>123456</ContactID><FirstName>firstname</FirstName><YY1_NUM_CIN_TVA_MPS>aaa</YY1_NUM_CIN_TVA_MPS><BirthDate>bbb</BirthDate><YY1_TELEPHONE_MPS>5551112222</YY1_TELEPHONE_MPS><YY1_PROFESSION_MPST>ccc</YY1_PROFESSION_MPST><YY1_VILLE_MPSF>ccc</YY1_VILLE_MPSF><YY1_Type_Operation_MPS>ddd</YY1_Type_Operation_MPS></Contact>
0 Kudos

Thank you Johannes,

The flow is deployed successfully and an empty CSV file is generated.

I checked the output of the ODATA. It generate an xml file with all the contacts.

So the problem is with the XSLT or the XSD file. You can find attached a sample of these files.

odataoutput.txt

xsd-file.txt

xsl-file.txt

Can you provide me an example of these files?

Best Regards.

former_member247020
Active Participant
0 Kudos

Hi,

for exporting markting contacts, I recommend using the contact API (API_MKT_CONTACT).
You can either export the best record or contact origin data.

the issue you are mentioning are "only" warnings on CPI. You'll get those warning when specific requirements exist for certain integration patterns.
For Example, the XSLT Script requires an XML formatted message to work.

I flow from the sceenshot does not show any errors.
Dou you get an error in the message monitor?

br,
Johannes