I have created a Program in MC which has 2 steps, Data Extract activity and File Transfer activity. It ran successfully and I am new and not sure how to access the file. The file location is 'Enhanced FTP' and can anyone tell me how to access that FTP location.
[SalesForce] How to get to file that’s uploaded via File Transfer activity
Related Solutions
Marketing Cloud Tier 2 told me that the exception at backend is "FTPOutputProtocol: ReadFrom failure (attempt #1) - No such host is known ". This was related to my File Location configuration.
In File Locations, URL should be "ftp://ftp1.exacttarget.com" instead of "ftp1.exacttarget.com" which was configured by me. I was transferring a file from a child BU to Parent BU and once I updated the File Location URL, it worked fine.
For other stacks, FTP url are mentioned below.
ftp://ftp1.exacttarget.com if your account uses the S1 instance
ftp://ftp.s4.exacttarget.com if your account uses the S4 instance
ftp://ftp.s6.exacttarget.com if your account uses the S6 instance
ftp://ftp.s7.exacttarget.com if your account uses the S7 instance
ftp://ftp.s10.exacttarget.com if your account uses the S10 instance
Documentation for Enhanced FTP is here.
Yes you are correct, File Transfer activity does not trigger a file drop automation. This is because the file is not being dropped (defined as being added to the FTP from an outside source) but is instead being transferred (moved around internally on the FTP).
What I would do in your situation is either combine the two automations into a single one, or add a step to the end of your first automation that triggers your second automation.
- Combine the two automations - Basically after you run the File Transfer activity I would then add the import from your second Automation and any other activities.
- Insert a script to trigger your second automation - Using a Script Activity I would use SSJS to make a SOAP API call to start your second automation (I believe you will need to change it from File Drop to Scheduled, but don't actually need to set a schedule).
Example SOAP call to start an automation:
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PerformRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Action>start</Action>
<Definitions>
<Definition xsi:type="Automation">
<ObjectID>29fa9fff-774a-458d-a1f4-c50f99587664</ObjectID>
</Definition>
</Definitions>
</PerformRequestMsg>
</s:Body>
and here is a great sample of the full SSJS script from @AdamSpriggs blog:
<script runat="server">
Platform.Load("Core","1.1.1");
var automationCustomerKey = "CUSTOMERKEY-OF-AUTOMATION"
var rr = Platform.Function.CreateObject("RetrieveRequest");
Platform.Function.SetObjectProperty(rr, "ObjectType", "Automation");
Platform.Function.AddObjectArrayItem(rr, "Properties", "ProgramID");
Platform.Function.AddObjectArrayItem(rr, "Properties", "CustomerKey");
Platform.Function.AddObjectArrayItem(rr, "Properties", "Status");
var sfp = Platform.Function.CreateObject("SimpleFilterPart");
Platform.Function.SetObjectProperty(sfp, "Property", "CustomerKey");
Platform.Function.SetObjectProperty(sfp, "SimpleOperator", "equals");
Platform.Function.AddObjectArrayItem(sfp, "Value", automationCustomerKey);
Platform.Function.SetObjectProperty(rr, "Filter", sfp);
var retrieveStatus = [0,0,0];
var automationResultSet = Platform.Function.InvokeRetrieve(rr, retrieveStatus);
var ObjectID = automationResultSet[0]["ObjectID"];
var Status = automationResultSet[0]["Status"];
if (ObjectID != "null") {
/*
Code Status
-1 Error
0 BuildingError
1 Building
2 Ready
3 Running
4 Paused
5 Stopped
6 Scheduled
7 Awaiting Trigger
8 InactiveTrigger
*/
if (Status == 2) {
var obj = Platform.Function.CreateObject("Automation");
Platform.Function.SetObjectProperty(obj, "ObjectID", ObjectID);
var po = Platform.Function.CreateObject("PerformOptions");
var performResult = [0,0,0];
var performStatus = Platform.Function.InvokePerform(obj, "start", performResult, po);
} else {
// already running
}
} else {
// automation not found
}
</script>
Best Answer
File Locations are defined in the Administration section. The base "Enhanced FTP" is typically the Import directory. You can create another File Location for the Export folder, which is where you extract file will be.
I typically rename them to "Enhanced FTP - Export" and "Enhanced FTP - Import" when working in a new account.
FTP Accounts are also defined in the Administration section.