将wordpress联系表单与第三方CRM集成

时间:2017-02-13 03:05:04

标签: javascript php wordpress api crm

我们正在尝试使用wordpress上的联系表单7来获取此联系表单,以便将信息推送到我们内部构建的CRM。

请帮我弄清楚什么是错的?这些信息没有通过CRM

我使用的API是:



<script>

include "class-snoopy.php";
	$snoopy = new Snoopy;
    
    $snoopy->httpmethod = "POST"; // is GET by default

$snoopy->fetchform("http://new.ihna.edu.au/enquire-with-us");
	print $snoopy->results;
$submit_url = "https://portal.ihna.edu.au/crm/crm_enquiries/applicationFormFromWebsites";
 
$submit_vars= [];
$submit_vars["courseId"] = @$this->params['form']['course_id'];
$campus_arr = array("Melbourne" => 1, "Perth" => 2, "Sydney" => 3, "Online" => 4);
$submit_vars["firstName"] = @$this->params['form']['contact_name'];
$submit_vars["lastName"] = @$this->params['form']['last_name'];
$submit_vars["phone"] = @$this->params['form']['contact_phone'];
$submit_vars["country"] = @$this->params['form']['country_name'];
$submit_vars["email"] = @$this->params['form']['contact_email'];
if (@$campus_arr["{$this->params['form']['campus']}"] == '') {
                $submit_vars["campus"] = 0;
} else {
                $submit_vars["campus"] = @$campus_arr["{$this->params['form']['campus']}"];
}
$submit_vars["description"] = @$this->params['form']['contact_comment'];
$submit_vars["ip_address"] = $this->RequestHandler->getClientIp();
 
$res = $this->Snoopy->submit($submit_url, $submit_vars)	

</script> 
 
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

您说您有一个内部CRM,但您是否考虑过已经与{7}}等联系表7集成的一些CRM工具?