ActiveCampaign Forum

Scoring (engagement value)?


#1

We’d like to get the current contact score (ideally via a webhook but that doesn’t appear possible currently). The v3 docs say to use:

curl --request GET \
  --url https:///:account.api-us1.com/api/3/scores/id

To get the “lead” score (I’m assuming “lead” is the contact score) but a contact id, deal id, and score id result in:

{"message":"No Result found for Score with id 1234"}

Pulling a contact shows this endpoint:

https:///:account.api-us1.com/api/3/contacts/1234/scoreValues

Which returns:

{
    "scoreValues": [
        {
            "cdate": "2017-06-18T15:47:01-05:00",
            "contact": "1234",
            "deal": null,
            "id": "777",
            "links": {
                "contact": "https://:account.api-us1.com/api/3/scoreValues/777/contact",
                "deal": "https://:account.api-us1.com/api/3/scoreValues/777/deal",
                "score": "https://:account.api-us1.com/api/3/scoreValues/777/score"
            },
            "mdate": "2019-01-18T08:35:25-06:00",
            "score": "1",
            "scoreValue": "100"
        }
    ]
}

The scoreValue element appears to be the current contact score. I have no idea what score element is.

Am I making this harder then it needs to be? What is the simplest way to get a contacts engagement score? Also does a deal score still exist?


#2

So in case someone else bumps against this the scores for a contact can be retrieved via:

https:///:account.api-us1.com/api/3/contacts/<contactId>/scoreValues

The score value is the id for the score itself which can give you an idea of the type of score it is. The scoreValue is the actual value for that particular score type (for example “Engagement”).

The docs list the ability to “… add, view, update, and delete scores.” but only lists two GET endpoints so I think the documentation hasn’t caught up to development.