User XML Scoring Model Interfaces

Scoring Models

The Watson Campaign Automation supports two great Program APIs that allow discovery of
Programs that are available to a specific database and also how an individual contact interacted
with a program.

Contents of this page

Get a list of scoring models

Get Scoring Models for a specific Organization.

GetScoringModels

Note: Standard permissions are applied to this API so that only those Scoring Models are returned
that the authenticated user has access to see.

Only Score Components that are defined for the Model returned are included in the
response.

Example

The Rank section of a Scoring Model was not defined (as is a possible scenario), then it would
not be listed as one of the Score Components that define that returned Scoring Model.

Operation <GetScoringModels>
Example

<Envelope>

<Envelope>
  <Body>
    <GetScoringModels>
    </GetScoringModels>
  </Body>
</Envelope>
Response <RESULT>
Elements SUCCESS TRUE if successful.
MODELS XML Node defining Scoring Models
ChildElement MODEL XML Node defining each Scoring Model
ChildElements ID ID of the Scoring Model
NAME Name of the Scoring Model
DESCRIPTION Description of the Scoring Model as described by the user in the UI
CREATED Created Date of the Scoring Model
LAST_MODIFIED Last Modified Date of the Scoring Model
SCORE_COMPONENT_TYPE

The components (or sections) that define the Scoring Model.

ChildElements SCORE_COMPONENT_TYPE XML Node defining each defined component in the model
ChildElements KEY The name of the component
DESCRIPTION The definition of the score component. (Watson Campaign Automation's
definition, not something the user specifies).
VALUES XML Node defining the possible values that the specified component
might return.
ChildElements VALUE A defined value that can be returned from the score component.
Example

<Envelope>

<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>TRUE</SUCCESS>
      <MODELS>
        <MODEL>
          <ID>5435</ID>
          <NAME>LeadStatusScoringModel</NAME>
          <DESCRIPTION>This model is used to quality leads into SFDC promotions</DESCRIPTION>
          <CREATED>10/12/11 10:15 PM</CREATED>
          <LAST_MODIFIED>10/23/11 04:18 PM</LAST_MODIFIED>
          <SCORE_COMPONENT_TYPES>
            <SCORE_COMPONENT_TYPE>
              <KEY>totalScore</KEY>
              <DESCRIPTION>
              This is the overall score for the contact</ DESCRIPTION>
            </SCORE_COMPONENT_TYPE>
            <SCORE_COMPONENT_TYPE>
              <KEY>behaviorScore</KEY>
              <DESCRIPTION>
              This is the behavior score for the contact</ DESCRIPTION>
            </SCORE_COMPONENT_TYPE>
            <SCORE_COMPONENT_TYPE>
              <KEY>totalRank</KEY>
              <DESCRIPTION>
              This is the rank for the contact based on total score</
              DESCRIPTION>
              <VALUES>
                <VALUE>Hot</VALUE>
                <VALUE>Warm</VALUE>
                <VALUE>Cold</VALUE>
              </VALUES>
            </SCORE_COMPONENT_TYPE>
          </SCORE_COMPONENT_TYPES>
        </MODEL>
        <MODEL>
          <ID>5435</ID>
          <NAME>CustomerValueScoringModel</NAME>
          <DESCRIPTION>This model is used to quality leads into SFDC promotions</DESCRIPTION>
          <CREATED>10/12/11 10:15 PM</CREATED>
          <LAST_MODIFIED>
          10/23/11 04:18 PM</LAST_MODIFIED
          <SCORE_COMPONENT_TYPES>
            <SCORE_COMPONENT_TYPE>
              <KEY>totalScore</KEY>
              <DESCRIPTION>
              This is the overall score for the contact</ DESCRIPTION>
            </SCORE_COMPONENT_TYPE>
            <SCORE_COMPONENT_TYPE>
              <KEY>behaviorScore</KEY>
              <DESCRIPTION>
              This is the behavior score for the contact</ DESCRIPTION>
            </SCORE_COMPONENT_TYPE>
            <SCORE_COMPONENT_TYPE>
              <KEY>totalRank</KEY>
              <DESCRIPTION>
              This is the rank for the contact based on total score</
              DESCRIPTION>
              <VALUES>
                <VALUE>High</VALUE>
                <VALUE>Average</VALUE>
                <VALUE>Low</VALUE>
              </VALUES>
            </SCORE_COMPONENT_TYPE>
          </SCORE_COMPONENT_TYPES>
        </MODEL>
      </MODELS>
    </RESULT>
  </Body>
</Envelope>
ErrorCodes 145 User session is invalid or expired.
6001 Scoring Models are not available for this ORG.
6002 Scoring Model database is not set for this ORG.
6003 Scoring Models are not available for this user.
6004 No Scoring Models defined for this ORG.
Error Message Response Example

<Envelope>

<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>false</SUCCESS>
    </RESULT>
    <Fault>
      <Request/>
      <FaultCode/>
      <FaultString>User session is invalid or expired.</FaultString>
      <detail>
        <error>
          <errorid>145</errorid>
          <module/>
          <class>SP.API</class>
          <method/>
        </error>
      </detail>
    </Fault>
  </Body>
</Envelope>

Get a contact's scoring model scores

This interface returns the Contact's Scoring Model's values for a particular Contact.

GetContactScores

Either CONTACT_ID or VISITOR_KEY must be passed to the method to get a valid response.
If both are provided, the CONTACT_ID is used to look up the Contact. CONTACT_ID is the same as RECIPIENT_ID in meaning only and information that is used and returned for CONTACT_ID is the same information that is used and returned for RECIPIENT_ID in any other API call. Standard permissions are
applied to this API so that only those Scoring Models for a Contact is returned that the
authenticated user has access to see. If the contact is not scored and has null values in any of the
returned Score Components, then the value is returned as <value/> (see example 2).

Operation

<GetContactScores>

Elements

CONTACT_ID Optional The Contact ID of the Contact in the Watson Campaign Automation DB.
Pass this parameter to get the contact score values.
VISITOR_KEY Optional

The web tracking visitor key. Pass this parameter to get the contact score values.

MODEL_ID Optional

If specified, the method returns only the score values for the model, otherwise, the method
returns all Scoring Models for the specified user.

Example
<Envelope>
  <Body>
    <GetContactScores>
      <CONTACT_ID>3920341</CONTACT_ID>
    </GetContactScores>
  </Body>
</Envelope>
Response <RESULT>
Elements SUCCESS TRUE if successful.

MODELS

XML Node defining Scoring Models

ChildElement

MODEL

XML Node defining each Scoring Model

ChildElements ID

ID of the Scoring Model

NAME

Name of the Scoring Model

SCORE_COMPONENTS

The components (or sections) that define the scoring model.

ChildElements SCORE_COMPONENT

XML Node defining each defined Score Component in the model

ChildElements KEY

The name of the Score Component

VALUE

The value/score of the Score Component

Example
1: Contact with all values populated
<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>TRUE</SUCCESS>
      <MODELS>
        <MODEL>
          <ID>5435</ID>
          <NAME>LeadStatusScoringModel</NAME>
          <SCORE_COMPONENTS>
            <SCORE_COMPONENT>
              <KEY>totalScore</KEY>
              <VALUE>15</VALUE>
            </SCORE_COMPONENT>
            <SCORE_COMPONENT>
              <KEY>behaviorScore</KEY>
              <VALUE>45</VALUE>
            </SCORE_COMPONENT>
            <SCORE_COMPONENT>
              <KEY>totalRank</KEY>
              <VALUE>Hot</VALUE>
            </SCORE_COMPONENT>
          </SCORE_COMPONENTS>
        </MODEL>
        <MODEL>
          <ID>5435</ID>
          <NAME>CustomerValueScoringModel</NAME>
          <DESC>This model is used to quality leads into SFDC promotions</DESC>
          <SCORE_COMPONENTS>
            <SCORE_COMPONENT>
              <KEY>totalScore</KEY>
              <VALUE>5</VALUE>
            </SCORE_COMPONENT>
            <SCORE_COMPONENT>
              <KEY>behaviorScore</KEY>
              <VALUE>0</VALUE>
            </SCORE_COMPONENT>
            <SCORE_COMPONENT>
              <KEY>totalRank</KEY>
              <VALUE>Low</VALUE>
            </SCORE_COMPONENT>
          </SCORE_COMPONENTS>
        </MODEL>
      </MODELS>
    </RESULT>
  </Body>
</Envelope>
Example 2: Contact that has some null values.
<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>TRUE</SUCCESS>
      <MODELS>
        <MODEL>
          <ID>5435</ID>
          <NAME>LeadStatusScoringModel</NAME>
          <SCORE_COMPONENTS>
            <SCORE_COMPONENT>
              <KEY>totalScore</KEY>
              <VALUE/>
            </SCORE_COMPONENT>
            <SCORE_COMPONENT>
              <KEY>behaviorScore</KEY>
              <VALUE/>
            </SCORE_COMPONENT>
            <SCORE_COMPONENT>
              <KEY>totalRank</KEY>
              <VALUE/>
            </SCORE_COMPONENT>
          </SCORE_COMPONENTS>
        </MODEL>
      </MODELS>
    </RESULT>
  </Body>
</Envelope>
Error Message Response Example
<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>false</SUCCESS>
    </RESULT>
    <Fault>
      <Request/>
      <FaultCode/>
      <FaultString>Contact does not exist in the database or Contact List.</FaultString>
      <detail>
        <error>
          <errorid>133</errorid>
          <module/>
          <class>SP.API</class>
          <method/>
        </error>
      </detail>
    </Fault>
  </Body>
</Envelope>

Join The Discussion

Your email address will not be published. Required fields are marked *