Loading

Marketing Cloud Engagement | Script Activity (SSJS) Implementation and Operations FAQ

게시 일자: Jun 16, 2026
상세 설명

This article provides answers to frequently asked questions about integrating with external APIs using Server-Side JavaScript (SSJS) in Marketing Cloud Engagement. Topics include identifying outbound IP addresses, timeout limits, and implementing debug logging for implementation and operations.

솔루션
Q1. I want to add MCE's IP addresses to the allowlist on the receiving side when calling external APIs from SSJS. What IP addresses does MCE use?
A. Outbound IP addresses vary by stack. Refer to the "Outbound Communications (tokenized sending, FTP, HTTP POST, HTTP GET, etc.)" section of IP Addresses for Marketing Cloud Engagement and add the IP addresses for your stack to the allowlist. For example, Stack 1 uses 13.111.250.0–15 at the time of writing.

For outbound communication, such as tokenized sending, FTP file transfer, HTTP POST, and HTTP GET, as part of Marketing Cloud Engagement. For importing and exporting files to external file locations such as Amazon Simple Storage Service (Amazon S3), Azure Blob Storage, Google Cloud Storage, or an external SFTP site.

Note that the English version of this page may contain more up-to-date information than the localized version. After adding the IP addresses, periodically verify that the external service is not blocking them and that the IP addresses listed in the official Help documentation have not changed.
 
 
Q2. An error or unexpected result occurred in an Automation Script (SSJS) activity. Can I review the detailed error log?
A. Because SSJS execution depends entirely on user-defined script logic, the platform backend does not retain detailed execution records when exceptions or HTTP 4xx/5xx errors occur. Note that this differs from standard activities such as Import.
To identify the root cause of such issues, implement custom logging within your code. For example, write exception details and HTTP response content to a Data Extension. For more information, refer to the following article.

Reference: Steps to Store Debug Logs in Data Extension using SSJS

Even if you have already implemented the logging configuration described above, if an error that prevents writing to the Data Extension itself (caused by a platform-level issue) is occurring reproducibly or with high frequency, there is a possibility that a record may remain in our service logs. In that case, please contact us with details such as the activity name and execution date and time.

When an error occurs during SSJS execution, use the following approaches to narrow down the issue. Support may also ask you to perform these steps when you submit a case.

  • Modify the target data incrementally to identify which data triggers the error.
  • Identify at which point in your incremental implementation the error first appeared — specifically, which code was added or changed.
  • Review the specific API request and response at the point where the error occurs.
 
 
Q3. What is the SSJS timeout limit? Can it be extended?
A. The timeout limit is 30 minutes. You cannot extend this limit.
Timeout is more likely to occur when executing a large number of API requests or operating on large Data Extensions. Consider splitting your processing into smaller batches or offloading processing to an external system as described in Note 1 below.
 
 
Note 1: Consider Using an External System for Processing
While SSJS offers high customizability, it has limitations such as timeout constraints and insufficient error logging, which can increase implementation and operational complexity. For advanced, complex, or large-scale data processing, consider an architecture that leverages an external system rather than trying to complete all processing within Marketing Cloud Engagement.

The following approaches are available:

  • Use the Marketing Cloud Engagement API from an external system to manipulate and retrieve data (including polling from the external side).
  • Export files using a Data Extract activity and process them on the external system.

Additionally, scripts that call external APIs must store sensitive information such as client secrets within Marketing Cloud Engagement. If credential rotation is required, you must manage this entirely on your own. In such cases, building the processing logic on an external system that already has the required capabilities may result in easier long-term maintenance.

 
Note 2: Requesting Your Cooperation with Troubleshooting
If you are unable to resolve an error in your SSJS implementation, customers with a Premier or Signature Success Plan can receive investigation and troubleshooting support for their solution. At the time of writing, the guideline is a maximum of 200 lines per case for Premier, or up to 5,000 lines for Signature.

Because it is difficult to identify the root cause of SSJS errors from source code alone, we may ask for your cooperation in troubleshooting steps. We appreciate your understanding.

Reference:Premier, Premier Plus, and Signature Success: Developer Support
Knowledge 기사 번호

005386658

 
로드 중
Salesforce Help | Article