fbpx

< / >

APIs Campaign

15. Export campaign data

URL:

https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=campaign_15&campaign_id={{campaign_id}}

 

Description:

This API allows users to programmatically retrieve all records associated with a specific campaign (Predictive/Progressive or Preview) in Wolkvox Manager. This functionality includes both managed (contacted with a result) and unmanaged records, as well as those with or without a conn_id (connection identifier).

This API ensures that the exported data is fully consistent with what would be obtained through the direct export option from the Wolkvox Manager user interface, ensuring data integrity and reliability when integrating with other systems or conducting external analyses.

 

Benefits:

  • Automated data extraction: Enables the automation of campaign record downloads, eliminating the need for periodic manual exports.
  • Information consistency: Ensures that data retrieved via the API is identical to manually exported data from the Manager, guaranteeing reliability.
  • Complete visibility:  Provides access to all campaign records, including both managed and unmanaged, allowing for thorough performance analysis.
  • Operational efficiency: Reduces manual workload and minimizes errors associated with handling large volumes of data.

 

How it works:

  • This API is consumed using the GET method.
  • Replace {{wolkvox_server}} in the URL with the operation’s server name.
  • Use the header wolkvox-token: {{token}} to provide the authorization token.
  • Keep in mind that the same token cannot be used simultaneously; you may schedule the next API call only after a successful result from the previous one.
  • In terms of timing, you may call the API every 5 minutes to track your operation.
  • Replace {{type_campaign}} in the URL with the assigned campaign type, which can be either “predictive” or “preview”.
  • Replace {{campaign_id}} in the URL with the campaign’s unique identification code.
  • Replace {{YYYYmmddHHiiss}} in the URL with the start date (date_ini) and end date (date_end) in the format “YearMonthDayHourMinuteSecond”.

 

Code Examples:

In our Postman workspace ([click here] to access it), you have access to code examples that facilitate integration with our APIs in different programming languages such as cURL, Python, JavaScript, and more.

This feature is ideal for quick integrations and allows you to adapt the API calls to your system’s programming language.

 

How to Use the Code Examples:

  1. Navigate to our Postman workspace.
  2. Select the API you want to consult.
  3. Edit the necessary API parameters according to your goals.
  4. In the “Code” tab, select your preferred programming language.
  5. You will get an auto-generated code snippet, ready to use with the parameters and authentication previously configured.

 

Request

NAMEDESCRIPTIONTYPE
type_campaign (URL)Campaign type.String
campaign_id (URL)Refers to the campaign’s identification code.String
date_ini (URL)Start date (YYYYmmddHHiiss).String
date_end (URL)End date (YYYYmmddHHiiss).String

Response

NAMEDESCRIPTIONTYPE
codeAPI response status code.String
total_recordsTotal number of campaign records returned in the response.String
campaign_idUnique identifier of the campaign to which the records belong.String
recordsArray of objects, where each object represents an individual campaign record and contains its associated data. The fields within each record may vary depending on the campaign configuration.Array
nombre_clienteCustomer’s first name.String
apellido_clienteCustomer’s last name.String
tipo_docCustomer’s ID document type.String
id_clienteCustomer’s identification number.String
edadCustomer’s age.String
sexoCustomer’s gender.String
paisCustomer’s country of residence.String
departamentoCustomer’s state or department.String
ciudadCustomer’s city.String
zonaCustomer’s geographic zone.String
direccionCustomer’s home address.String
opt1 → opt12Custom optional campaign fields. These fields may contain any type of additional data loaded in the campaign file.String
tel 1 → tel10Phone numbers associated with the customer.String
tel_extraAdditional phone number field.String
id_agentAgent ID (provided by the Wolkvox system) who managed the record.String
resultadoFinal result of the record handling. Possible values: 
ANSWER MACHINE (answered by a machine), NO ANSWER (not answered), FAILED (failed), ANSWER (answered), CONGESTION (network congestion), ABANDON (abandoned), BUSY (busy line), CHANUNAVAIL (channel unavailable for outbound call)
String
llamadasNumber of call attempts.String
id_callUnique identifier of the last call.String
cod_rslt1Group 1 activity code used by the agent to classify the call result.String
description_cod1Description of activity code 1.String
cod_rslt2Group 2 activity code used by the agent to classify the call result.String
comentariosComment or note history recorded by agents.String
rellamadaScheduled callback date and time, if applicable.String
rellamada_countNumber of times a callback has been scheduled for this record.String
emailCustomer’s email address.String
rellamada_telSpecific callback phone number.String
last_dial_tele(Duplicate) Specific callback phone number.String
history_dial_telDetailed call attempt history, including date, result, and dialed number.String
rellamada_infoAdditional information related to the callback.String
Possible Response Codes
				
					$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://wv{{wolkvox_server}}.wolkvox.com/api/v2/campaign.php?api=campaign_15&campaign_id={{campaign_id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'wolkvox-token: {{wolkvox-token}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

				
			

RESPONSE

				
					{
    "code": "200",
    "total_records": "",
    "campaign_id": "",
    "records": [
        {
            "nombre_cliente": "",
            "apellido_cliente": "",
            "tipo_doc": "",
            "id_cliente": "",
            "edad": "",
            "sexo": "",
            "pais": "",
            "departamento": "",
            "ciudad": "",
            "zona": "",
            "direccion": "",
            "opt1": "",
            "opt2": "",
            "opt3": "",
            "opt4": "",
            "opt5": "",
            "opt6": "",
            "opt7": "",
            "opt8": "",
            "opt9": "",
            "opt10": "",
            "opt11": "",
            "opt12": "",
            "tel1": "",
            "tel2": "",
            "tel3": "",
            "tel4": "",
            "tel5": "",
            "tel6": "",
            "tel7": "",
            "tel8": "",
            "tel9": "",
            "tel10": "",
            "tel_extra": "",
            "id_agent": "",
            "resultado": "",
            "fecha": "",
            "llamadas": "",
            "id_call": "",
            "cod_rslt1": "",
            "description_cod1": "",
            "cod_rslt2": "",
            "description_cod2": "",
            "comentarios": "",
            "rellamada": "",
            "rellamada_count": "",
            "email": "",
            "rellamada_tel": "",
            "last_dial_tele": "",
            "history_dial_tel": "",
            "rellamada_info": ""
        }
    ]
}
				
			

Usamos cookies, se continuar a navegar assumimos que concorda. Pode ler mais sobre a utilização de cookies nas nossas políticas de privacidade e tratamento de dados pessoais

We use cookies, if you continue browsing we will assume that you agree. You can read more about the use of cookies in our privacy policies and treatment of personal data