Ini adalah fitur opsional untuk menghemat upaya pengguna memasukkan kembali informasi bisnis mereka selama proses pendaftaran tersemat.
Parameter setup
dari objek extras
di pengaturan Facebook Login dapat digunakan untuk meneruskan data untuk mengisi formulir secara otomatis dalam alur pendaftaran tersemat. Anda bisa melewati semua kolom data atau subset yang harus diisi di formulir. Contoh: jika Anda hanya memiliki nama bisnis, email, dan nomor telepon, Anda dapat melewati informasi itu saja.
<script>
window.fbAsyncInit = function () {
// JavaScript SDK configuration and setup
FB.init({
appId: 'meta-app-id', // Meta App ID
cookie: true, // enable cookies
xfbml: true, // parse social plugins on this page
version: 'v19.0
' //Graph API version
});
};
// Load the JavaScript SDK asynchronously
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
// Facebook Login with JavaScript SDK
function launchWhatsAppSignup() {
// Conversion tracking code
fbq && fbq('trackCustom', 'WhatsAppOnboardingStart', {appId: 'your-facebook-app-id', feature: 'whatsapp_embedded_signup'});
// Launch Facebook login
FB.login(function (response) {
if (response.authResponse) {
const code = response.authResponse.code;
// The returned code must be transmitted to your backend
// there must then perform a server-to-server call to our servers for an access token
} else {
console.log('User cancelled login or did not fully authorize.');
}
},
{
config_id: <CONFIG_ID>, // configuration ID goes here
response_type: 'code', // must be set to 'code' for System User access token
override_default_response_type: true, // when true, any response types passed in the "response_type" will take precedence over the default types
extras: {
setup: {
business: {
name: 'Acme Inc.',
email: 'johndoe@acme.com',
phone: {
code: 1,
number: '6505551234'
},
website: 'https://www.acme.com',
address: {
streetAddress1: '1 Acme Way',
city: 'Acme Town',
state: 'CA',
zipPostal: '94000',
country: 'US'
},
timezone: 'UTC-08:00'
},
phone: {
displayName: 'Acme Inc',
category: 'ENTERTAIN',
description: 'Acme Inc. is a leading entertainment company.',
}
}
}
});
}
</script>
setup
Tabel berikut menyediakan daftar kolom untuk mengisi data formulir secara otomatis di UI alur pendaftaran tersemat.
Kolom | Deskripsi |
---|---|
jenis: String | Nama bisnis. Contoh: |
jenis: String (format email valid) | Email bisnis. Contoh: |
jenis: String (format URL valid) | URL situs web bisnis. Contoh: |
jenis: Angka | Kode telepon negara. Contoh: |
jenis: String | Nomor telepon bisnis. Jangan lupa untuk mengecualikan kode telepon negara. Contoh: |
jenis: String | Nama jalan alamat bisnis (baris 1). Contoh: |
jenis: String | Nama jalan alamat bisnis (baris 2). |
jenis: String | Kota alamat bisnis. Contoh: |
jenis: String | Negara bagian atau Provinsi alamat bisnis. Contoh: |
jenis: String | Kode pos alamat bisnis. Contoh: |
| Negara alamat bisnis. Contoh: |
jenis: format Offset UTC. Contoh: "UTC -08:00". | Zona waktu bisnis. Contoh: |
jenis: String mengikuti pedoman nama tampilan. | Nama tampilan profil bisnis WhatsApp dapat dilihat oleh pengguna akhir dalam klien WhatsApp mereka. Contoh: |
| Vertikal industri WhatsApp Business. Lihat tabel Kategori Profil WhatsApp Business di bawah untuk nilai yang diterima. Contoh: |
jenis: String (Maksimum 256 karakter) | Deskripsi bisnis. |
Tabel berikut memberikan daftar nilai yang diterima untuk kategori profil WhatsApp Business yang menggambarkan industri tempat bisnis beroperasi.
Kategori | Nilai yang Diterima |
---|---|
Otomotif |
|
Kecantikan, Spa, dan Salon |
|
Pakaian |
|
Pendidikan |
|
Hiburan |
|
Event Organizer |
|
Keuangan dan Perbankan |
|
Makanan dan Bahan Pangan |
|
Layanan Publik |
|
Hotel dan Penginapan |
|
Medis dan Kesehatan |
|
Nirlaba |
|
Layanan Profesional |
|
Perbelanjaan dan Ritel |
|
Perjalanan dan Transportasi |
|
Restoran |
|
Lainnya |
|
Setelah pengaturan, klien Anda akan melihat layar seperti ini: