Methods

hideBubble()

<button id="amazd-hide-button">Hide</button>
<script>
 window.onAmazdReady = function (amazd) {    
<button id="amazd-hide-button">Hide</button>
<script>  
window.onAmazdReady = function (amazd) {    
<button id="amazd-hide-button">Hide</button>
<script>  
window.onAmazdReady = function (amazd) {
    document.getElementById("amazd-hide-button").addEventListener("click", function () {
     amazd.hideBubble();
   });
 };
</script>

showBubble()

<button id="amazd-show-button">Show</button>
<script>
 window.onAmazdReady = function (amazd) {
   document.getElementById("amazd-show-button").addEventListener("click", function () {
     amazd.showBubble();
   });
 };
</script>

close()

<button id="amazd-close-button">Show</button>
<script>  window.onAmazdReady = function (amazd) {
   document.getElementById("amazd-close-button").addEventListener("click", function () {
     amazd.close();
   });
 };
</script>

open()

<button id="amazd-open-button">Open</button>
<script>
 window.onAmazdReady = function (amazd) {
   document.getElementById("amazd-open-button").addEventListener("click", function () {
     amazd.open();
   });
 };
</script>

configure()

<script>
 window.onAmazdReady = function (amazd) {
   amazd.configure({
     expertScheduling: false,
   });
 };
</script>

startChannel()

Show the Amazd widget and directly create a channel with given user info. Optionally you can also specify an expert or a list of tags to filter out experts. Note: if an expert is specified the list of tags is ignored.

<script>
 window.onAmazdReady = function (amazd) {
   function val(id) {      return document.getElementById(id).value;
   }

   document.getElementById('amazd-start-channel-button').addEventListener('click', function () {
     amazd.startChannel({
       firstname: val('fname'),
       lastname: val('lname'),
       email: val('email'),
       company: val('company'),
       expert: val('expert'), // optional field; if not provided a random expert will be selected.
       tags: ['foo', 'bar'], // optional field; if expert is provided this is ignored.
     });
   });
 };
</script>