Milesoft Contacts SDK (contacts-sdk)
1. Overview
The Contacts SDK (contacts-sdk) provides a strongly-typed programmatic client for managing contact entities ("nodes"), relationship links ("edges"), template questionnaires, customer submissions, user tasks, and secure shortened redirect URLs. It exposes a programmatic interface to interact with the directory graph of the Milesoft ecosystem.
2. Initialization
2.1 Dependency Installation
The contacts-sdk package is hosted in our secure Google Cloud Artifact Registry repository.
To consume contacts-sdk in your Spring Boot application, apply the Google Cloud Artifact Registry plugin and declare our secure repository in your build.gradle:
plugins {
id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.5"
}
repositories {
mavenCentral()
maven { url "artifactregistry://us-west2-maven.pkg.dev/milesoft-repo/repo-maven" }
}
dependencies {
// Declaring the standard contacts-sdk library dependency
implementation "io.milesoft:contacts-sdk:2.0.2"
}
2.2 Central Spring Boot Configuration
The SDK components require an active PlatformClient and PlatformTokenProvider to manage authentication handshakes.
import io.milesoft.clients.PlatformClient;
import io.milesoft.clients.strategy.PlatformTokenProvider;
import io.milesoft.contacts.client.v2.AnswerClient;
import io.milesoft.contacts.client.v2.EdgeClient;
import io.milesoft.contacts.client.v2.FormClient;
import io.milesoft.contacts.client.v2.MySubmissionClient;
import io.milesoft.contacts.client.v2.MyTaskClient;
import io.milesoft.contacts.client.v2.NodeClient;
import io.milesoft.contacts.client.v2.PublicClient;
import io.milesoft.contacts.client.v2.QuestionClient;
import io.milesoft.contacts.client.v2.QuestionnaireClient;
import io.milesoft.contacts.client.v2.SubmissionClient;
import io.milesoft.contacts.client.v2.TaskClient;
import io.milesoft.contacts.client.v2.UrlClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class ContactsSdkConfig {
private final FormClient formClient;
private final PublicClient publicClient;
private final QuestionnaireClient questionnaireClient;
private final QuestionClient questionClient;
private final AnswerClient answerClient;
private final SubmissionClient submissionClient;
private final MySubmissionClient mySubmissionClient;
private final TaskClient taskClient;
private final MyTaskClient myTaskClient;
private final NodeClient nodeClient;
private final EdgeClient edgeClient;
private final UrlClient urlClient;
@Autowired
public ContactsSdkConfig(PlatformClient platformClient,
@Value("${milesoft.contacts.baseUrl}") String baseUrl) {
PlatformTokenProvider tokenProvider = new PlatformTokenProvider(platformClient);
this.formClient = new FormClient(baseUrl, tokenProvider);
this.publicClient = new PublicClient(baseUrl, tokenProvider);
this.questionnaireClient = new QuestionnaireClient(baseUrl, tokenProvider);
this.questionClient = new QuestionClient(baseUrl, tokenProvider);
this.answerClient = new AnswerClient(baseUrl, tokenProvider);
this.submissionClient = new SubmissionClient(baseUrl, tokenProvider);
this.mySubmissionClient = new MySubmissionClient(baseUrl, tokenProvider);
this.taskClient = new TaskClient(baseUrl, tokenProvider);
this.myTaskClient = new MyTaskClient(baseUrl, tokenProvider);
this.nodeClient = new NodeClient(baseUrl, tokenProvider);
this.edgeClient = new EdgeClient(baseUrl, tokenProvider);
this.urlClient = new UrlClient(baseUrl, tokenProvider);
}
@Bean
public FormClient formClient() { return formClient; }
@Bean
public PublicClient publicClient() { return publicClient; }
@Bean
public QuestionnaireClient questionnaireClient() { return questionnaireClient; }
@Bean
public QuestionClient questionClient() { return questionClient; }
@Bean
public AnswerClient answerClient() { return answerClient; }
@Bean
public SubmissionClient submissionClient() { return submissionClient; }
@Bean
public MySubmissionClient mySubmissionClient() { return mySubmissionClient; }
@Bean
public TaskClient taskClient() { return taskClient; }
@Bean
public MyTaskClient myTaskClient() { return myTaskClient; }
@Bean
public NodeClient nodeClient() { return nodeClient; }
@Bean
public EdgeClient edgeClient() { return edgeClient; }
@Bean
public UrlClient urlClient() { return urlClient; }
}
3. Core SDK Clients & Method Specifications
Programmatic execution is split across logical clients designed to completely abstract raw REST endpoints.
3.1 NodeClient
Manages directory contact graph entities ("nodes").
Nodes list(String cursor, Integer limit, Actor actor): Paged lookup of directory contacts.List<Node> loadBulk(Ids payload, Actor actor): Efficient batch loader of contacts via ID whitelist.Node create(SaveNode payload, Actor actor): Spawns a new contact node.Node update(String nodeId, SaveNode payload, Actor actor): Modifies fields, addresses, or metadata of an existing contact.void delete(String nodeId, Actor actor): Removes a contact record from the active directory.
3.2 EdgeClient
Maintains relational links and hierarchies between contact nodes ("edges").
Edges list(String cursor, Integer limit, Actor actor): Paged lookup of relationship link edges.List<Edge> loadBulk(Ids payload, Actor actor): Batch resolves edges by ID arrays.Edge create(SaveEdge payload, Actor actor): Spawns a relationship edge link.Edge update(String edgeId, SaveEdge payload, Actor actor): Modifies relationship metadata.void delete(String edgeId, Actor actor): Deletes an edge link.
3.3 QuestionnaireClient
Handles template registration for customized structured documents.
Questionnaires list(String cursor, Integer limit, Actor actor): Lists questionnaire templates.List<Questionnaire> loadBulk(Ids payload, Actor actor): Batch loads templates by ID lists.Questionnaire create(SaveQuestionnaire payload, Actor actor): Registers a template.Questionnaire update(String id, SaveQuestionnaire payload, Actor actor): Modifies template metadata.Questionnaire clone(String id, Actor actor): Clones a template alongside nested questions and answers.void delete(String id, Actor actor): Purges a template config.
3.4 QuestionClient
Appends individual question inputs onto a target template.
Questions list(String cursor, Integer limit, Actor actor): Lists system-wide questions.List<Question> findByQuestionnaire(String questionnaireId, Actor actor): Filters questions linked to a parent template.Question create(SaveQuestion payload, Actor actor): Appends an input step.Question update(String id, SaveQuestion payload, Actor actor): Modifies questions.Question clone(String id, Actor actor): Clones an individual question.void delete(String id, Actor actor): Purges a question template.
3.5 AnswerClient
Configures predefined choices linked to a template question.
Answers list(String cursor, Integer limit, Actor actor): Lists active answers.List<Answer> findByQuestionnaire(String questionnaireId, Actor actor): Finds preset choices linked to templates.Answer create(SaveAnswer payload, Actor actor): Appends a choice selection.Answer update(String id, SaveAnswer payload, Actor actor): Updates preset choice values.void delete(String id, Actor actor): Deletes preset answer choices.
3.6 SubmissionClient
Manages system-level administration of completed questionnaires.
Submissions list(String cursor, Integer limit, Actor actor): Lists directory submissions.List<Submission> loadBulk(Ids payload, Actor actor): Batch loads submissions.Submission create(SaveSubmission payload, Actor actor): Submits a completed response under administrator credentials.void delete(String id, Actor actor): Deletes submission profile records.
3.7 MySubmissionClient
Enables logged-in users to manage their own questionnaire responses.
Submissions listMy(String cursor, Integer limit, Actor actor): Lists caller's completed submissions.List<Submission> loadBulkMy(Ids payload, Actor actor): Batch resolves caller's records.Submission createMy(SaveMySubmission payload, Actor actor): Submits completed answers, automatically injecting caller ID contexts.void deleteMy(String id, Actor actor): Purges caller-owned submissions.
3.8 TaskClient
Registers operational todo allocations acting across profiles and contact contexts.
Tasks list(String cursor, Integer limit, Actor actor): Lists active follow-up tasks.List<Task> loadBulk(Ids payload, Actor actor): Batch loads system tasks.Task create(SaveTask payload, Actor actor): Registers task. Supports Liquid dynamic context parameters insidedatamaps.Task update(String id, SaveTask payload, Actor actor): Modifies task parameters.void delete(String id, Actor actor): Deletes follow-up tasks.
3.9 MyTaskClient
Configures assigned tasks belonging to the active caller profile.
MyTasks listMy(String cursor, Integer limit, Actor actor): Lists assigned tasks.List<MyTask> loadBulkMy(Ids payload, Actor actor): Batch resolves assigned items.MyTask createMy(SaveMyTask payload, Actor actor): Creates personal tasks.MyTask updateMy(String id, SaveMyTask payload, Actor actor): Updates personal tasks.void deleteMy(String id, Actor actor): Removes personal tasks.
3.10 UrlClient
Generates cryptographically random shortened links for platform engagement redirecting.
Urls list(String cursor, Integer limit, Actor actor): Lists active secured redirects.List<Url> loadBulk(Ids payload, Actor actor): Batch resolves redirects.Url create(SaveUrl payload, Actor actor): Spawns secure temporary URL structures.Url update(String id, SaveUrl payload, Actor actor): Modifies redirect configurations.void delete(String id, Actor actor): Revokes temporary redirect keys.
3.11 FormClient & PublicClient
Unsecured gateways supporting public-facing web widgets and registration inputs. These methods do not require authorization actor context.
void submitWebForm(SaveNode payload): Registers contact registration data from standard web intake widgets.PublicQuestionnaires listPublic(String cursor, Integer limit): Lists intake templates registered for public access.PublicQuestionnaire loadPublic(Ids payload): Loads public template details.Submission submitPublic(SaveContactSubmission payload): Submits answers provided by external contacts.
4. Built-In SDK Capabilities
- Polymorphic Model Validators: Models like
LabeledAddressincorporate custom structural constraints, ensuring physical location attributes conform to postal conventions before requests execute over HTTPS. - Context Template Merging: Task clients support dynamic
MergeDatapayload structures. If a task description incorporates Shopify Liquid syntax (e.g.{{ contact.first_name }}), the core engine compiles and populates attributes automatically during resolution.
5. Code Examples
5.1 Programmatic Contact Registration & Graph Linking
import io.milesoft.contacts.client.v2.NodeClient;
import io.milesoft.contacts.client.v2.EdgeClient;
import io.milesoft.contacts.client.v2.dto.SaveNode;
import io.milesoft.contacts.client.v2.dto.Node;
import io.milesoft.contacts.client.v2.dto.SaveEdge;
import io.milesoft.contacts.client.v2.dto.Edge;
import io.milesoft.contacts.client.v2.dto.LabeledString;
import io.milesoft.primitives.actor.Actor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class DirectoryGraphService {
private final NodeClient nodeClient;
private final EdgeClient edgeClient;
@Autowired
public DirectoryGraphService(NodeClient nodeClient, EdgeClient edgeClient) {
this.nodeClient = nodeClient;
this.edgeClient = edgeClient;
}
public void registerFamilyRelationship(Actor actor, String p1First, String p1Last, String p1Email,
String p2First, String p2Last, String p2Email) {
// 1. Create Parent Node
SaveNode parentPayload = new SaveNode();
parentPayload.setFirstName(p1First);
parentPayload.setLastName(p1Last);
LabeledString parentEmail = new LabeledString();
parentEmail.setLabel("Primary");
parentEmail.setValue(p1Email);
parentPayload.setEmails(List.of(parentEmail));
Node parentNode = nodeClient.create(parentPayload, actor);
// 2. Create Child Node
SaveNode childPayload = new SaveNode();
childPayload.setFirstName(p2First);
childPayload.setLastName(p2Last);
LabeledString childEmail = new LabeledString();
childEmail.setLabel("Primary");
childEmail.setValue(p2Email);
childPayload.setEmails(List.of(childEmail));
Node childNode = nodeClient.create(childPayload, actor);
// 3. Create Edge Link between Nodes
SaveEdge relation = new SaveEdge();
relation.setSourceNodeId(parentNode.getId());
relation.setTargetNodeId(childNode.getId());
relation.setCategory("Family");
relation.setLabel("Child");
Edge edge = edgeClient.create(relation, actor);
System.out.println("Relational Edge created in directory: " + edge.getId());
}
}
6. SDK Data Transfer Objects (DTOs)
Answer
Defines preset choices or static reply answers.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier. |
questionnaireId |
String |
Required. Linked questionnaire ID. |
questionId |
String |
Required. Linked question ID. |
reply |
String |
Required. Preset answer value or label choice. |
order |
Integer |
Required. Sort position index. Must be >= 0. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Last modification timestamp. |
Answers
Paged collection of predefined choices or static reply answers.
| Field | Type | Description / Constraints |
|---|---|---|
answers |
List<Answer> |
Required. List of answer options. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
Edge
Represents a relationship link between two contact nodes.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier of the edge. |
sourceNodeId |
String |
Required. Unique identifier of the origin node. |
targetNodeId |
String |
Required. Unique identifier of the destination node. |
category |
String |
Required. General category of the relationship (e.g. Family, Employment). |
label |
String |
Required. Exact label representing the relationship (e.g. Spouse, Manager). |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Last modification timestamp. |
Edges
Paged collection of relationship link edges.
| Field | Type | Description / Constraints |
|---|---|---|
edges |
List<Edge> |
Required. List of relationship link edges. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
Ids
Batch loads resources lookup helper.
| Field | Type | Description / Constraints |
|---|---|---|
ids |
List<String> |
Required. List of unique identifiers. |
LabeledAddress
Postal address container. Requires at least one address property field to be non-blank in addition to the label.
| Field | Type | Description / Constraints |
|---|---|---|
label |
String |
Required. Label name. |
line1 |
String |
Primary address line. |
line2 |
String |
Suite, unit, or floor number. |
locality |
String |
City name. |
region |
String |
State or provincial territory. |
postalCode |
String |
Zip or postal code. |
country |
String |
Country name. |
LabeledDate
Calendar dates.
| Field | Type | Description / Constraints |
|---|---|---|
label |
String |
Required. Date milestone tag (e.g. "Birthday"). |
value |
LocalDate |
Required. Calendar date. |
LabeledString
Generic container for labeled text strings.
| Field | Type | Description / Constraints |
|---|---|---|
label |
String |
Required. Display tag (e.g. "Mobile", "Work"). |
value |
String |
Required. Actual string value. |
MergeData
Template parameters passed to Liquid for context generation.
| Field | Type | Description / Constraints |
|---|---|---|
userId |
String |
User ID context. |
contactId |
String |
Contact ID context. |
userQualifiers |
List<Qualifier> |
List of user qualifier key-pairs. |
contactQualifiers |
List<Qualifier> |
List of contact qualifier key-pairs. |
models |
List<Model> |
Embedded dataset models. |
Model
Structured data model definition passed to templating engines.
| Field | Type | Description / Constraints |
|---|---|---|
key |
String |
Required. Unique model mapping key. |
data |
Map<String, Object> |
Required. Custom property dataset. |
MyTask
Task view specifically assigned to the current user context.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier. |
onBehalfOfUserId |
String |
Linked user reference. |
onBehalfOfContactId |
String |
Linked contact reference. |
title |
String |
Required. Task title. |
description |
String |
Extended instructions. |
dueOn |
LocalDate |
Calendar due date. |
dueAt |
ZonedDateTime |
Precise due timestamp. |
completed |
ZonedDateTime |
Completion timestamp. |
type |
String |
Required. Classification. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Modification timestamp. |
MyTasks
Paged collection of assigned tasks belonging to the active caller profile context.
| Field | Type | Description / Constraints |
|---|---|---|
tasks |
List<MyTask> |
Required. List of tasks assigned to the current caller. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
Node
Represents a contact entity in the directory graph.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier for the contact node. |
imageUrl |
String |
Profile picture or image URL associated with the contact. |
firstName |
String |
First name of the contact. |
lastName |
String |
Last name of the contact. |
phones |
List<LabeledString> |
List of labeled phone numbers (e.g. Mobile, Work). |
emails |
List<LabeledString> |
List of labeled email addresses (e.g. Personal, Work). |
urls |
List<LabeledString> |
List of website links. |
addresses |
List<LabeledAddress> |
Structured postal addresses. |
dates |
List<LabeledDate> |
Significant dates (e.g. Birthday, Anniversary). |
others |
List<LabeledString> |
Customized fields and unstructured key-value attributes. |
tags |
Set<String> |
Labels or tags assigned to the contact. |
metadata |
Map<String, Object> |
Custom operational metadata payload. |
created |
ZonedDateTime |
Required. Timestamp when the contact record was created. |
updated |
ZonedDateTime |
Required. Timestamp when the contact record was last modified. |
Nodes
Paged collection of directory contacts.
| Field | Type | Description / Constraints |
|---|---|---|
nodes |
List<Node> |
Required. List of contact nodes in the directory graph. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
PublicAnswer
Predefined answer choice for public forms.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Preset choice ID. |
reply |
String |
Required. Choice value text description. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Modification timestamp. |
PublicQuestion
Public questions containing preset choices.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Question ID. |
ask |
String |
Required. Question text prompt. |
type |
AnswerType |
Required. Response type. |
answers |
List<PublicAnswer> |
Predefined optional choices. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Modification timestamp. |
PublicQuestionnaire
Public questionnaire intake view.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Questionnaire template ID. |
title |
String |
Required. Heading of the form. |
description |
String |
Introduction summary. |
questions |
List<PublicQuestion> |
Required. Public questions sequence. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Modification timestamp. |
PublicQuestionnaires
Paged collection of questionnaires registered for public access.
| Field | Type | Description / Constraints |
|---|---|---|
questionnaires |
List<PublicQuestionnaire> |
Required. List of public questionnaire templates. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
Qualifier
Qualifier key-pair context.
| Field | Type | Description / Constraints |
|---|---|---|
key |
String |
Required. Qualifier tag key. |
id |
String |
Required. Unique target identifier. |
Question
An individual question within a questionnaire template.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier. |
questionnaireId |
String |
Required. Linked questionnaire ID. |
ask |
String |
Required. Question text prompt. |
type |
AnswerType |
Required. Response type (String, Multiline, Integer, Double, Boolean, Date, DateTime, Strings, Signature). |
order |
Integer |
Required. Nested sort index. Must be >= 0. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Last modification timestamp. |
QuestionCloned
Details of a cloned question template including its nested answers.
| Field | Type | Description / Constraints |
|---|---|---|
question |
Question |
Required. Cloned question metadata and configuration. |
answers |
List<Answer> |
Required. List of cloned preset answers associated with the question. |
Questionnaire
Template definition containing custom question sequences.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier. |
title |
String |
Required. Questionnaire title. |
description |
String |
Extended description of purpose or instructions. |
status |
QuestionnaireStatus |
Required. Template state (Draft, Active). |
order |
Integer |
Required. Precedence. Minimum constraint: 0. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Last modification timestamp. |
QuestionnaireCloned
Details of a cloned questionnaire template including nested questions and answers.
| Field | Type | Description / Constraints |
|---|---|---|
questionnaire |
Questionnaire |
Required. Cloned questionnaire metadata and configuration. |
questions |
List<Question> |
Required. List of cloned question definitions associated with the template. |
answers |
List<Answer> |
Required. List of cloned answer options associated with the questions. |
Questionnaires
Paged collection of template questionnaires.
| Field | Type | Description / Constraints |
|---|---|---|
questionnaires |
List<Questionnaire> |
Required. List of questionnaire templates. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
Questions
Paged collection of questionnaire questions.
| Field | Type | Description / Constraints |
|---|---|---|
questions |
List<Question> |
Required. List of questions in the system. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
SaveAnswer
Payload to create or edit preset choices.
| Field | Type | Description / Constraints |
|---|---|---|
questionnaireId |
String |
Required. Parent questionnaire ID. |
questionId |
String |
Required. Target question ID. |
reply |
String |
Required. Fixed choice value. |
order |
Integer |
Required. Sorted position index. Must be >= 0. |
metadata |
Map<String, Object> |
Custom metadata map. |
SaveContactSubmission
Public-facing payload used when a contact submits their questionnaire responses.
| Field | Type | Description / Constraints |
|---|---|---|
questionnaireId |
String |
Required. Questionnaire template ID. |
contactId |
String |
Required. Contact node ID. |
questions |
List<SubmissionQuestion> |
Contact replies. |
metadata |
Map<String, Object> |
Custom metadata map. |
SaveEdge
The request payload used to create or update a relationship edge.
| Field | Type | Description / Constraints |
|---|---|---|
sourceNodeId |
String |
Required. Origin node ID. |
targetNodeId |
String |
Required. Destination node ID. |
category |
String |
Required. General group. |
label |
String |
Required. Relationship description label. |
metadata |
Map<String, Object> |
Custom metadata map. |
SaveMySubmission
User self-service payload used to submit responses. The backend automatically injects the active security profile ID as the userId.
| Field | Type | Description / Constraints |
|---|---|---|
questionnaireId |
String |
Required. Questionnaire template ID. |
questions |
List<SubmissionQuestion> |
User answers. |
metadata |
Map<String, Object> |
Custom metadata map. |
SaveMyTask
Payload used to create personal tasks.
| Field | Type | Description / Constraints |
|---|---|---|
onBehalfOfUserId |
String |
Target user reference. |
onBehalfOfContactId |
String |
Target contact reference. |
title |
String |
Required. Task title. |
description |
String |
Task description details. |
dueOn |
LocalDate |
Calendar due date. |
dueAt |
ZonedDateTime |
Precise due timestamp. |
completed |
ZonedDateTime |
Task completion timestamp. |
type |
String |
Required. Personal task classification. |
metadata |
Map<String, Object> |
Custom metadata map. |
data |
MergeData |
Dynamic liquid merge payload. |
SaveNode
The request payload used to create or modify a contact node.
| Field | Type | Description / Constraints |
|---|---|---|
imageUrl |
String |
Contact profile image URL. |
firstName |
String |
Contact first name. |
lastName |
String |
Contact last name. |
phones |
List<LabeledString> |
Phone number collection. |
emails |
List<LabeledString> |
Email address collection. |
urls |
List<LabeledString> |
Website link collection. |
addresses |
List<LabeledAddress> |
Physical addresses. |
dates |
List<LabeledDate> |
Key dates. |
others |
List<LabeledString> |
Customized additional fields. |
tags |
Set<String> |
Contact categorization tags. |
metadata |
Map<String, Object> |
Custom metadata mapping. |
SaveQuestion
Payload used to append or edit a question template.
| Field | Type | Description / Constraints |
|---|---|---|
questionnaireId |
String |
Required. Linked questionnaire ID. |
ask |
String |
Required. Question text. |
type |
AnswerType |
Required. Choice format selector. |
order |
Integer |
Required. Sorting position. Must be >= 0. |
metadata |
Map<String, Object> |
Custom metadata map. |
SaveQuestionnaire
Payload used to create or modify a questionnaire template.
| Field | Type | Description / Constraints |
|---|---|---|
title |
String |
Required. Questionnaire title. |
description |
String |
Description or instructions. |
status |
QuestionnaireStatus |
Required. Current operational state. |
order |
Integer |
Required. Sorting order integer. Must be >= 0. |
metadata |
Map<String, Object> |
Custom metadata map. |
SaveSubmission
System-level payload used to submit a completed response document.
| Field | Type | Description / Constraints |
|---|---|---|
questionnaireId |
String |
Required. Questionnaire template ID. |
contactId |
String |
Contact reference. Must supply either contactId or userId. |
userId |
String |
User profile reference. Must supply either contactId or userId. |
questions |
List<SubmissionQuestion> |
User answers. |
metadata |
Map<String, Object> |
Custom metadata map. |
SaveTask
Payload used to schedule or edit a task, supporting Liquid template parameters.
| Field | Type | Description / Constraints |
|---|---|---|
userId |
String |
Assigned user ID. |
onBehalfOfUserId |
String |
Target user ID. |
onBehalfOfContactId |
String |
Target contact ID. |
title |
String |
Required. Task title. |
description |
String |
Task description. |
dueOn |
LocalDate |
Calendar date. |
dueAt |
ZonedDateTime |
Precise due timestamp. |
completed |
ZonedDateTime |
Task completion timestamp. |
type |
String |
Required. Task classification code. |
metadata |
Map<String, Object> |
Custom metadata map. |
data |
MergeData |
Dynamic liquid payload to populate values in templates. |
SaveUrl
Payload to generate secure, shortened temporary URLs.
| Field | Type | Description / Constraints |
|---|---|---|
userId |
String |
Associated user ID. |
contactId |
String |
Associated contact ID. |
url |
String |
Required. Complete redirect destination. |
metadata |
Map<String, Object> |
Metadata map. |
expires |
ZonedDateTime |
Required. URL expiration date-time. |
Submission
Completed questionnaire response profile.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier. |
questionnaireId |
String |
Required. Questionnaire template ID. |
contactId |
String |
Reference contact node ID. Must supply either contactId or userId. |
userId |
String |
Reference system user ID. Must supply either contactId or userId. |
questions |
List<SubmissionQuestion> |
List of submitted question replies. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Submission creation timestamp. |
updated |
ZonedDateTime |
Required. Submission update timestamp. |
SubmissionQuestion
Data structure mapping responses inside a submission.
| Field | Type | Description / Constraints |
|---|---|---|
questionId |
String |
Required. Question ID. |
ask |
String |
Required. Prompt of the question. |
reply |
String |
Provided text response. |
Submissions
Paged collection of completed questionnaire response profiles.
| Field | Type | Description / Constraints |
|---|---|---|
submissions |
List<Submission> |
Required. List of submitted questionnaire responses. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
Task
Operational action assignment related to contacts or users.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier. |
userId |
String |
Assigned user. |
onBehalfOfUserId |
String |
Linked target user reference. |
onBehalfOfContactId |
String |
Linked target contact reference. |
title |
String |
Required. Name/heading of the task. |
description |
String |
Detailed operational instructions. |
dueOn |
LocalDate |
Complete due calendar date. |
dueAt |
ZonedDateTime |
Specific due timestamp. |
completed |
ZonedDateTime |
Task completion timestamp. |
type |
String |
Required. Task taxonomy or category identifier. |
metadata |
Map<String, Object> |
Custom metadata map. |
created |
ZonedDateTime |
Required. Creation timestamp. |
updated |
ZonedDateTime |
Required. Last modification timestamp. |
Tasks
Paged collection of scheduled operational tasks.
| Field | Type | Description / Constraints |
|---|---|---|
tasks |
List<Task> |
Required. List of follow-up tasks. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |
Url
Shortened/secured target URLs for platform engagement.
| Field | Type | Description / Constraints |
|---|---|---|
id |
String |
Required. Unique identifier (short URL path key). |
userId |
String |
Related user context. |
contactId |
String |
Related contact context. |
url |
String |
Required. Full raw target URL redirect path. |
metadata |
Map<String, Object> |
Custom metadata. |
expires |
ZonedDateTime |
Required. Expiration time of the temporary URL. |
created |
ZonedDateTime |
Required. Record creation. |
updated |
ZonedDateTime |
Required. Record modification. |
Urls
Paged collection of secured redirect shortened URLs.
| Field | Type | Description / Constraints |
|---|---|---|
urls |
List<Url> |
Required. List of temporary secure shortened URLs. |
cursor |
String |
Pagination cursor to fetch subsequent pages. |