Skip to main content
5 votes
Accepted

Extracting ObjectID of an Automation

You have to include "ProgramID" in cols. <script type="javascript" runat="server"> Platform.Load("Core",1) var prox1 = new Script.Util.WSProxy(); var ...
Jonas Lamberty's user avatar
4 votes

Retrieving data extension data from a WSProxy retrieve

You need to use dot notation and index numbers to interact with arrays and objects to get specific information from it. For instance: data.Results[i] //where i is an iterative for the index of each ...
Gortonington's user avatar
  • 30.7k
4 votes
Accepted

Get MID from CloudpagesURL()

You could pass a custom attribute in the cloudpagesurl() function and leverage that %%=CloudPagesURL(ID, 'MID', memberid)=%% Then on your cloudpage: SET@VAR= QUERYPARAMETER('MID')
EazyE's user avatar
  • 8,547
3 votes
Accepted

Using WSProxy to retrieve a list of automations that do not have the "On Error" recipient set

So, Notifications is technically not retrievable as a field in the Automation SOAP object. The cool thing though is that this object is one of the only objects that accepts the wildcard * to return ...
Gortonington's user avatar
  • 30.7k
3 votes
Accepted

Is there a WSProxy equivalent of the SQL "SELECT * "?

You're close -- just add some quotes around the asterisk: var prox = new Script.Util.WSProxy(); var cols = ['*']; var data = prox.retrieve("DataExtension", cols);
Adam Spriggs's user avatar
  • 30.8k
3 votes

How to batch delete more than 2500 records (based on data extension)

You need to do the delete batch inside the while loop. You also need an array to house the objects that is emptied on each run. To allow you to have the full array as well as the delete array, I added ...
Gortonington's user avatar
  • 30.7k
3 votes
Accepted

ImportDefinition File Name

So I did some digging and found what may be a good solution for your request via an undocumented REST API call. Basically what the call does is pull a history of your imports for that import activity. ...
Gortonington's user avatar
  • 30.7k
2 votes
Accepted

Looping through wsproxy retrieve results with SSJS

You need to loop through the Results array of the object returned by your retrieve call. The object itself, "data", isn't an array: var data = prox.retrieve("DataFolder", cols, ...
Macca's user avatar
  • 8,266
2 votes

Trying to lookup Folder ID when there are multiple folders sharing the same name (SFMC WSProxy)

I would not consider that full answer, since the whole answer would require quite a bit of effort. Yet, here is the idea of how you can proceed: You are already dynamically creating a Data Extension ...
Niko's user avatar
  • 2,734
2 votes

WSProxy - is it possible to move categories / automations?

Despite the docs saying it is possible and the describe request stating it is editable, I have not found a way to do this via SOAP API (Which is what WSProxy is currently running). I have tried both ...
Gortonington's user avatar
  • 30.7k
2 votes

Fetch data combining SOAP and REST API

I probably wouldn't mix the two, I would instead use the REST MessageDefinition Endpoint to get the message.content.id and then use that to grab the HTML via the REST Asset endpoint. Something like ...
Gortonington's user avatar
  • 30.7k
2 votes
Accepted

Creating a DE with retention using WSProxy (Data Extension Manage Data Retention user permission error)

So, this is not exactly a simple solution and it has some extra steps to get done, but I have found that if you use the setClientId() impersonation in WSProxy to also set the userID then you can get ...
Gortonington's user avatar
  • 30.7k
2 votes

WSProxy HTTP POST Request only runs a handful of records at a time before erroring and pausing

I don't see any WSProxy in your post. You could use it to retrieve your Points DE rows instead of Points.Rows.Retrieve(filter) as it provides an explicit view into the continuing a request to traverse ...
Adam Spriggs's user avatar
  • 30.8k
2 votes
Accepted

WSProxy Data Extension AddOnly bug

In order to add only record you would use a different method - createItem, so that your code will look something like that: <script language="javascript" runat="server"> ...
Niko's user avatar
  • 2,734
2 votes
Accepted

SSJS code to fetch automation details issue

Welcome! If you want to extract all automations available in BU, then you can use Status / IN filter to have all the possibilities. Also when you change "AutomationID" in cols with "...
Ali Eroglu's user avatar
2 votes
Accepted

Updating a Subscriber on AllSubscribers list from Unsubscribed to Active

To update a subscriber status in All Subscribers List, you would need to specify the status property in Subscriber object. I would do this: <script runat="server"> Platform.Load('core',...
Duc Le's user avatar
  • 3,448
2 votes
Accepted

SSJS WSProxy code is unable to access SFMC object - AutomationActivityInstance

First, let's see what you would get in the response using Write(Stringify(res)): { "Status":"Error: AutomationActivityInstance is not a valid ObjectType.", "RequestID&...
Rafał Wolsztyniak's user avatar
2 votes

WSProxy Retrieve Ordered Rows

Since the response being returned from your call will be an array of JS objects, you could just sort the response yourself with a simple function like (sorts alphabetically): response.sort(function(a, ...
Jason Hanshaw's user avatar
1 vote

How to batch update DE records using WSProxy?

Found how to parse data, this one works: var prox = new Script.Util.WSProxy(); var data = [{ CustomerKey: "<DE external key>", Properties: [ { ...
yoni349's user avatar
  • 133
1 vote
Accepted

retrieve code snippet data via wsproxy

All content blocks and assets are stored in Content Builder, which requires the Content Builder REST API. Since it is utilizing the REST API, this means you cannot use WSProxy as that only uses SOAP ...
Gortonington's user avatar
  • 30.7k
1 vote

Applying RowBasedRetention to existing data extension by using WSproxy or API

WSProxy emulates SOAP calls, so usually you can find a lot of examples with SOAP. -> Check the SOAP API documentation around Data Extensions: https://developer.salesforce.com/docs/marketing/...
Jonas Lamberty's user avatar
1 vote
Accepted

Cannot Perform action on TriggeredSend object via WSProxy?

No, you cannot Perform on a Triggered Send. According to this chart, it only allows Create, Update and Delete: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/...
zuzannamj's user avatar
  • 14.4k
1 vote
Accepted

WS Proxy - create importdefinition to list

Here's a snippet that works: <script runat="server" language="JavaScript"> Platform.Load("Core","1"); var prox = new Script.Util.WSProxy(); var ...
Adam Spriggs's user avatar
  • 30.8k
1 vote

SSJS WSProxy code is unable to access SFMC object - AutomationActivityInstance

This is undocumented too but worth to check. "ActivityInstance" looks like the replacement of AutomationActivityInstance. Check for extra info https://charliefay.medium.com/sfmc-automation-...
Ali Eroglu's user avatar
1 vote

Performing a record retrieval via WSProxy in SSJS

You need to use tables.Results as mentioned by @Jonas Lamberty. This is also mentioned in the doc: "The response is an object with four properties from the APiObjects SOAP items" https://...
Sanket kharwade's user avatar
1 vote
Accepted

Create a text-only email programmatically in Marketing Cloud

are you familiar with Content Builder API? https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/content-api.html textonlyemail is asset type 209: https://developer.salesforce.com/docs/...
Jonas Lamberty's user avatar
1 vote
Accepted

Testing retrieving Automation Statuses in Batches. Error looping through results

You're resetting the data var inside your loop. I changed the second instance to data2: <script runat="server"> Platform.Load("core", "1.1.1"); var prox = new ...
Adam Spriggs's user avatar
  • 30.8k
1 vote
Accepted

Does WSProxy Calls consume SFMC API limits?

As far as I know, the answer is 'No'. I have done a similar solution for 30 business units and also fetching the count of rows in the Data Extensions using the undocumented REST API. The automation ...
Swati Mishra's user avatar
  • 1,683
1 vote
Accepted

Getting Interactions with WSProxy

As mentioned by Adam Spriggs, JourneyBuilder is using the REST API and is not addressable via SOAP. The object you are referring to are not related to the current JoruneyBuilder object in Marketing ...
shd.lux's user avatar
  • 501
1 vote

How to correctly read response from a WSProxy call to retrieve DE rows (more than 2500 using HasMoreRows) and update All Subs List

This is a script I usually use as a starting point for this type of thing: <script runat="server"> var mid = 1234567; //MID of target BU -- OPTIONAL Default is current BU of script/...
Gortonington's user avatar
  • 30.7k

Only top scored, non community-wiki answers of a minimum length are eligible