Search
Close this search box.

< / >

APIs Campaign

14. Filter campaign

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

Description:

This API allows for efficient campaign filtering, enabling users to apply custom search criteria to campaign records.

Benefits:

You will be able to customize searches within campaigns, improving efficiency in managing and retrieving data relevant to contact center operations. This facilitates more informed decision-making and a better user experience when working with specific campaigns.

How it works?

  • This API is consumed using the PUT method.
  • To consume this API, you must replace {{wolkvox_server}} in the URL with the name of the operation server.
  • You must use the header wolkvox-token: {{token}} to use the authorization token.
  • Please note that the same token cannot be used simultaneously. Therefore, it is recommended to schedule the consumption of the next API only after the previous one has been successfully executed.
  • The possible values for “filter_Active” are “yes” or “no”.
  • The possible values for “connector” are “and” or “or”.
  • The possible values for “field” within “filters” are “customer_name”, “customer_last_name”, “id_type”, “customer_id”, “age”, “gender”, “country”, “state”, “city”, “zone”, “address”, “opt1”, “opt2”, “opt3”, “opt4”, “opt5”, “opt6”, “opt7”, “opt8”, “opt9”, “opt10”, “opt11”, “opt12”, “tel1”, “tel2”, “tel3”, “tel4”, “tel5”, “tel6”, “tel7”, “tel8”, “tel9”, “tel10”, “tel_extra”, “email”, and “result”.
  • The possible values for “operator” within “filters” are “<“, “>”, “>=”, “<=”, “!=”, “=”, “is”, and “like”.
  • Consumption limit for downloaded records: 60,000 records.
  • Upload limit per consumption: 10,000 records.
  • Date query limit: 31 days.
  • Result size limit: 256 MB.
  • API consumption time limit: 60 seconds.
  • Concurrent token consumption limit: 2 simultaneous requests.
  • Daily token limit: Number of licenses multiplied by 1,000 tokens per day.

Request

NAMEDESCRIPTIONTYPE
type_campaignCampaign type. This field can accept the values “preview” or “predictive”.String
campaign_idCampaign IDString
filter_activeIndicates whether the filter is active or inactive.String
connectorDefines the logical connector to combine multiple filters. If not specified, the default value is AND.String
filtersList of filters, where each filter contains: “field” (the field to filter on), “operator” (the logical operator for the filter), and “value” (the value to filter by).String

Response

NAMEDESCRIPTIONTYPE
codeResponse codeint
errorErrorString
msgResponse descriptionString
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_filter&type_campaign={{type_campaign}}&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 => 'PUT',
  CURLOPT_POSTFIELDS =>'{
    "filter_active": "",
    "connector": "",
    "filters": [
        {
            "field": [
                ""
            ],
            "operator": [
                ""
            ],
            "value": ""
        },
        {
            "field": [
                ""
            ],
            "operator": [
                ""
            ],
            "value": ""
        }
    ]
}',
  CURLOPT_HTTPHEADER => array(
    'wolkvox-token: {{wolkvox-token}}',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

				
			

RESPONSE

				
					{
  "code": ,
  "error": ,
  "msg": "Campaign filter successfully updated",
  "data": {
    "total_records": "",
    "pending_records": "",
    "applied_filter": ""
  }
}
				
			
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