Salesforce Marketing cloud SOAP API testing from Postman
Testing SOAP API calls in Salesforce Marketing Cloud using SOAP UI is a straightforward process. However, when it comes to testing the same API calls with Postman, it can become a bit tricky.
In this blog post, we will walk through the process of testing a triggered email send using the SOAP API in Postman. We'll cover the necessary steps and parameters to include in the API request to ensure successful execution.
Testing Triggered Email Send with Postman:
To test a triggered email send using the SOAP API in Postman, follow these steps:
- Import WSDL: Begin by importing the WSDL file into Postman. The WSDL file contains the necessary definitions for the SOAP API.
- Set Endpoint: By default, use the generic endpoint provided. However, for better performance, consider using tenant-specific Marketing Cloud endpoints. Refer to your account settings in the Marketing Cloud setup for the tenant-specific endpoint.
- Configure-Request Parameters: Modify the sample input to include the required parameters for the triggered email send. These parameters may include the email address, email content, subscriber information, and any additional data required for personalization.
- Add SOAP Action Header: Include the SOAP action header in the request to provide information about the action being performed. This is a crucial step to ensure that the request is recognized as a valid SOAP message. Set the SOAP action header value according to the specific SOAP action you are performing.
- Set SOAP Envelope: Construct the SOAP envelope with the necessary elements and data for the triggered email send. Ensure that the structure and content of the SOAP envelope align with the WSDL definitions.
- Send the Request: Finally, send the API request in Postman and observe the response. Pay attention to any error messages or status codes received. If the error message indicates that the "action" is missing, it means the SOAP action header was not included correctly. Review the SOAP action header and make necessary adjustments.
Error received:
WSE012: The input was not a valid SOAP message because the following information is missing: action
Add header attributes as below for a successful API call.
No comments:
Post a Comment