Retrieve the Availability Status of a Marketing Cloud Engagement Account

You can use the GetSystemStatus API call to retrieve the status of SOAP API.

Use this call only to handle exceptions. Don’t use it before every request. New SOAP faults provide more information about application issues resulting in failed logins.

Take the following actions based on the availability status:

  • If the GetSystemStatus call returns OK, no action is required.
  • If the GetSystemStatus call returns InMaintenance, place your application into a queuing mode and periodically make the GetSystemStatus call until the status returns to OK.
  • If the GetSystemStatus call returns UnplannedOutage, place your application into a queuing mode, contact Salesforce Customer Support, and periodically make the GetSystemStatus call until the status returns to OK.

How to Retrieve the Availability Status of an Account 

Use the sample code below as a model to set up your own API call. The code uses the GetSystemStatus call, which returns one of the following three result messages:

  • OK: All systems are available.
  • InMaintenance: Some systems are undergoing planned maintenance.
  • UnplannedOutage: Some systems are experiencing an unplanned outage.

The SystemStatusResult object contains the applicable message.

Retrieving the System Status 

To properly understand and act upon the system status, your environment must include the following elements:

Global Status Container 

Your application must include a global status container. The value of this container allows your application to change code paths to ensure all messages are stored while waiting for the status to return to OK. If the global status container contains an InMaintenance or UnplannedOutage status, be sure to wait for the scheduled status call (described below) to update the global status container to the OK status.

Scheduled Status Calls 

Your application must include a scheduled status-checking component that can respond to error situations and update the global status container if the status is different. We recommend that you execute the GetCurrentStatus call every 10 minutes. Don’t run the call prior to every API call or at an interval less than 10 minutes.

Exception Handling 

Your application must execute the GetSystemStatus call when SOAP exceptions occur in your application. If the GetSystemStatus call returns anything other than OK, the API updates the global status container.

Sample Code 

1// 1. Invoke the GetSystemStatus Call
2string message;
3SystemStatusResult[] results = integrationFramework.GetSystemStatus(null, out status, out message, out requestID);
4// 2. Output the Overall Status of the Request
5Console.WriteLine("Status: {0}", status);
6// 3. Output the Status of the System
7foreach (SystemStatusResult result in results)
8{
9    Console.WriteLine("_________________");
10    Console.WriteLine(result.SystemStatus);
11}

Output 

1Status: OK
2_________________
3OK

Sample SOAP Envelope 

1<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
2    <soap:Header>
3        <wsa:Action>GetSystemStatus</wsa:Action>
4        <wsa:MessageID>urn:uuid:fc2849b5-e480-43a4-ad07-5cb1be9a37c9</wsa:MessageID>
5        <wsa:ReplyTo>
6            <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
7        </wsa:ReplyTo>
8        <wsa:To>https://YOUR_SUBDOMAIN.soap.marketingcloudapis.com/Service.asmx</wsa:To>
9        <wsse:Security soap:mustUnderstand="1">
10            <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-db1066a9-acf1-4f1b-a455-12e721913742">
11                <wsse:Username>XXXX</wsse:Username>
12                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXX</wsse:Password>
13            </wsse:UsernameToken>
14        </wsse:Security>
15    </soap:Header>
16    <soap:Body>
17        <SystemStatusRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
18<Options />
19        </SystemStatusRequestMsg>
20  </soap:Body>
21</soap:Envelope>

Related Items