GetAudience

Initial Build

2014.01

xWEB

Web Method

Response Type

XML Results

The GetAudience web method returns a list of records based on an Audience. Working with GetAudience is similar to GetDynamicQuery, since an Audience is a set of two or more queries. The way you pass ask-at-runtime parameters to GetAudience is the same as for GetDynamicQuery.

To get the list of ask-at-runtime parameters, and to get the structure of the result set, call GetAudienceDefinition (which is similar to GetDynamicQueryDefinition). To get a list of all audiences, call GetAudienceList.

Parameters

The request contains the following parameters:

Name Type Occurs Description
qrh_key key 1..1

Query header key. A unique key that represents the audience. A key can be obtained by using the GetAudienceList web method.

WithDescriptions boolean 0..1 Leave this parameter blank to return column names (the default behavior). Set this parameter to the value 1, to return column descriptions instead of names.
Parameters collection 0..1

A collection of one or more ask-at-runtime parameters. See GetDynamicQuery for more information.

currentPage key 0..1

Indicates the page to return. For the first page, use 0. See GetDynamicQuery for more information.

Response

The request returns the audience information for the specified query key. The results returned depend on the structure of the query.

Sample Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">

<soapenv:Header>

<ns:AuthorizationToken>

<!--Optional:-->

<ns:Token>?</ns:Token>

</ns:AuthorizationToken>

</soapenv:Header>

<soapenv:Body>

<ns:GetAudience>

<!--Optional:-->

<ns:qrh_key>?</ns:qrh_key>

<!--Optional:-->

<ns:WithDescriptions>?</ns:WithDescriptions>

<!--Optional:-->

<ns:Parameters>

<!--Zero or more repetitions:-->

<ns:Parameter>

<!--Optional:-->

<ns:Name>?</ns:Name>

<!--Optional:-->

<ns:Value>?</ns:Value>

</ns:Parameter>

</ns:Parameters>

<ns:currentPage>0</ns:currentPage>

</ns:GetAudience>

</soapenv:Body>

</soapenv:Envelope>

Sample Response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Header>

<AuthorizationToken xmlns="http://www.avectra.com/2005/">

<Token>?</Token>

</AuthorizationToken>

</soap:Header>

<soap:Body>

<GetAudienceResponse xmlns="http://www.avectra.com/2005/">

<GetAudienceResult>

<Results recordReturn="1">

<Result>

<CustomerKey>ef3e1b17-726d-430f-9668-5d7d2fdb7563</CustomerKey>

<TotalToDateAmount>4270.5000</TotalToDateAmount>

<YearToDateAmount>100.0000</YearToDateAmount>

<JoinDate>2/5/2013 12:00:00 AM</JoinDate>

<CustomerType>Individual</CustomerType>

<CustomerSortName>2185 Ravi001</CustomerSortName>

<RecurringDonor>0</RecurringDonor>

</Result>

</Results>

</GetAudienceResult>

</GetAudienceResponse>

</soap:Body>

</soap:Envelope>