如何通过邮寄方式将Wordpress联系人表格的详细信息发送到CRM?

时间:2019-02-15 08:49:24

标签: javascript jquery wordpress phpmailer crm

我正在尝试通过邮寄方式将联系表单信息发送给我的客户CRM面板。

此代码已在工作,但已停止工作

此代码位于我的footer.php文件中

<script>

    document.addEventListener( 'wpcf7submit', function( event ) {
    var inputs = event.detail.inputs;
 var name=inputs[1].value;
 var your_email=inputs[3].value;
 var phone=inputs[4].value;
 var your_message=inputs[5].value;
 var your_surname=inputs[2].value;
//console.log("name:"+name+"Surname:"+your_surname+"email:"+your_email+"Phone:"+phone+"Your Message:"+your_message);
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();

if(dd<10) {
    dd = '0'+dd
} 

if(mm<10) {
    mm = '0'+mm
} 

today = dd + '/' + mm + '/' + yyyy;

                jQuery.ajax({
                        url: 'http://91.93.44.137:8080/WebForms.nsf/SubmitContactForm',
                        type: 'POST',
                        data: { Project: "Kameroğlu Metro Home", FormDomain: "https://www.kameroglumetrohome.com/",Name:name,Surname:your_surname,PrimaryMobile:phone,PrimaryPhone:phone,PrimaryEmail:your_email,AdditionalComments:your_message,CreatedAt:today,NotificationEnabled:true},
                        success: function (gelenveri) {
                        console.log("success");
                        },
                        error: function (hata) {
                        console.log("error");
                        }
                    });



}, false );

</script>

这是CRM对象;

_BRAND  Project
_CAMPING    CampaignName
_DOMAIN FormDomain
_NAME   Name
_SNAME  Surname
_PHN    PrimaryPhone
_MPHN   PrimaryMobile
_MAIL   PrimaryEmail
_CNT    AdditionalComments
U_REFFER    UtmReference
U_SOURCE    UtmSource
U_MEDIUM    UtmMedium
U_TERM  UtmTerm
U_CONTENT   UtmContent
U_CAMPAIGN  UtmCampaign
_DATE   CreatedAt
_IP IpAddress
_VTYP   DeviceInformation
_PTYP   NotificationEnabled

基本上我需要的是,当用户单击wordpress联系人表单上的“发送”按钮时,我希望它可以交付给我的客户CRM面板

0 个答案:

没有答案