Form data push to 3 places: Constant Contact, MySql, Salesforce?

WebGirlCrissy used Ask the Experts™
Hi there - I have a basic embed form that directs to Constant Contact currently (first, last, title, company, email). I'm looking for ideas on how to simultaneously get this data to not only push to Constant Contact but also save data to local mySQL and push to Salesforce.  

Any ideas on how I could make this happen?


This is the Constant Contact embed code used
<!--Begin CTCT Sign-Up Form-->
<!-- EFD 1.0.0 [Tue Dec 29 20:00:38 EST 2015] -->
<link rel='stylesheet' type='text/css' href=''>
<div class="ctct-embed-signup">
   <div style="color:#343434; background-color:#FFFFFF; border-radius:5px;">
   <p style="font-size:11px; line-height:16px;">To keep updated on all new information about our 2016 education and networking conferences and events, 
     <br />
     please fill out the form below.<br /><br />
       <span id="success_message" style="display:none;">
           <div style="font-size:11px; line-height:16px;">Thank you. We have received your information. We will keep you updated on all new information about our 2016 education and networking conferences and events.<br /><br />
       <form data-id="embedded_signup:form" name="embedded_signup" method="POST" action="">
           <!-- The following code must be included to ensure your sign-up form works properly. -->
           <input data-id="ca:input" type="hidden" name="ca" value="our-custom-value-goes-here">
           <input data-id="list:input" type="hidden" name="list" value="our-list-goes-here">
           <input data-id="source:input" type="hidden" name="source" value="EFD">
           <input data-id="required:input" type="hidden" name="required" value="list,email,first_name,last_name,job_title,company">
           <input data-id="url:input" type="hidden" name="url" value="">
           <p data-id="First Name:p">
             <label data-id="First Name:label" data-name="first_name" style="font-size:11px; display:block; padding-bottom:4px;">First Name<span style="color:#F4070B">*</span><br />
            </label> <input data-id="First Name:input" type="text" name="first_name" value="" maxlength="50"></p>
           <p data-id="Last Name:p" >
             <label data-id="Last Name:label" data-name="last_name" style="font-size:11px; display:block; padding-bottom:4px;">Last Name<span style="color:#F4070B">*</span><br />
            </label> <input data-id="Last Name:input" type="text" name="last_name" value="" maxlength="50"></p>
           <p data-id="Job Title:p" >
             <label data-id="Job Title:label" data-name="job_title" style="font-size:11px; display:block; padding-bottom:4px;">Job Title<span style="color:#F4070B">*</span><br />
            </label> <input data-id="Job Title:input" type="text" name="job_title" value="" maxlength="50"></p>
           <p data-id="Company:p" >
             <label data-id="Company:label" data-name="company" style="font-size:11px; display:block; padding-bottom:4px;">Company<span style="color:#F4070B">*</span><br />
            </label> <input data-id="Company:input" type="text" name="company" value="" maxlength="50"></p>
           <p data-id="Email Address:p" >
             <label data-id="Email Address:label" data-name="email" style="font-size:11px; display:block; padding-bottom:4px;">Email<span style="color:#F4070B">*</span><br />
             </label> <input data-id="Email Address:input" type="text" name="email" value="" maxlength="80"></p>
           <button type="submit" data-enabled="enabled">SUBMIT</button>
<script type='text/javascript'>
   var localizedErrMap = {};
   localizedErrMap['required'] = 		'This field is required.';
   localizedErrMap['ca'] = 			'An unexpected error occurred while attempting to send email.';
   localizedErrMap['email'] = 			'Please enter your email address in format.';
   localizedErrMap['birthday'] = 		'Please enter birthday in MM/DD format.';
   localizedErrMap['anniversary'] = 	'Please enter anniversary in MM/DD/YYYY format.';
   localizedErrMap['custom_date'] = 	'Please enter this date in MM/DD/YYYY format.';
   localizedErrMap['list'] = 			'Please select at least one email list.';
   localizedErrMap['generic'] = 		'This field is invalid.';
   localizedErrMap['shared'] = 		'Sorry, we could not complete your sign-up. Please contact us to resolve this.';
   localizedErrMap['state_mismatch'] = 'Mismatched State/Province and Country.';
	localizedErrMap['state_province'] = 'Select a state/province';
   localizedErrMap['selectcountry'] = 	'Select a country';
   var postURL = '';
<script type='text/javascript' src=''></script>
<!--End CTCT Sign-Up Form-->

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2016
This is not a question with an answer; it's a requirement for application development.  It can be done, and it's a fairly well understood design pattern (using multiple API endpoints to distribute data).  If you're not a professional PHP programmer, you might want to hire one right now, rather than try to learn everything a professional already knows about problems like this.  Even for the best PHP programmers it's going to be a custom script that will require a considerable amount of code and unit testing.

The general design goes as follows.  You will create a custom form and action script (the PHP script that the form submits its contents into).  The form will collect all the information you need for ConstantContaact, plus any additional information you need for SalesForce or for your database.

When the action script runs it will first record the information into a row of your MySQL database.  It will mark the row with two fields, indicating that the CC and SF information has not been posted yet.  Next, the action script will reformat the data as needed and call the CC and SF API endpoints.  As each API completes successfully, you'll update the row in the database to show that the information has been posted to the API.

You may find that the API programming is not a certain thing - it can fail or become slow.  If this happens, it will be good to be able to separate these steps out into separate processes.  Having the "not posted yet" markers in the database will let you rerun the calls to the APIs asynchronously.

Some info to research the SalesForce API (Choose the "REST" Version)

The ConstantContact API

It's an interesting challenge!  Best of luck with the project, ~Ray


Yes, having it populate mySQL first than having API calls to pull from db thereafter is a better idea than pushing all simultaneously. Thank you for your thoughts!
Most Valuable Expert 2011
Top Expert 2016

Thanks for the points - it's a great question! ~Ray

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial