Retrieve a sequence test
Retrieves the result of a test started with Start a sequence test: its status, and for every step of the tested version whether it composed a message, was skipped or failed. Poll it until status is COMPLETED or FAILED.
An email step’s message is its subject and a markdown body, and a LinkedIn step’s message is its text. A step that failed carries the reason under error; a template step whose variable could not be filled for the contact fails this way, naming the fields. Steps that have not run are PENDING, including a step a finished test never reached; a step that produced nothing is SKIPPED. A test never waits, so a wait is always SKIPPED; a send step is SKIPPED when it has nothing to send, such as a LinkedIn invite another step already sent. A test never sends anything.
Returns 404 for a test that does not exist, belongs to another sequence, or is a live enrollment: use Retrieve a sequence enrollment for those.
Required scope: sequences:read
Rate limit category: Read
Retrieve a sequence test
package main
import (
"context"
"fmt"
"github.com/Lightfld/lightfield-go"
"github.com/Lightfld/lightfield-go/option"
)
func main() {
client := githubcomlightfldlightfieldgo.NewClient(
option.WithAPIKey("My API Key"),
)
sequenceRetrieveTestResponse, err := client.Sequence.GetTest(
context.TODO(),
"testId",
githubcomlightfldlightfieldgo.SequenceGetTestParams{
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", sequenceRetrieveTestResponse.ID)
}
{
"id": "id",
"contactId": "contactId",
"status": "RUNNING",
"steps": [
{
"error": {
"code": "CONFIGURATION_ERROR",
"message": "message"
},
"message": {
"body": "body",
"subject": "subject"
},
"mode": "AGENT",
"name": "name",
"outcome": "PENDING",
"stepId": "stepId",
"type": "EMAIL"
}
],
"target": "DRAFT"
}Returns Examples
{
"id": "id",
"contactId": "contactId",
"status": "RUNNING",
"steps": [
{
"error": {
"code": "CONFIGURATION_ERROR",
"message": "message"
},
"message": {
"body": "body",
"subject": "subject"
},
"mode": "AGENT",
"name": "name",
"outcome": "PENDING",
"stepId": "stepId",
"type": "EMAIL"
}
],
"target": "DRAFT"
}