If you are using Contact Form 7 as your Webform Plugin on WordPress. Salesmate is just the right thing that allows you capture your web form submissions directly into it.
Here's how you can integrate the Contact Form 7 on your website with Salesmate.
- Login to your Wordpress site
- On your WP Dashboard
- Go to Appearance > Editor
- Edit the functions.php file and paste the contents from the attached file in the php block ( CF7SalesmatecURL.txt)
- Edit the values of function filter_wpcf7_posted_data to change the Salesmate link and access keys details where
- $domain_api="https://<subdomain>.salesmate.io"; /* this is your Salesmate link name*/
- "AppAccessKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", /* this is the access key for user available under My Account in Salesmate*/
- "AppPrivateKey:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", /* this is the private key for user available under My Account in Salesmate*/
- "sessiontoken: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" / /* this is the session token for user available under My Account in Salesmate*/
- Edit function addContact to map the contact fields Example: $data_submit['name']=$postdata['fullname']; where name is the variable name in Salesmate whereas fullname is the variable name in CF7
- Replace your Salesmate Domain Name (your domain name) along with App access key (xxxxxx), App Private Key (yyyyyy) and Session token (zzzzz) from your Account.
Some import syntax:
where owner is the 'Field Api Key' & 1 is the value ( owner id in this case for the Field API
You can find the "Field Api Key" at Setup > App & Add-ons > SalesmateAPI
"Owner ID" by clicking on User Name under Setup > Users & Security > Users (the only number that you see in the link address is the owner id)
where in $postdata email equals to the contact form's field name.
In case you are passing Company Name,
where name is the Filed Api Key for Company and text-220 is the Contact Form's field name.
In case you want to pass tags on the form, pass them as a field on the contact
- Comment the addContact function if you want to create deal along with contact
Check Out Salesmate.io for more information.