Configuração padrão:

$.DirectChat({hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'});

Dados previamente preenchido:

$.DirectChat({
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
	name: 'Fulano',
	email: '[email protected]',
	phone: '11999999999'
});

Abre em X segundos:

$.DirectChat({
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
	autoStart: 5 //5 segundos
});

Departamento previamente preenchido:

$.DirectChat('startChat', {
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
	department: 999,
	name: 'Fulano',
	email: '[email protected]',
	phone: '11999999999'
});

Ícones:

$.DirectChat({
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
	iconType: 'icon-click-right-bottom'
});


tipo de ícones disponíveis:

  1. bar-click-center
  2. bar-click-left-bottom
  3. bar-click-left-middle
  4. bar-click-left-top
  5. bar-click-right-bottom
  6. bar-click-right-middle
  7. bar-click-right-top
  8. bar-hover-center
  9. bar-hover-left-bottom
  10. bar-hover-left-middle
  11. bar-hover-left-top
  12. bar-hover-right-bottom
  13. bar-hover-right-middle
  14. bar-hover-right-top
  15. icon-click-left-bottom
  16. icon-click-left-top
  17. icon-click-right-bottom
  18. icon-click-right-top

Cores:

$.DirectChat({
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
	color: '374bff' //hex
});

Trigger por javascript:

//abrir chat
onclick="$.DirectChat('startChat', {hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'});"

//abrir ligação
onclick="$.DirectChat('startClick2call', {hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'});"

//abrir chat - departamento previamente selecionado
onclick="$.DirectChat('startChat', {type:'chat' department: 999});"

//abrir ligação - departamento previamente selecionado
onclick="$.DirectChat('startClick2call', {type:'click2call' department: 999});"


Parametros customizados:

$.DirectChat({
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
	codigo: 12989812,
	site: 'https://directcall.com.br'
});

Listagem de departamentos:

var directchat = $.DirectChat({
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
});
directchat.getDepartments(function(departments){
	console.log(departments);
});

Horários de atendimento por departamento:

var directchat = $.DirectChat({
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
});
directchat.getDepartmentHour(999,function(hours){
	console.log(hours);
});

Verificar status do chat Online/Offline:

var directchat = $.DirectChat({
	hash: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
});
directchat.getChatStatus(function(status){
	console.log(status);
});