Questions tagged [ssjs]
Server-side JavaScript (SSJS) in the Salesforce Marketing Cloud allows a developer to use JavaScript syntax and proprietary platform libraries for server-side processing.
1,031 questions
1
vote
2
answers
47
views
Log Exclusion Script in Marketing Cloud
I am trying to come up with a solution to log any record that is excluded by the exclusion script. I am using the TreatAsContent function in the exclusion script to render the below code block. ...
0
votes
0
answers
44
views
Can you create a CSV file out of 50k records stored in a data extension?
I have code that works to create a CSV file out of a data extension, but this cuts off at 2500 records where I hit error "Unable to retrieve security descriptor for this frame" since there ...
0
votes
1
answer
99
views
SSJS Script to list all the Automations
this script, trying to get a API token but not sure if this is correct, Google has so many different options, its all over the place and documentation is lacking... I replaced my API values with XXX.
...
1
vote
1
answer
101
views
Extract the json object key with BuildRowsetFromJson
Hi I have json structure like this sample (but the object name/count will be dynamically come from html input, which will have different values of any input)
{"Hero":"http://your.image....
1
vote
1
answer
54
views
Is it possible to query records in shared DEs from the Child BU using WSProxy?
I can run this bit of code on the parent BU to retrieve records from a Shared DE:
var prox = new Script.Util.WSProxy();
var moreData = true;
var reqID = null;
var srcDE = "DataExtensionObject[...
0
votes
1
answer
93
views
Adding OrderBY criteria to a SSJS Rows.Retrieve
I have a perfectly functioning SSJS Rows.Retrieve code but I can't seem to find a way to get the recordset it returns to be sorted / ordered by something of my choice, it seems to sort by the Primary ...
0
votes
0
answers
36
views
HTTP.Post doesn't return a response
I am attempting to create a script that will fire a Wait Until Event activity in journey builder if a subscriber in a DE has a CallScheduled value of "true". Then the same DE should be ...
0
votes
1
answer
156
views
Get a row count of DE in a SSJS Loop
ok, I have been working on a small little side project to learn SSJS, but also produce something useful.. I want to create a Master DE that reports some Attributes about the DEs that we have in our BU,...
0
votes
0
answers
35
views
SSJS issue that works on CloudPages but not in Automation
The code below does not throw any errors when run in Automation Studio SSJS, but the code itself does not actually execute. When I run the exact same code on a CloudPage, it works without any issues.
...
0
votes
1
answer
54
views
Issue in contact creation in all contacts using rest api
<script runat="server">
Platform.Load("Core", "1.1.1");
var authBaseURI = "https://SUBDOMAIN.auth.marketingcloudapis.com";
var clientID = ...
-1
votes
1
answer
77
views
Synchronize MobileConnect Opt-in/Opt-out with Sales Cloud
I’m currently looking for a way to synchronize MobileConnect opt-outs with Sales Cloud. I have the MC Connector set up and running, but we don’t have a preference center in place.
Right now, I have an ...
0
votes
1
answer
81
views
My Question is Related to SSJS in SFMC
I have got SSJS CODE which reside in landing page where I used Platform.Request.GetPostData(0); So whenever an email event occurs this should execute and return Raw JSON response (I am thinking this ...
0
votes
0
answers
52
views
Filtering a data extension using SSJS
I have been trying to filter a data extension with two values. Every time I try, the values are not returned. Any guidance would be greatly appreciated. This is what I tried:
Fetching the values from ...
1
vote
2
answers
105
views
How to Retrieve "Not Sent" Data using SSJS
I'd like to create a SSJS script which retrieves NotSent emails. I know that there is a tracking extract method that can be used for that, but I need to achieve the same result using SSJS. Any help?
...
-1
votes
1
answer
53
views
Dynamically select an email based on a value in a DE
I have a request to select the email at time of send based on the asset ID within a DE. The number of asset IDs may change but it is deterministic. (value = 504). I am unaware how to do this using ...
2
votes
1
answer
70
views
'Expect' header added in automation studio
We are calling a 3rd party API and we noticed that marketing cloud is adding automatically the 'Expect' header when running the code in a script while its not when running the code in a cloud-page.
...
0
votes
1
answer
417
views
Create an upsert DE with SSJS
I am trying to use SSJS to retrieve the DE names of all DE's in a particular folder (folderid = 14273, not sure if that needs to be in quotations), and save them in an upsert DE (DE name = Dede). The ...
1
vote
2
answers
574
views
How can I get Rows from a specific Data Extension and add them to another one using SSJS?
I want to insert the rows from an existing data extension with the same column structure into another one using SSJS within Automation-Studio. I am using SSJS because I want to add them dynamically, ...
0
votes
1
answer
60
views
Encrypting ContactKeys to share with a vendor for use as a querystring GET parameter in a QR code
I've got a data extension with over 2500 records in it that I'm trying to modify as such: take the 'ContactKey' value, encrypt it using EncryptSymmetric() in AMPscript, and then assign the 'Encrypted ...
1
vote
2
answers
228
views
Update field to Null with SSJS
I'm trying to update a field in a data extension to NULL for everyone in the DE. I am new to SSJS and tried to use a script from somewhere else but am struggling to make it work. Can anyone help ...
0
votes
1
answer
362
views
Parsing JSON IN Data Extension - SSJS
I'm trying to parse JSON data stored in a field (Product2) within a Salesforce Marketing Cloud Data Extension and then upsert the parsed data into another Data Extension. I've written a Server-Side ...
1
vote
1
answer
462
views
Update data in All Subscriber table with data in DE using SSJS
I'm attempting to update the Email Address of a specific subscriber using SSJS.
The SSJS is retrieving the Subscriber Key and New Value (updated email address) in a Data Extension. If the Subscriber ...
0
votes
2
answers
324
views
Handling Microsoft SafeLinks Double Activation in Email Links with AMPscript
I'm currently facing a challenge with Microsoft SafeLinks in an email marketing context. SafeLinks, a feature in Microsoft's security suite, pre-fetches URLs for security checks and then again when a ...
0
votes
0
answers
138
views
Unable to retrieve security descriptor for this frame
My code in decrpypting the data that needs to be decrypted. After that it's not going in For loop but directly goes to Catch statement and throws error. Wondering if this something with my permissions ...
0
votes
1
answer
92
views
Creating Data extension field through SSJS (through API calling)
I'm now testing a new method to create a data extension field automatically through REST API calling,referring to this developer DOC
It's operated by POST method, and I think I wrote all of the ...