samiaraboglu/alotech-php-api

1.5.2 2023-11-29 10:11 UTC

This package is auto-updated.

Last update: 2024-04-29 11:21:16 UTC


README

Latest Stable Version Total Downloads License

Installing

Via composer

$ composer require samiaraboglu/alotech-php-api

Authentication

$authentication = new AloTech\Authentication();
$authentication->setUsername('{USER_NAME}');
$authentication->setAppToken('{APP_TOKEN}');

$aloTech = new AloTech\AloTech($authentication);

Ping

Test method to check API status and connectivity.

$response = $aloTech->ping();

Login

Set user session key.

$aloTech->login('{EMAIL}');

Click 2

Use click2 service.

$click2 = new AloTech\Click2($aloTech);

Call

Used to trigger a call to given number.

$click2->call([
    'phonenumber' => '{PHONE_NUMBER}',
    'hangup_url' => '{YOUR_HANGUP_URL}'
]);

Hang

Hangs up the active call of the agent.

$click2->hang();

Hold

Holds the active call of the agent.

$click2->hold();

Unhold

Unholds the active call of the agent.

$click2->unhold();

Report

Use report service.

$report = new AloTech\Report($aloTech);

Agent Performance

Returns agent performance information for the given period.

$report->agentPerf([
    'startdate'     => '{Y-m-d}',           // Optional
    'finishdate'    => '{Y-m-d}',           // Optional
    'agent'         => '{AGENT}',           // Optional
    'email'         => '{EMAIL}',           // Optional
    'agentcustomid' => '{AGENTCUSTOMID}',   // Optional
    'team'          => '{TEAM}',            // Optional
]);