Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

Retrieve template based emails and their associated templates using the Content Builder API

I'm trying to retrieve emails and their associated templates using the Content Builder API. In Postman, I can find the template name field, but I can't access it using SSJS. Does anyone know how this ...
pmleal07's user avatar
0 votes
1 answer
20 views

How to change/update DataExtensionField's length using ssjs?

i currently have data extension, its customerKEY, data extensionField's objectID, and a soap api call which can implement this (updation/change of data extension field's length) soapApi code: <?xml ...
Pothana Mathya Gelli's user avatar
0 votes
1 answer
56 views

Redirect not working in if/else but working in some part of the code

In This code Line 62 & 65 where i have commented out { Redirect(concat(@loginPageURL,"?invalidtoken=",1,"&referer=",@referer)) } The code does not work when i include these ...
UTKARSH SINGH's user avatar
-1 votes
0 answers
35 views

Cant trigger Transactional send journey using SSJS?

I am trying to trigger a Transactional journey with the help of SSJS. I wrote below script to trigger seems this is not a valid method to trigger Transactional journey: TriggeredSend.Init(...
Shashi Kant's user avatar
1 vote
1 answer
51 views

How to log details of SSJS 400 error

I'm writing a script that will delete contacts found in a data extension from the parent and child BU and then delete the record in that DE. After repeatedly getting a 400 error without understanding ...
K K's user avatar
  • 309
0 votes
0 answers
33 views

SSJS SFMC -> OPEN AI ASSISTANT GET REQUEST PROBLEM

I'm trying to make an API call to OpenAI, specifically to its assistant. I've already created the assistant and have the ID and updated API key. I have an example code in SSJS that works well. I'm ...
Goon Lopez's user avatar
0 votes
1 answer
40 views

Data Extension Inventory script - not loading into the DE

I have this SSJS/WSProxy script that should extract all DEs over 2 years old from create date & load the DE info into "DE_Inventory_list" DE. No errors but would not load the list of DEs ...
Araarso's user avatar
  • 23
0 votes
0 answers
33 views

Lookup Customer Journey DE entry rowCount by using a field of a Data Extension

Hello everyone and thank in advance for helpfulness! Let me preface this by saying that I am working on Marketing Cloud and, specifically, I am in the process of building a Data extension of reporting ...
Fabrizio Mastracci's user avatar
0 votes
1 answer
47 views

SFMC POST Request

I am writing a script to retrieve data from one of our Data Extensions, and send it to an external API. Here is my script for this: <script runat="server"> Platform.Load("core&...
NHighton's user avatar
1 vote
2 answers
61 views

Use ampscript to check data extension has an EmailAddress field

I've got a custom process which allows users to match manually uploaded data to SF ContactID values. It relies on the EmailAddress field being called EmailAddress and having the correct field type to ...
TCassa's user avatar
  • 878
1 vote
1 answer
84 views

Marketing Cloud - SSJS Activity timing out. Not sure of error

I have an SSJS Activity I am trying to get to work wherein we are calling an API endpoint using basic authentication (obviously the user and pass are obscured in production). But I am having issues ...
seanhmartin's user avatar
0 votes
1 answer
43 views

Create a new data extension using SSJS from a file drop

I am attempting to create a new DE in SFMC from a csv file drop using SSJS. There's many resources that references the ability to do this using SSJS, but I am looking for assitance on why it's not ...
Gitconnect's user avatar
2 votes
1 answer
52 views

SSJS functions - Platform.Function.GUID() and Platform.Function.UpsertData - no records in Data Extension

Trying to use ssjs 2 functions - Platform.Function.GUID() and Platform.Function.UpsertData in the Script Activity Added Script Activity into the Automation and executed Run Once. No errors, however no ...
Luiza Zdebska's user avatar
0 votes
1 answer
62 views

SFMC - Lookup a DE and copy the results into another DE

I am new to SSJS, I am trying some basic use cases, in this case my use case is to lookup a DE and copy the results in target DE, both DEs are having same data structure. Below is given my code, its ...
Sirish's user avatar
  • 3
0 votes
1 answer
51 views

Pagination a script

I need to activate contacts in unsubscribed status in all subscriber in SFMC. This script works but i need to manage 100k rows. There are any way to paginate the script? <script runat="server&...
Magalí's user avatar
0 votes
1 answer
51 views

SFMC - how to load DE with assets' tags via REST API & SSJS?

I am successfully using the /asset/v1/content/assets REST API to populate a data extension with information about all the images in my business unit, via an SSJS script in Automation Studio. However, ...
jwb96's user avatar
  • 1
0 votes
1 answer
37 views

Upload resulting gif of AMPscript BarcodeURL() to content builder

I want to send a member card as barcode via SFMC/Whatsapp. However, Whatsapp content does not allow the use of the BarcodeURL() function to generate the barcode image. My plan now is to use a code ...
Arthur Noort's user avatar
0 votes
1 answer
75 views

How to update subscriber status of a subscriber in all subscribers present in a child BU using landing page present in other child BU?

I have created a SOAP envelope to invoke all subscribers present in a child Business Unit (BU) from another child BU using a landing page. By utilizing WS Proxy in my landing page located in CHILD BU ...
Prithvi Raj's user avatar
0 votes
1 answer
65 views

How to Contact delete (All contacts) in Child BU

Is there a way to do contact delete in Child BU? (All contacts) I want to delete the Contact in bulk. All marketing activities (Journey, e-mail sending, etc.) take place in Child BU. I would like to ...
Seungil Shin's user avatar
1 vote
2 answers
110 views

Transfer XML API response as file to FTP with SSJS

Context: I am looking to implement a daily automated import of a product catalog. I can only access the catalog via an API endpoint that cannot be filtered/paginated and gives ±100K rows of XML as ...
Arthur Noort's user avatar
-1 votes
1 answer
33 views

want to access variable from one activity to another in automation in Marketing Cloud

I want to check whether, can we access the variable which defines at script activity across other steps within the same automation in marketing cloud.
Sanket Autade's user avatar
0 votes
0 answers
67 views

Unable to create html email asset in SFMC using REST API

I am trying to create an html email, which is already stored in a field of one of my Data extension. The email is retrieved correctly and even i am able to print it in cloud page, but i am getting bad ...
arjunmn's user avatar
0 votes
1 answer
59 views

Keep track of record edits in Salesforce Marketing Cloud

Is there a way to keep tracking of what gets edited and from who in a Data Extension on Marketing Cloud? Audit Trail doesn’t track such thing and even salesforce support isn’t able to provide such ...
robruf's user avatar
  • 372
0 votes
1 answer
74 views

Marketing Cloud | Automation Studio | Output SSJS WSProxy to Landing Page or other viewable place

I was trying to follow along with the write up here: https://ampscript.xyz/how-tos/how-to-retrieve-all-shared-data-extensions-using-ssjs/ In doing so, I know the script works, but I notice the write ...
Fernando Garcia's user avatar
1 vote
0 answers
42 views

Retrieve Activities that aren't being used in any Automations in Marketing Cloud

I'm cleaning unused Automations and Activities from a Marketing Cloud Account and I'm trying to find a way to retrieve the Activities that aren't being used in any Automation using SSJS. I have ...
pmleal07's user avatar
0 votes
1 answer
137 views

How to unsubscribe in all subscribers from a data extension using SSJS script activity

Hello I was trying this idea from this Question. But I can't seem to make his initial idea work. Can you guys help me with this? What I am trying to do is from a data extension, i need to unsubscribe ...
Ralph J's user avatar
-1 votes
1 answer
65 views

Find Content Block path stored in Salesforce Marketing cloud

I would like to create a cloudpage where in it will take an input from a user for Content Block By Id. The goal is to achieve the path where this content block is stored. On entering the integer value ...
Pavan Bhat's user avatar
0 votes
1 answer
104 views

Patch request to update html content for an asset in SFMC

I am updating the asset in SFMC using the below mentioned API / SSJS code : var assetIdToUpdate = "115271"; // Replace with the actual asset ID you want to update var assetHTML = ...
Vedant Wankhede's user avatar
-1 votes
1 answer
48 views

Automation data into data extention

I found a script for retrieving automation data on https://www.ssjsdocs.xyz/automation-studio/automations/retrieve/all.html. I still learning SSJS and can't figure out how to store this kind of ...
Martijn e's user avatar
  • 143
0 votes
0 answers
26 views

Splitting Data String in Data Extension into Separate Columns Based on Delimiter

I have a data extension that contains the "Link Content" data from querying the _click data view. It returns rows of data with the url + the parameters we have in place. After the url, there ...
SFMCInTraining's user avatar
0 votes
1 answer
73 views

SSJS code to add existing query activity to an existing automation fails

I am trying to add an existing Query Activity to an existing Automation using a SSJS script. This is my code. I have referred the doc <script runat="server"> Platform.Load("...
New Developer's user avatar
0 votes
0 answers
54 views

Proposal for Ensuring Clean Data in SFMC: Email Address Validation

We've identified a significant number of email addresses in our SFMC org that have been bounced or suppressed due to List Detective. To ensure a clean and accurate database, we have recently cleansed ...
Ranjan's user avatar
  • 67
0 votes
1 answer
118 views

All subscribers as a target DE for SQL Query activity

With the help of script activity shared by Eliot here, similarly I am trying to update the target DE as All Subscribers in a SQL query activity. Here is the updated code I am using in the script, but ...
user144592's user avatar
0 votes
0 answers
76 views

CloudPageURL function in ssjs activity

The use case is to send the SMS in marketing cloud via Shortio link shortening service. Now since the Shortio has rate limits, we are first shortening the links, and then upload to data extension and ...
Chandan's user avatar
  • 663
2 votes
2 answers
195 views

Using SSJS to retrieve info about IsNullable for Data Extension fields

I need to copy a Data Extension using SSJS and I believe I can do everything I need to do except understanding if I need to set the fields nullable or not. I use this code to retrieve the info I need ...
Felix Sanchez's user avatar
1 vote
1 answer
138 views

SSJS script is timing out at 30 minutes. How to I build series of scripts using rownum to parse the DE sequentially?

We have an SSJS script that is calling an API to fetch price of items and writing it into a DE. The API call is taking time and in 30minutes the script is only able to retrieve the price for ~6000 ...
Anay Shrikar's user avatar
2 votes
1 answer
111 views

Wrong formatting returned from OpenAI API

I using OpenAI's API from Marketing Cloud, and trying to get a localized response, but I'm running into formatting issues, which I don't seem to be able to solve. Here is my request: <script ...
Nikolai Hvid's user avatar
0 votes
1 answer
142 views

Trying to write a sql query with ssjs

I'm trying to write a SQL query dynamic with ssjs. Right now i did this code <script runat="server"> Platform.Load("core", "1.1.1"); try { var today = new Date(); ...
Magalí's user avatar
0 votes
1 answer
82 views

SSJS - Delete Row in DE based on another DE with flag

New to SSJS but based on what I've read, it looks like this could be possible. I am trying to write a script that will delete a row in a 'Secondary_DE' based on a defined 'Deleted' flag in a '...
BeezB2020's user avatar
0 votes
1 answer
67 views

How is the link generated for automation

Hello I have created list of automations on cloud page and want to generate link to each automation Is there a way how to generate the link? https://mc.sx.marketingcloudapps.com/AutomationStudioFuel3/#...
martechnotes.com's user avatar
0 votes
1 answer
159 views

Retrieve with ws proxy with filter using DateValue does not work

Hello dear sfmc people, using date field in filter does not work as it's stated in the documentation https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/simplefilterpart.html I have ...
martechnotes.com's user avatar
0 votes
1 answer
49 views

smart Capture does not work with iphone

I have a smarcapture that I added this code snippet to pass by url a parameter of a question and it works in android and pc but it does not capture the IOS information. const form = document....
Jefersson Gomez's user avatar
0 votes
0 answers
25 views

Using a result from SSJS array to populate dropdown HTML list [duplicate]

I'm building a CloudPage which involves the user selecting a Data Extension from a list, and I'd like to populate the dropdown list with a list of data extensions from a specific folder. I've managed ...
TCassa's user avatar
  • 878
0 votes
1 answer
107 views

SSJS Rows.add when space is in field name

I'm attempting to use SSJS to fill a data extension. It works well, except when targeting a field with a space in it. The following code is not working: var record = { "Email Address" : &...
Anthony's user avatar
  • 147
0 votes
1 answer
82 views

Impression region in ContentBlockByKey SSJS function

I'm trying to use the function "Platform.Function.ContentBlockByKey()", but I don't quite understand what are parameter 2 and 3. And in case of not having any value, I understand that you ...
Lore B's user avatar
  • 13
0 votes
1 answer
87 views

pass parameters from a smart capture to another landing page

i am modifying a SmartCapture to send captured parameters to another landing page but they do not travel through the url. it redirects fine to the other landing but the parameter is not sent, this is ...
Jefersson Gomez's user avatar
1 vote
1 answer
401 views

Get complete URL with parameters in SSJS/Ampscript

Here's how to get the URL of current page (with parameters) in SSJS: var url = Platform.Request.RequestURL(); Effectively, it's the equivalent of RequestParameter('PAGEURL') in AMPscript. However, ...
Lukas Lunow's user avatar
  • 21.6k
0 votes
1 answer
127 views

Get MID from CloudpagesURL()

I am trying to create an unsubscribe page at the parent BU level for multiple child BUs. I want to use impersonatation with WSProxy in order to log the unsubscribe at the right BU, to do that I need ...
Arthur Noort's user avatar
-1 votes
3 answers
189 views

Find associated BUs for a user in Marketing cloud

Is there an automated way to find out all the associated BUs for a user? Using SSJS or SOAP API or AMPscript?
Maneesh's user avatar
  • 2,176
2 votes
1 answer
124 views

Removing 1 billion rows of a DE

As the title suggests, I need to figure out how I can remove ~1 billion rows of a Send Log data extension. I can't even change the data retention policy until the count is < 100 million. I thought ...
PForsyth's user avatar

1
2 3 4 5
20