How to Transfer Custom Variables During a Subscription to a Chatbot

SendPulse's Facebook Messanger integration allows you to transfer {{phone}} and {{email}} variables to a SendPulse account during a subscription to a Facebook chatbot.

You can set up the transfer of variables with two methods.

Method 1

After adding the code of a Facebook chat widget, add the following code to the site:

<script type="text/javascript">
    window.oSpP = {
        phone: '+123123123',
        email: ''

If customers subscribed to the chatbot and after that the {{phone}} and {{email}} variables were added for these customers. Their data will not be transferred to the SendPulse account.

Method 2

Add additional input fields with the sp_push_custom_data class to the site:

<input type="hidden" name="email" class="sp_push_custom_data " value="">
<input type="hidden" name="phone" class="sp_push_custom_data " value="+123123123">

Both methods are universal for sites on any CMS.

If you have already set up the transfer of variables during a subscription to web push notifications, the variables will be transferred during a subscription to a Facebook chatbot as well — no additional settings are required.

Rate this article about "How to Transfer Custom Variables During a Subscription to a Chatbot"

User Rating: 4 / 5 (6)

    Other useful articles

    Popular in Our Blog

    Try a free chatbot for Facebook Messenger