Skip Navigation
Expand
Pre-populate the embedded chat inlay
Answer ID 11716   |   Last Review Date 09/30/2020

How do I pre-populate the embedded chat inlay? 

Environment:

Chat
Oracle B2C Service

Resolution:

The following is an example of exercising the feature to pre-populate the embedded chat with details from the 
current logged in user when they are on a customer portal page. If not on a CP page, you will need to replace the various values appropriately.
In this example, there is first a check to see if the end user us logged in, if so, then populate the launch form
with the appropriate values that you want on the form.
<rn:condition logged_in="true">
                <inlay-oracle-chat-embedded
                    id="chatInlay"
                    class="inlay"
                    site-url="XXX-yourSiteURL-XXX"
                    launch-form-fields='[{"name": "FIRST_NAME","value": "<?= get_instance()->session->getProfileData('firstName'); ?>"}, {"name": "LAST_NAME","value": "<?= get_instance()->session->getProfileData('lastName'); ?>"}, {"name": "EMAIL","value": "<?= get_instance()->session->getProfileData('email'); ?>"}]'></inlay-oracle-chat-embedded>  
<rn:condition_else/>
                <inlay-oracle-chat-embedded
                    id="chatInlay"
                    class="inlay"
                    site-url="XXX-yourSiteUrl-XXX"
                    launch-form-fields='[{"name": "FIRST_NAME"}, {"name": "LAST_NAME"}, {"name": "EMAIL"}]'></inlay-oracle-chat-embedded>  
</rn:condition>
In a future release an option will be provided to disable these fields prior to submission to the chat server.


For additional information, refer to the Inlays and Customer Portal and Answers About Chat Inlays section in the Online Help User Guide documentation. To access Oracle B2C Service manuals and documentation online, refer to the Documentation for Oracle B2C Service Products.

Notify Me
The page will refresh upon submission. Any pending input will be lost.