* 26=ShippingAddress2 * 27=ShippingTown * 28=ShippingCounty * 29=ShippingCountry * 30=ShippingPostalCode * 31=ShippingTelephone */ for ($x = 0; $x <= $concount; $x++) { if ($ekmcons[$x] == $order[0]) { $found = true; } } if ($found != true) { // re-create the contact object otherwise we are just editing the same record $contact = new Infusionsoft_Contact(); $contact->addCustomField('_County'); $contact->addCustomField('_County2'); $contact->AccountId = $order[0]; $contact->Email = $order[9]; $contact->FirstName = $order[10]; $contact->LastName = $order[11]; $contact->Company = $order[12]; $contact->StreetAddress1 = $order[13]; $contact->StreetAddress2 = $order[14]; $contact->City = $order[15]; $contact->_County = $order[16]; $contact->Country = $order[17]; $contact->PostalCode = $order[18]; $contact->Phone1 = $order[19]; $contact->Address2Street1 = $order[21]; $contact->Address2Street2 = $order[22];
<form> ContactId: <input type="text" name="ContactId" value="<?php if (isset($_REQUEST['ContactId'])) { echo $_REQUEST['ContactId']; } ?> " /> <input type="submit"/> </form><br/> <?php include '../infusionsoft.php'; if (isset($_REQUEST['ContactId'])) { Infusionsoft_Contact::addCustomField('_LeadScore'); $contact = new Infusionsoft_Contact($_REQUEST['ContactId']); $contact->_LeadScore = $contact->_LeadScore + 1; $contact->save(); echo 'Lead Score for Contact: ' . $contact->FirstName . ' ' . $contact->LastName . ' is now: ' . $contact->_LeadScore; }
if ($order[0] != '') { // now we run a cursive check with existing ekm account id's to prevent duplicates for ($x = 0; $x <= $concount; $x++) { if ($ekmids[$x] == $order[0]) { $found = true; $sel = $x; } } if ($found != true) { if ($order[9] != '' && strpos('EKMUNIQUE', $order[9]) == 0 && $order[36] == 'COMPLETE') { //echo 'updating for email address '.$order[9].'<br>'; $contact = new Infusionsoft_Contact(); $eml = new Infusionsoft_EmailService(); $grp = new Infusionsoft_ContactGroupAssign(); $data = new Infusionsoft_DataService(); $contact->addCustomField('_County'); $contact->addCustomField('_County2'); $contact->addCustomField('_ShippingCompany'); $contact->addCustomField('_ShippingFirstName'); $contact->addCustomField('_ShippingLastName'); $contact->AccountId = $order[0]; $contact->Email = $order[9]; $contact->FirstName = $order[10]; $contact->LastName = $order[11]; $contact->Company = $order[12]; $contact->StreetAddress1 = $order[13]; $contact->StreetAddress2 = $order[14]; $contact->City = $order[15]; $contact->_County = $order[16]; $contact->Country = $order[17]; $contact->PostalCode = $order[18];