Oracle® Marketing Segmentation Guide > Installing and Administering Segmentation and List Generation > SOAP Calls for Marketing >

getCounts Method


The getCounts method generates the count numbers for either a segment or a segment tree. Thus, the segmentPath element must be specified in the getCounts element when getCounts is performed on a segment. Otherwise, the treePath element must be specified in the getCounts element when getCounts is performed on a segment tree. Anything else results in an error.

API Definition

<xsd:element name="getCounts">
   <xsd:complexType>
      <xsd:sequence>
         <xsd:element name="segmentPath" type="xsd:string" minOccurs="0" maxOccurs="1" />
         <xsd:element name="treePath" type="xsd:string" minOccurs="0" maxOccurs="1" />
         <xsd:element name="segmentationOptions" type="sawsoap:SegmentationOptions" minOccurs="0" maxOccurs="1" />
         <xsd:element name="sessionID" type="xsd:string" minOccurs="0" maxOccurs="1" />
      </xsd:sequence>
   </xsd:complexType>
</xsd:element>

<xsd:complexType name="SegmentationOptions">
   <xsd:sequence>
      <xsd:element name="removeCacheHits" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1" />
      <xsd:element name="countOverride" type="sawsoap:OverrideType" default="Default" minOccurs="0" maxOccurs="1" />
      <xsd:element name="cacheOverride" type="sawsoap:OverrideType" default="Default" minOccurs="0" maxOccurs="1" />
      <xsd:element name="samplingFactor" type="xsd:decimal" default="100" minOccurs="0" maxOccurs="1" />
      <xsd:element name="prompts" type="xsd:namevaluepair" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element name="govRules" type="xsd:namevaluepair" minOccurs="0" maxOccurs="unbounded" />
   </xsd:sequence>
</xsd:complexType>

Valid Usage Scenarios

Calculates the count numbers for the segment.

<getCounts>
   <segmentPath>[path to the segment]</segmentPath>
   <segmentationOptions>
      <countOverride>All</countOverride>
      <prompts>
            <name>[P0_name]</name>
            <value>[P0_value]</value>
      </prompts>
      <prompts>
            <name>[P1_name]</name>
            <value>[P1_value]</value>
      </prompts>
...
      <prompts>
            <name>[PN_name]</name>
            <value>[PN_value]</value>
      </prompts>
      <govRules>
            <name>[GR0_name]</name>
            <value>[GR0_value]</value>
      </govRules>
      <govRules>
            <name>[GR1_name]</name>
            <value>[GR1_value]</value>
      </govRules>
...
      <govRules>
            <name>[GRN_name]</name>
            <value>[GRN_value]</value>
      </govRules>
   </segmentationOptions>
</getCounts>

Calculates the count numbers for the segment tree.

<getCounts>
   <treePath>[path to the segment tree]</treePath>
   <segmentationOptions>
      <countOverride>All</countOverride>
      <prompts>
<name>[P0_name]</name>
<value>[P0_value]</value>
      </prompts>
      <prompts>
<name>[P1_name]</name>
<value>[P1_value]</value>
      </prompts>
...
      <prompts>
<name>[PN_name]</name>
<value>[PN_value]</value>
      </prompts>
      <govRules>
<name>[GR0_name]</name>
<value>[GR0_value]</value>
      </govRules>
      <govRules>
<name>[GR1_name]</name>
<value>[GR1_value]</value>
      </govRules>
...
      <govRules>
<name>[GRN_name]</name>
<value>[GRN_value]</value>
      </govRules>
   </segmentationOptions>
</getCounts>

Usage Options

Segmentation options are used by getCounts to override the default options specified for the segment or segment tree in Marketing BI. The usage options for the GetCounts operation are count override, remove cache hits, sampling factor, prompts and govRules. These options are specified within the segmentationOptions element.

countOverride

Possible values are:

  • All
  • Default (default value)
  • None

The countOverride value must be set to "All" to execute getCounts SOAP method. "All" specifies that count numbers are calculated for all criteria blocks. Otherwise executing getCounts results in an error.

removeCacheHits

Possible values are:

  • false (default value)
  • true

Usually cache entries are refreshed with the latest information when cache entries are expired or does not exist. But set removeCacheHits to true for getCounts to ensure that you query against the most current data. This is achieved by removing all existing cache entries that contain count information for the target segment or segment tree and repopulating the cache with new count number entries calculated by getCounts.

samplingFactor

Possible values are:

  • 100 (default value)
  • 0 to 100

The getCounts calculates the count number of criteria blocks against a subset of the data determined by the samplingFactor value. The default value of 100 determines that the count number is calculated against the entire data set. Set the samplingFactor to indicate the size of the data set for calculating counts.

Prompts

Possible values are 0 to unbounded.

Prompts do not have any namevaluepair element by default when not specified in segmentationOptions or when segmentationOptions is not specified.

Values sent through prompts for corresponding prompted columns in segment/trees are used to filter data when generating counts. If columns in segment are prompted and corresponding values are not sent, no filter criteria are applied.

govRules

Possible values are 0 to unbounded.

govRules do not have any namevaluepair element by default when not specified in segmentationOptions or when segmentationOptions is not specified.

Values sent through govRules namvaluepairs enforce corresponding contact planning rules for the segment. For more information on contact planning rules, see Manage Marketing Contact Planning Rules.

Oracle® Marketing Segmentation Guide Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices.