前言介紹
- 這款 WordPress 外掛「Brilliant Web-to-Lead for Salesforce」是 2010-04-28 上架。
- 目前有 3000 個安裝啟用數。
- 上一次更新是 2022-02-24,距離現在已有 1163 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 5.0 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
- 有 38 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
nickciske | brilliantplugins |
外掛標籤
crm | ContactForm | Web to lead | case to lead | contact form |
內容簡介
Brilliant Web-to-Lead for Salesforce 將您的 WordPress 安裝與您的 Salesforce CRM 帳戶之間建立了一個穩固的整合!使用者可以在您的網站上填寫聯絡表單,而潛在客戶(或個案)會直接進入 Salesforce CRM:不再需要複製粘貼潛在客戶信息,不再漏失潛在客戶,每一個潛在客戶都在 Salesforce.com 上等待您的跟進。
功能
您可以完全配置表單的所有不同設置,然後使用短碼將表單插入您的文章或頁面中,或者您可以使用外掛所附帶的小工具,將表單插入側邊欄!
先前的貢獻者:
Joost de Valk
ModernTribe
Daddy Donkey Labs
過濾器和挂鉤程序
注意:
這些應放置在正在使用的佈景主題 functions.php 或功能外掛中。
不要直接編輯外掛(除非您明白這樣做的影響)。
您可以使用 Pluginception 創建自定義外掛,使其獨立於您的佈景主題:https://wordpress.org/plugins/pluginception/
過濾器
salesforce_w2l_api_url
更改外掛程式所發送數據的 API URL。傳遞表單類型(潛在客戶或個案)。
add_filter( 'salesforce_w2l_api_url', 'my_w2l_api_url', 10, 2 );
function my_w2l_api_url( $url, $form_type ){
return 'https://my.custom-api-url.com/something/';
}
sfwp2l_validate_field
為每個字段提供您自己的驗證邏輯。
傳遞一個錯誤數組,以及字段名稱,提交的值和字段配置(類型、預設值、必填等)。
以下是阻止常見免費電子郵件提供商的示例:
add_filter('sfwp2l_validate_field','block_non_biz_emails', 10, 4);
function block_non_biz_emails( $error, $name, $val, $field ){
if( $name == 'email' ){
$non_biz_domains = array( 'gmail.com', 'yahoo.com', 'hotmail.com', 'aol.com' );
$domain = array_pop(explode('@', $val));
if( in_array( $domain, $non_biz_domains ) ){
$error['valid'] = false;
$error['message'] = 'Please enter a business email addresss.';
}
}
return $error;
}
您可以添加到 $non_biz_domains 中,以阻止其他提供商。
salesforce_w2l_form_html
在返回 WordPress 显示之前,表单的 HTML。
salesforce_w2l_cc_user_from_name
更改“來自”名稱(用戶確認)
salesforce_w2l_cc_user_from_email
更改“來自”電子郵件(用戶確認)
salesforce_w2l_cc_admin_from_name
更改“來自”名稱(管理員通知)
salesforce_w2l_cc_admin_from_email
更改“來自”電子郵件(管理員通知)
salesforce_w2l_cc_admin_email_list
將此代碼添加到您的 functions.php 文件中將向列表添加 3 封電子郵件。您可以添加任意數量的電子郵件,並且每個電子郵件都會收到管理員通知電子郵件。
add_filter('salesforce_w2l_cc_admin_email_list','salesforce_add_emails');
function salesforce_add_emails( $emails ){
//uncomment line below to remove site admin
//unset($emails[0]);
$emails[]='[email protected]';
$emails[]='[email protected]';
$emails[]='[email protected]'。
原文外掛簡介
Brilliant Web-to-Lead for Salesforce creates a solid integration between your WordPress install(s) and your Salesforce CRM account! People can enter a contact form on your site, and the lead (or case) goes straight into Salesforce CRM: no more copy pasting lead info, no more missing leads: each and every one of them is in Salesforce.com for you to follow up.
Features
You can fully configure all the different settings for the form, and then use a shortcode to insert the form into your posts or pages, or you can use the widget that comes with the plugin and insert the form into your sidebar!
Previous contributors:
Joost de Valk
ModernTribe
Daddy Donkey Labs
Filters and Hooks
Note:
These should be placed in your active theme functions.php or a functionality plugin.
Never edit a plugin directly (unless you understand the implications of doing so).
You can use Pluginception to create a custom plugin for these to make them independent of your theme: https://wordpress.org/plugins/pluginception/
Filters
salesforce_w2l_api_url
Change the API url the plugin posts data to. Passes the form type (lead or case)
add_filter( 'salesforce_w2l_api_url', 'my_w2l_api_url', 10, 2 );
function my_w2l_api_url( $url, $form_type ){
return 'https://my.custom-api-url.com/something/';
}
sfwp2l_validate_field
Provide your own validation logic for each field.
An error array is passed in, along with the field name, submitted value, and field configuration (type, default value, required, etc).
Here’s an example of blocking common free email providers:
add_filter('sfwp2l_validate_field','block_non_biz_emails', 10, 4);
function block_non_biz_emails( $error, $name, $val, $field ){
if( $name == 'email' ){
$non_biz_domains = array( 'gmail.com', 'yahoo.com', 'hotmail.com', 'aol.com' );
$domain = array_pop(explode('@', $val));
if( in_array( $domain, $non_biz_domains ) ){
$error['valid'] = false;
$error['message'] = 'Please enter a business email addresss.';
}
}
return $error;
}
You can add to the $non_biz_domains to block other providers as well.
salesforce_w2l_form_html
HTML of the form before it’s returned to WordPress for display
salesforce_w2l_cc_user_from_name
Change from name (user confirmation)
salesforce_w2l_cc_user_from_email
Change from email (user confirmation)
salesforce_w2l_cc_admin_from_name
Change from name (admin notification)
salesforce_w2l_cc_admin_from_email
Change from email (admin notification)
salesforce_w2l_cc_admin_email_list
Adding this code to your functions.php file will add 3 emails to the list. You can add as many as you want and each will get an admin notification email.
add_filter('salesforce_w2l_cc_admin_email_list','salesforce_add_emails');
function salesforce_add_emails( $emails ){
//uncomment line below to remove site admin
//unset($emails[0]);
$emails[]='[email protected]';
$emails[]='[email protected]';
$emails[]='[email protected]';
return $emails;
}
salesforce_w2l_cc_user_email_content
salesforce_w2l_cc_admin_email_content
Allows you to filter (append, prepend, modify) the email message content sent to the user or admin(s).
add_filter('salesforce_w2l_cc_user_email_content','salesforce_filter_user_message', 10, 1);
function salesforce_filter_user_message( $message ){
$message = 'Before the user message' . "\r\n\r\n" . $message . "\r\n\r\n" . 'After the user message';
return $message;
}
add_filter('salesforce_w2l_cc_admin_email_content','salesforce_filter_admin_message', 10, 1);
function salesforce_filter_admin_message( $message ){
$message = 'Before the admin message' . "\r\n\r\n" . $message . "\r\n\r\n" . 'After the admin message';
return $message;
}
salesforce_w2l_cc_admin_replyto_email
Filter the Reply-To email header (e.g. to allow replies to go to the form submitter)
salesforce_w2l_returl
salesforce_w2l_returl_{Form ID}
Allows you to filter the value of a field before it is output to dynamically populate it with a value, auto set it based on another value, etc.
Examples:
// Filter Return/Success URL on a specific form
// salesforce_w2l_returl_{Form ID}
add_filter( 'salesforce_w2l_returl_1_tester', 'salesforce_w2l_returl_1_tester_example', 10, 1 );
function salesforce_w2l_returl_1_tester_example( $returl ){
return 'http://123.com';
}
salesforce_w2l_success_message
salesforce_w2l_success_message_{Form ID}
Allows you to filter the contents of the success message before it is output to dynamically populate it with a value, auto set it based on another value, etc.
Examples:
// Filter Success Message on a specific form
// salesforce_w2l_success_message_{Form ID}
add_filter( 'salesforce_w2l_success_message_1_tester', 'salesforce_w2l_success_message_1_tester_example', 10, 1 );
function salesforce_w2l_success_message_1_tester_example( $success ){
return 'Testing 123';
}
salesforce_w2l_field_value
salesforce_w2l_field_value_{Form ID}_{Field Name}
Allows you to filter the value of a field before it is output to dynamically populate it with a value, auto set it based on another value, etc.
Note that the second filter requires you to replace {Form ID} and {Field Name} to be replaced with the relevant form id and field name.
If you need access to the field or form settings in your filter you can use:
$field = salesforce_get_field( $field_name, $form_id );
$form = salesforce_get_form( $form_id );
Examples:
// Pre-check a checkbox
add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_precheck_example', 10, 3 );
function salesforce_w2l_field_value_precheck_example( $val, $field, $form ){
$form_id = 1; // form id to act upon
$field_name = 'checkboxfield__c'; // API Name of the field you want to auto check
if( $form == $form_id && $field_name == $field && ! $_POST )
return 1; // or whatever the value of your checkbox is
return $val;
}
// Store HTTP referrer in a field (this is not 100% reliable as the browser sends this value to the server)
add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_referrer_example', 10, 3 );
function salesforce_w2l_field_value_referrer_example( $val, $field, $form ){
$form_id = 1; // form id to act upon
$field_name = 'referrer__c'; // API Name of the field you want to autofill
if( $form == $form_id && $field_name == $field ){
if( isset( $_SERVER['HTTP_REFERER'] ) ){
return $_SERVER['HTTP_REFERER'];
}
}
return $val;
}
// Autofill fields based on thew query string (using Google Analytics tracking variables in this example)
add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_querystring_example', 10, 3 );
function salesforce_w2l_field_value_querystring_example( $val, $field, $form ){
$form_id = 1; // form id to act upon
$field_name = 'source__c'; // API Name of the field you want to autofill
$qs_var = 'source'; // e.g. ?source=foo
if( $form == $form_id && $field_name == $field ){
if( isset( $_GET[ $qs_var ] ) ){
return $_GET[ $qs_var ];
}
}
return $val;
}
// Autofill a user's country based on IP
add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_geoip_example', 10, 3 );
function salesforce_w2l_field_value_geoip_example( $val, $field, $form ){
// Based on this plugin: https://wordpress.org/plugins/geoip-detect/
// Adjust this code to the one used by your geo detection plugin
if( !function_exists( 'geoip_detect2_get_info_from_current_ip' ) ) return;
$form_id = 1; // form id to act upon
$field_name = 'country__c'; // API Name of the field you want to autofill
if( $form == $form_id && $field_name == $field ){
$userInfo = geoip_detect2_get_info_from_current_ip();
//$val = $userInfo->country->isoCode; // e.g. US
$val = $userInfo->country->name; // e.g. United States
}
return $val;
}
// Autofill a date
// https://codex.wordpress.org/Function_Reference/current_time
// http://php.net/manual/en/function.date.php
add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_date_example', 10, 3 );
function salesforce_w2l_field_value_date_example( $val, $field, $form ){
$form_id = 1; // form id to act upon
$field_name = 'mydatefield__c'; // API Name of the field you want to auto check
if( $form == $form_id && $field_name == $field && ! $_POST )
return current_time('Y-m-d'); // or whatever date format you want
return $val;
}
salesforce_w2l_form_action
Allows you to remove the form action.
// Remove Form Action
add_filter( 'salesforce_w2l_form_action', 'salesforce_w2l_form_action_example', 10, 1 );
function salesforce_w2l_form_action_example( $action ){
return '';
}
salesforce_w2l_lead_source
Allows you to alter the lead source (per form or globally).
// Alter Lead Source
add_filter( 'salesforce_w2l_lead_source', 'salesforce_w2l_lead_source_example', 10, 2 );
function salesforce_w2l_lead_source_example( $lead_source, $form_id ){
if( $form_id == 1 )
return 'Example Lead Source for Form #1 on page id #'.get_the_id();
return $lead_source;
}
salesforce_w2l_post_args
Allows filtering of the wp_remote_post arguments (e.g. extend the timeout, increase redirect limit, etc).
add_filter( 'salesforce_w2l_post_args', 'salesforce_w2l_post_args_example' );
function salesforce_w2l_post_args_example( $args ){
$args['timeout'] = 10; // http timeout in seconds
return $args;
}
salesforce_w2l_post_data
Allows filtering of the post data before it is sent to SalesForce.
add_filter( 'salesforce_w2l_post_data', 'salesforce_w2l_post_data_example', 10, 3 );
function salesforce_w2l_post_data_example( $post, $form_id, $form_type ){
error_log( 'POST ARGS = '.print_r( $post, 1 ) );
$post['test'] = 'test';
return $post;
}
salesforce_w2l_show_admin_nag_message
Suppress the organization id missing nag message (return false).
add_filter( 'salesforce_w2l_show_admin_nag_message', '__return_false', 10, 1 );
Actions
salesforce_w2l_before_submit
Allows you to do something (read only) with the post data before it’s submitted to SalesForce.
e.g. Send it to another API, log it to a database, etc.
If you need to change the data, use the salesforce_w2l_post_data filter.
add_action('salesforce_w2l_before_submit', 'salesforce_w2l_before_submit_example', 10, 3 );
function salesforce_w2l_before_submit_example( $post, $form_id, $form_type ){
error_log( 'BEFORE SUBMIT '.print_r($post,1) );
}
salesforce_w2l_error_submit
Allows you to do something (read only) with the post data when there is an error submitting to SalesForce.
e.g. Notify someone via email, log it somewhere, etc.
add_action('salesforce_w2l_error_submit', 'salesforce_w2l_error_submit_example', 10, 4 );
function salesforce_w2l_error_submit_example( $result, $post, $form_id, $form_type ){
error_log( 'ERROR SUBMIT ' . print_r($result,1) );
}
salesforce_w2l_after_submit
Allows you to do something (read only) with the post data after it’s submitted to SalesForce.
e.g. Send it to another API, log it to a database, etc.
add_action('salesforce_w2l_after_submit', 'salesforce_w2l_after_submit_example', 10, 3 );
function salesforce_w2l_after_submit_example( $post, $form_id, $form_type ){
error_log( 'AFTER SUBMIT '.print_r($post,1) );
}
salesforce_w2l_get_prefixed_inputs
Allows you to add to or change the list of fields that are auto prefixed by the plugin to avoid collisions with WP Query reserved request parameters
add_filter('salesforce_w2l_get_prefixed_inputs', 'salesforce_w2l_get_prefixed_inputs_example', 10, 1 );
function salesforce_w2l_get_prefixed_inputs_example( $fields ){
$fields[] = 'new_field_name';
return $fields;
}
salesforce_w2l_input_name_prefix
Allows you to change the default field name prefix (_sf) used to avoid collisions with WP Query reserved request parameters.
add_filter('salesforce_w2l_input_name_prefix', 'salesforce_w2l_input_name_prefix_example', 10, 1 );
function salesforce_w2l_input_name_prefix_example( $prefix ){
return 'sfwp2lprefix_';
}
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Brilliant Web-to-Lead for Salesforce」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 2.0 | 2.1 | 2.2 | 2.3 | 2.4 | 2.5 | 2.6 | 2.7 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | 2.0.1 | 2.0.2 | 2.0.3 | 2.1.1 | 2.2.1 | 2.2.2 | 2.2.3 | 2.2.4 | 2.2.5 | 2.3.1 | 2.3.2 | 2.3.4 | 2.3.6 | 2.3.7 | 2.3.8 | 2.3.9 | 2.4.1 | 2.4.2 | 2.4.3 | 2.4.4 | 2.5.1 | 2.5.2 | 2.5.3 | 2.5.4 | 2.5.5 | 2.6.1 | 2.6.2 | 2.6.3 | 2.6.4 | 2.6.5 | 2.6.6 | 2.6.7 | 2.7.1 | 2.7.2 | 2.7.3 | trunk | 2.7.3.2 | 2.7.3.3 | 2.7.3.4 | 2.7.3.6 | 2.7.3.7 | 2.7.3.8 | 2.7.3.9 |
延伸相關外掛(你可能也想知道)
inoday-Web-to-Lead-Zoho 》「inoday Web-to-Lead Zoho」是一款WordPress外掛,提交聯繫表單後會立即與Zoho CRM同步銷售線索或詢問。您可以在管理畫面中查看日誌報告。, 主要功能包括:,...。