Overview

Skill Level: Intermediate

Step-by-step

  1. Syntax of the request and response XML for 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 Acoustic Campaign 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 *