LeadExec has the ability to send a lead using a SOAP delivery. SOAP stands for Simple Object Access Protocol, and it is used to allow a system to explicitly set what parameters that system is expecting.
Each SOAP based system should provide a WSDL (Web Service Definition Language) or API breakdown of what that service is expecting. That service will also include what versions of SOAP (version 1.1 or 1.2) is expected or supported.
Once you have received either the WSDL or API breakdown and determined which version of SOAP you will use, you can use the following steps within LeadExec to configure your POST.
This article will cover both 1.1 and 1.2 versions of SOAP.
Step 1 (Requirements): Generate an example XML document (aka. envelope) that will be sent to the SOAP service. This envelope's format will depend on which version of SOAP is being used.
If you have been provided a WSDL the easiest way to generate an example XML envelope is to use a utility to generate the document. We recommend using SoapUI (www.soapui.org). For instructions on using SoapUI to generate the XML envelope visit Creating XML Envelope.
If you have not been provided a WSDL or a way to download the WSDL, it is best to contact the receiving party and request this information. Since SOAP protocols require a very specific SOAP envelope, trying to build one without the WSDL will be difficult and time consuming.
Step 2 (Delivery URL Settings): Create the delivery method within LeadExec for the SOAP delivery.
On the Delivery URL tab you will specify the content type as well as any additional headers required for the SOAP delivery.
If you are using SOAP 1.2 there is no custom header required as the SOAP envelope contains all the information needed for the POST. However, the content type must be
If you are using SOAP 1.1 you must include a custom header that specifies which SOAP action you are consuming. This should be included in your documentation. The content type must be
SOAP 1.1 Example:
In the above example you can see that for SOAP 1.1 the headers must include the following:
Content-Type: text/xml; charset=utf-8
The important items within that definition is the Content-Type and SOAPAction as these must be specified within LeadExec. The example below shows how these settings would be specified within LeadExec.
In the above example the Custom Header Attributes are used to specify the SOAPAction requirement, and the Content Type drop down is used to specify that requirement.
SOAP 1.2 Example:
In the above example you can see for SOAP 1.2 the headers must include the following:
Content-Type: application/soap+xml; charset=utf-8
The important item in this definition is the Content-Type, with SOAP 1.2 the SOAPAction is not needed. The example below shows how these settings would be specified within LeadExec
In the above example the Custom Header Attributes are not needed, and the Content Type drop down is used to specify that requirement.
Step 3 (Field Mappings):
Once you have setup your delivery URL settings, you would create the field mappings for each field you want to send in the XML document as normal.
After you have setup your field mappings you will want to take the XML example envelope you generated (Step 1) and put that in the XML Schema tab.
The XML envelope will depend on the WSDL as well as what SOAP version you are using. Make sure you replace all ? with values or placeholders from your field mappings.
Step 5 (Response Settings):
The documentation that you received should specify what the response from that system will look like. Consider the following example from LeadExec's Lead Receiver API
In the example above (your documentation may be different). We can see for the General method the response contains an
<isValidPost> node. We can check this node to make sure our submission was accepted.
Consider the following example
The example above tells LeadExec to look for
<isValidPost>true</isValidPost>. If LeadExec does not find this in the response, it will flag the delivery as a failure.
If you need to locate an ID to validate the post you can do that using Regular Expressions.
If your response looks like:
And the system only sends a LeadID if it is a valid POST, you can use the following expression to locate if it is valid:
This will ensure that the LeadID node is supplied and has a value, if that is not found, the POST will be labeled as failed.
Note: Be sure to check the 'Use Regular Expressions' box.
Once all steps are completed, you are now able to submit your leads using SOAP.