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
2 answers
2k views

how to connect ftp and copy the file from one folder to another folder inside FTP by SSJS or SOAP API in exacttarget?

We need to copy the folder inside the ftp but we need to write the script so that we can add it in Automation and side by side we have two files. we have tried by .net please check it. Thanks in ...
jeeshan khan's user avatar
2 votes
1 answer
1k views

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud?

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud? Could the FormData be a problem? I've been using this code: var form = new FormData(); form....
Stefano Pistillo's user avatar
2 votes
1 answer
1k views

ExactTarget Editor - AMPscript / SSJS

Situation In ExactTarget (Marketing Cloud) it is possible to write AMPscript and SSJS. The only way I found for debugging AMP or SSJS is to create a public cloud page or to use email preview. ...
Christian Deckert's user avatar
2 votes
0 answers
3k views

Refresh Filtered Data Extensions automatically

In our system we have a ftp-triggered automation that imports a file into a data extension that is the source for hundreds of filtered data extensions which will be used for sending (and of course ...
Jens J's user avatar
  • 21
1 vote
1 answer
1k views

SSJS Scripts in Emails evaluated twice

We need to create a record in a Salesforce [Sales Cloud] Custom Object each time an email is sent from a Sent Email Activity in Journey Builder. We've added an SSJS script in the email to retrieve an ...
Eliot Harper's user avatar
  • 16.3k
1 vote
1 answer
2k views

Retrieve more than 2500 records from a DE using SSJS

Trying to retrieve more than 2500 records from a DE. My thought is to have a for loop (to process the recordset) within a while loop (to retrieve records). var data; var recordCount = 0; do { ...
victorcorey's user avatar
  • 1,808
1 vote
1 answer
2k views

SSJS Rows.Update multiple fields

Can you update more than 1 field with SSJS Rows.Update? SFMC Documentation Update(object, filtercolumns, filtervalues) This function updates the specified row with the specified information. ...
victorcorey's user avatar
  • 1,808
1 vote
2 answers
938 views

Retrieve value from XML response using SSJS in a SSJS Activity

Use a SSJS Activity I am getting a response in XML from an API call. I need to parse the XML for a specific value. Is this possible in a SSJS Activity?
victorcorey's user avatar
  • 1,808
1 vote
1 answer
1k views

SSJS web API retrieve Column Names

I know this can be done via SOAP or an SDK, but I have a specific need to have this done in Marketing Cloud SSJS interacting with Web API (on a landing page, not in an email). The aim is to create a ...
Gortonington's user avatar
  • 30.3k
1 vote
4 answers
1k views

Submitting HTML characters to a Data Extension via Landing Page and SSJS

I have tried to push data to data extension through a landing page using SSJS. The form fields contain HTML characters (which will import to the Data Extension fine). I'm getting this error when I ...
Michelle's user avatar
  • 125
0 votes
1 answer
4k views

Custom subscription preference center interface

Looking for support or best practice developing custom subscriber preference & subscription centers for SFMC. I DON'T want a default SmartCapture form. The intention is for a Cloud Pages hosted ...
M Gregoris's user avatar
0 votes
2 answers
2k views

Include JSON Feed in an Email

Our company uses JSON feeds as datasources for our emails. We are moving over to ExactTarget and there doesn't seem to be much documentation surrounding this. How would you use a JSON feed instead of ...
ok1ha's user avatar
  • 145
4 votes
3 answers
10k views

Using AMPscript with SSJS Activities

I have tried using the below AMPscript block in an SSJS Activity, however it appears that Script activities only support SSJS and AMPscript cannot be included in Script Activities — please can someone ...
Eliot Harper's user avatar
  • 16.3k
-1 votes
1 answer
1k views

Creating a Data Extension via SSJS

<script type="text/javascript" runat='server'> Platform.Load("Core", "1.1"); var DEParentFolderID = '0000'; //var QRYParentFolderID = '0000'; var SubAdhocDE = DataExtension.Init("...
SFMC_User's user avatar
  • 301
2 votes
3 answers
2k views

How can I obtain the status of an automation in a Business Unit using AMPscript?

I am attempting to retrieve the status of an automation in a Business Unit with the following AMPscript, but I haven't been successful yet. Could someone please assist? %%[ SET @key = "###" SET @...
Christopher Carswell's user avatar
0 votes
0 answers
414 views

How to trigger a snippet of code (AMPScript or SSJS) in Marketing Cloud?

I wrote a snippet of code with AMPScript + SSJS for email, and then I'd like to trigger it when emails' status are changed, but I can`t find any way to do this like as add a 'listener' in JavaScript. ...
Leisure's user avatar
  • 407
0 votes
1 answer
253 views

Retrieve an Email from Salesforce Marketing Cloud

Is there anyone who could tell me how to retrieve an Email from Salesforce Marketing Cloud? Assume that the Marketing Cloud Connector is already OK.
Leisure's user avatar
  • 407
0 votes
1 answer
1k views

ExactTarget Serverside Javascript: Is there any way to populate a list's attributes into a Data Extension?

I have a list and when using the following code: var myList = List.Init("TestList"); var subs = myList.Subscribers.Retrieve(); Write(Stringify(subs)); I retrieve these attributes: ID : 184408991 ...
Christopher Carswell's user avatar
1 vote
0 answers
548 views

Status of jquery.ajax from Server-Side Javascript

Please see the following codes: Front-side AJAX request code: function addAjax(emailIds, valObj) { var jqxhr = $.ajax( { method: "post", url: "mypage.aspx?QS=...
Leisure's user avatar
  • 407
1 vote
1 answer
2k views

Is there a better way to delete data extension records with Server-Side Javascript?

I`m going to delete mulitiple data extension records with Server-Side Javascript, so I used function of 'Platform.Function.DeleteData' and code as following: Platform.Function.DeleteData("Map Tags ...
Leisure's user avatar
  • 407
0 votes
1 answer
924 views

Adding Info into Header in email

Is there a way through either AMPScript or SSJS to manipulate custom content inside the email sends through the Marketing Cloud? For example, say I want to add information for 'List-Unsubscribe' into ...
Gortonington's user avatar
  • 30.3k
1 vote
2 answers
1k views

How to detect browser with AMPScript in ExactTarget?

I want to keep 2 URLs to one CTA which will navigate to the AppStore or Play Store depends the platform. Is it possible by using AMPScript/Server-side JavaScript in ExactTarget?
Mohammed's user avatar
2 votes
1 answer
1k views

How do we delete subscriber from Auto Suppression List using SSJS?

Is there a way to delete subscriber from auto suppression list using SSJS? Any information is appreciated. Thanks.
Sanchit Mittal's user avatar
1 vote
1 answer
772 views

How can an Automation be deleted using ExactTarget SOAP API?

I have a delete request coded using the SOAP API and the response back is: AutomationDelete:["Delete Access is denied!", 0]"Error" Is the action truly denied or am I not writing the code properly? ...
Michael's user avatar
  • 127
2 votes
1 answer
621 views

SSJS: How to create an email and keep the personalization strings as variables?

I’m stuck trying to create an email with SSJS. I have the email being created in the account, but the required personalization strings (e.g. %%profile_center%%) in the HTMLBody and TextBody values ...
Michael's user avatar
  • 127
3 votes
1 answer
4k views

Has anyone been able to create an automation through SSJS yet?

I've created a server-side JavaScript activity to create an automation, which is throwing an error: An error has occurred: {"message":"An error occurred when attempting to evaluate a CreateObject ...
Michael's user avatar
  • 127
0 votes
1 answer
494 views

Is it possible to get personalization strings when pulling content from DE with Server-side JavaScript in emails?

I'm trying to use server-side JS to dynamically write variables based on the column headers of a data extension for an email. Then fill those variables with the row contents of those field headers. I ...
George's user avatar
  • 3
1 vote
1 answer
1k views

Why is this QueryDefinition not working with InvokeCreate via SSJS?

I have a QueryDefinition that I am creating through server-side JavaScript. The query is not being created through the InvokeCreate method, though all appears to be well with the code. Please take a ...
Michael's user avatar
  • 127
0 votes
0 answers
899 views

What is wrong with this import activity being created through this SSJS?

I am creating an import activity through server-side javascript. The import is throwing an exception: An error has occurred: {"message":"Unable to retrieve security descriptor for this frame.",...
Michael's user avatar
  • 127
1 vote
2 answers
1k views

Use SSJS in Custom Activity

I was wondering if there is any possibility to create a Custom Activity that executes AMPScript or/and SSJS. If so, how could I read Journey context information to the SSJS? Thanks!
JOSE V. SOGORB's user avatar
1 vote
2 answers
225 views

Capture customer info in new DE via a Link

Is it possible to capture customer information into a new DE by someone clicking on a link? As an example: capture the email address in a new DE by clicking on a link ( Click on this link to Opt-in)?
Peter Ho's user avatar
  • 505
4 votes
1 answer
4k views

Can you retrieve more than 2500 records with SSJS?

I am trying to use a script activity to update a data extension with the statuses of subscriber records. I have managed to get the code working but it will only add 2500 records. I have been reading ...
wimpywombat's user avatar
4 votes
3 answers
3k views

Server-side JavaScript and JSON

I would like to extract the data from a Data Extension column and parse it as JSON and use the data as attributes in an email. How would I go about doing this? Is there a combination of AMPScript ...
k s's user avatar
  • 141
1 vote
1 answer
526 views

Trouble Dealing With exacttarget List...without DE

We have a situation where get subscriberkey/email address from ET email and external site and i retrieve subscribers attributes IN THE LANDING PAGE (Hosted in the exacttarget) fields from the Exact-...
Jack85's user avatar
  • 489
1 vote
1 answer
4k views

Best way to make HTTP Requests

We are inserting data to a Data Extension in ExactTarget. Now on that same form submit action we have to POST that data to an Internal RESTful service (message format and responses are in JSON). Can ...
user5105's user avatar
  • 141
5 votes
1 answer
2k views

Failure to retrieve list subscriber attributes in a landing page using AMPScript and SSJS

ExactTarget is core edition. There are no Data Extensions, so we use Lists. Am using landing page and trying to retrieve all the subscribers attributes of the List from SSJS and AMPScript but failed ...
Jack85's user avatar
  • 489
1 vote
0 answers
499 views

Retrieve Account Preferences via SSJS or AMPscript

Is it possible to retrieve the available business unit Preferences within Preference Management via ssjs or ampscript? I am interested in finding the available preferences and corresponding ...
MartinChad's user avatar
3 votes
2 answers
2k views

After I Stringify a DE using DataExtension.Init how can I output or filter the data in JS?

I am wondering how can I filter data using JavaScript? For example, I would like to output data in JS. Platform.Load("Core","1"); var layouts = DataExtension.Init("DATA_EXTENSION_NAME").Rows....
user5105's user avatar
  • 141
1 vote
2 answers
4k views

SSJS Complex filter with more than one propertie

I currently have a 4 column table with: Product, Count, Date, BusinessUnit Product, Count, Date, BusinessUnit Mouse, 100, 2014-05-1, StoreBB Mouse, 120, 2014-06-01, StoreTBB Keyboard, 130, 2014-06-21,...
user5105's user avatar
  • 141
1 vote
2 answers
4k views

Retrieve All Subscriber Status

I am working on a custom profile center and I'm using server side javascript to extract information about the lists a subscriber is currently subscribed to. When I use the lists.retrieve function it ...
Jake Merrill's user avatar
1 vote
0 answers
842 views

Upload images to portfolio using Server Side JavaScript

I have a simple html file upload page, an example snippet of the code below. <html> <body> <form action="<ExactTarget page with ssjs file handling>" method="post" ...
JCS's user avatar
  • 205
2 votes
1 answer
208 views

Saving to Lists in Sub BUs in Enterprise 2.0 account

I'm working on a landing page that is serving as a profile/preference center and is hosted in the top level BU in an Enterprise 2.0 account. The page displays several attributes (first name, last name ...
Greg's user avatar
  • 61
0 votes
1 answer
422 views

Using SSJS to retrieve bounce data

I'd like to create an SSJS script which retrieves bounced emails from a send activity. I've tried testing by creating a simple landing page and started by retrieving sent emails for now, but it just ...
Eliot Harper's user avatar
  • 16.3k
3 votes
1 answer
4k views

Output a SSJS variable with Ampscript for loop

I have a for loop in SSJS and I am trying to output it outside this scope using AMPSCRIPT. I know there is a way to output the value of a SSJS variable into AMPSCRIPT. My question is, how can output ...
user5105's user avatar
  • 141
3 votes
2 answers
1k views

Setting a function to run at set intervals in a Landing Page in SSJS

I would like to run the following HTTP.GET function at a set interval (every 1 minute) until 10 minutes have passed or it has succeeded in retrieving the content. var contentRetriever = function(){ ...
Christopher Carswell's user avatar

1
15 16 17 18
19