Communication Channels

Get Involved. Join the Conversation.

Topic

    Richard Keevil
    launching [SPAC] with known email addressAnswered
    Topic posted July 8, 2015 by Richard KeevilGold Trophy: 10,000+ Points, last edited July 8, 2015 by Erica (Leep) AndersonBlack Diamond: 60,000+ Points, tagged Chat 
    115 Views, 3 Comments
    Title:
    launching [SPAC] with known email address
    Content:

    Our support site is a separate entity from our sales site and control panel.  During a sale, the customer may have given their email address during checkout and when logged into their control panel, we already know their email address.

    How can I launch chat from these external sites and pass to chat the known email address without having to throw up another gated (chat_launch) page?

    /app/chat/chat_launch_preauth (below) throws up a window with the email address pre-populated.  I can rn_hidden the FormInput to just leave the button.  But essentially I want to go from the [SPAC] to chat_landing

    Version:
    Nov 2014
    Code Snippet:

    Best Comment

    Ramy NATOUR

    If we summarize what we have :

    1. The customer's email adress. You are supposed to send it to the chat_landing page using POST in the 'email' key ($_POST['email'])
    2. To craft this POST request, we can:
      1. Insert a form in your page which targets chat_landing.php. This form will be obviously hidden.
      2. Insert an 'email' field in the form. You'll populate the field using the known customer's email (Javascript on the client side, php for the server side).
      3. When the user clicks on the 'Chat', you throw the 'submit' event on that form.

    There may be some subtleties on:

    • The required fields to launch the chat ('first_name' ? 'last_name' ? ...)
    • Possible intermediary states after the POST reception by chat_landing

    Hereafter, the parameters of the POST request (in my instance of rightnow, sensitive data replaced by their meaning):

    To conclude, I'll just suggest the following problematics you'll need to answer for your requirements:

    • How is the builtin way through from chat_launch to chat_landing done ? What is expected in input ? How do they transfere it ?
    • How will I retrieve the email ? How can I transfere the email to the chat_landing page ? What other fields are required and how I am going to retrieve/compute them ?

    Hope it helps,

    Comment

     

    • Ramy NATOUR

      The post request sent to the chat_landing page contains an 'email' attribute.

      However, you may need to populate the others required fields to launch the chat.

    • Richard Keevil

      Thanks Ramy, but how do I define a call to chat_launch instead.  Do I define it in the chat_loging_page property in the [SPAC], disable login_required and how do I POST email to it?

    • Ramy NATOUR

      If we summarize what we have :

      1. The customer's email adress. You are supposed to send it to the chat_landing page using POST in the 'email' key ($_POST['email'])
      2. To craft this POST request, we can:
        1. Insert a form in your page which targets chat_landing.php. This form will be obviously hidden.
        2. Insert an 'email' field in the form. You'll populate the field using the known customer's email (Javascript on the client side, php for the server side).
        3. When the user clicks on the 'Chat', you throw the 'submit' event on that form.

      There may be some subtleties on:

      • The required fields to launch the chat ('first_name' ? 'last_name' ? ...)
      • Possible intermediary states after the POST reception by chat_landing

      Hereafter, the parameters of the POST request (in my instance of rightnow, sensitive data replaced by their meaning):

      To conclude, I'll just suggest the following problematics you'll need to answer for your requirements:

      • How is the builtin way through from chat_launch to chat_landing done ? What is expected in input ? How do they transfere it ?
      • How will I retrieve the email ? How can I transfere the email to the chat_landing page ? What other fields are required and how I am going to retrieve/compute them ?

      Hope it helps,