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

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?

Thanks,
Crissy

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='https://static.ctctcdn.com/h/contacts-embedded-signup-assets/1.0.2/css/signup-form.css'>
<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 />
 </p>
       <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 />
</div>
       </span>
       <form data-id="embedded_signup:form" name="embedded_signup" method="POST" action="https://visitor2.constantcontact.com/api/signup">
          
           <!-- 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>
       
       </form>
   </div>
</div>
<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 name@email.com 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 = 'https://visitor2.constantcontact.com/api/signup';
</script>
<script type='text/javascript' src='https://static.ctctcdn.com/h/contacts-embedded-signup-assets/1.0.2/js/signup-form.js'></script>
<!--End CTCT Sign-Up Form-->

Open in new window

WebGirlCrissyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
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)
https://developer.salesforce.com/blogs/tech-pubs/2011/10/salesforce-apis-what-they-are-when-to-use-them.html
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/

The ConstantContact API
https://developer.constantcontact.com/docs/developer-guides/api-documentation-index.html

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
WebGirlCrissyAuthor Commented:
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!
Ray PaseurCommented:
Thanks for the points - it's a great question! ~Ray
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.