---
updatedAt: 2026-04-08T10:25:27.000Z
---

# Calculate current query contacts - CalculateQuery

Used to calculate the number of contacts for an Acoustic Campaign query. The CalculateQuery data job calculates a particular query only if the query size was not calculated in the last 12 hours. You can programmatically obtain the status for the data job through the [GetJobStatus](https://developer.goacoustic.com/acoustic-campaign/reference/getjobstatus) call, or you can trigger an [email notification](https://developer.goacoustic.com/acoustic-campaign/reference/calculate-query#get-email-notifcation).

## Elements (Required)

**QUERY\_ID** - The ID of the query to be calculated.

[block:code]
{
  "codes": [
    {
      "code": "<Envelope>\n  <Body>\n    <CalculateQuery>\n      <QUERY_ID>59294</QUERY_ID>\n    </CalculateQuery>\n  </Body>\n</Envelope>",
      "language": "xml",
      "name": "Example Call - XML"
    },
    {
      "code": "<Envelope>\n  <Body>\n    <RESULT>\n      <SUCCESS>TRUE</SUCCESS>\n      <JOB_ID>499600</JOB_ID>\n    </RESULT>\n  </Body>\n</Envelope>",
      "language": "xml",
      "name": "Example Response - XML"
    }
  ]
}
[/block]

## Elements (Response)

**SUCCESS** - *True* if successful; *False* if not.

**JOB\_ID** - Identifies the Acoustic Campaign background job created and scheduled for this export.

## Get email notifcation

You can trigger an email notification to be sent when the data job for the query is completed by adding the `EMAIL_NOTIFICATION` element to the API call.

**EMAIL\_NOTIFICATION** - Provide your email ID to which the notification will be sent.

Example request call with the email parameter:

[block:code]
{
  "codes": [
    {
      "code": "<Envelope>\n<Body>\n<CalculateQuery>\n<QUERY_ID>5435057</QUERY_ID>\n<EMAIL_NOTIFICATION>your email address</EMAIL_NOTIFICATION>\n</CalculateQuery>\n</Body>\n</Envelope>",
      "language": "xml"
    }
  ]
}
[/block]

An email notification will be sent to the provided email with a success or failure message when the query data job completes.