API Setup

Choose your Host Region to have the documentation adapt to your use case.


Host Region
LabelValue
EUeu
USus
AUau






Business Use Case

The PUT Close the Loop API allows you to create Close the Loop actions in CustomerGauge. This action will create or update a case.






Good to Know

  • The API creates or updates “cases”. Survey Responses do not necessarily create a case; a status change needs to have been done for a case to be created in CustomerGauge.






Authentication

OAuth2 Authentication is used to connect to this API. In order to create the Connected App, which is needed to generate the Access Token, Administrator access to CustomerGauge is needed. Once you've created your Connected App, you can acquire a Bearer Access Token by calling our OAuth2/Token API:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials&client_id={{ Client ID }}&client_secret={{ Client Secret }} "
https://auth.{{ apiRegion }}.customergauge.com/oauth2/token

The acquired Bearer Access Token is used in the Authorization header in your API request.






Endpoint

Endpoint URL

https://api.{{ apiRegion }}.customergauge.com/v7/rest/close-loop/status






Request


Parameters

ParameterDescriptionRulesExample
number_customergaugeUnique Identifier of the Survey Response related to the case.Required."number_customergauge": "995262"
statusThe status of the case, it can be open, progress or closed.
Note: Re-opening a closed case will clear the Follow Up Time and Case Closed Time that appears in the Record Page (Close the Loop).
Follow Up Time is calculated when a case goes from OPEN to PROGRESS and Case Closed Time is calculated when a case goes from PROGRESS to CLOSE based on the current time or the happened_at date if present.
Required.
A case status can be freely updated. 
"status": "open"
"status": "progress"
"status": "closed"
noteA comment can be added to the case.Optional.
The value must be a string (text).
"note": "I will get back to them."
happened_atThe date and time of the Close the Loop action.Optional.
Format: YYYY-mm-dd H:m:s
Date must be between Survey Response Date and now (current time).
"happened_at": "2022-07-25 14:10:09"
assigneeAssigns a case to an active user.
In case the assignee is not valid a note will be added to the history about the attempt to assign the case.
Optional.
Valid email address of an active user.
"assignee": "john.doe@company.com"


We suggest to use the parameter happened_at only while sending historical CLP actions to CustomerGauge. This parameter is not advised for real-time sync of close the loop activities. When performing historical updates, please ensure that the Status change is in the correct order of the actions timeline and timestamps while making the API call.



Supported Formats


JSON (raw request body)

Data can be passed to this API using the JSON format in the body of the request.


Example parameters:

{
"number_customergauge": "53499",
"status": "progress",
"happened_at": "2023-07-31 08:50:15",
"note": "Will get in touch about this",
    "assignee": "john.doe@company.com"

}



x-www-form-urlencoded (body)

Data can be passed to this API using the x-www-form-urlencoded format in the body of the request.


Example parameters:

number_customergauge: "53499"
status: "progress"
happened_at: "2023-07-31 08:50:15"
note: "Will get in touch about this"
assignee: "john.doe@company.com"
Generic






Response

HTTP Status CodeDescription
200OK - everything worked as expected.

Example Response Body
{
"data": {
"status": true,
"note": true,
"assignee": true
}
}

401The Access Token obtained has expired, or is invalid. Call the Authenticate API again to obtain a new Access Token.

Example Response Body
{
"message": "Unauthenticated."
}


422Unprocessable Entity

Example Response Body
{
"message": "The number customergauge field is required.",
"errors": {
"number_customergauge": [
"The number customergauge field is required."
]
}
}







Not the API you're looking for?

Get an overview of our APIs here.