Update a contact record

put/contacts/{contactId}
Internal-Use Only

Updates the contact record by replacing it. Use this endpoint to update the presentation or the response of the treatments in the contact. Presentation and responses can be updated multiple times. For example, a subject clicking a treatment link is one type of response and subsequent engagement (for example, taking the next step in a commercial flow) is another response. Depending on how the merchant wants to track responses, it can be multiple updates or just one update of the final response. Although some members of the contact record have changed, the full contact object is required for this action. Since some members are immutable, an error occurs if you attempt to change them. Furthermore, if a member is an array, it is an error to change the number of entries in the array. These are the immutable first and second-level members of the record:

Do not alter the members that should not be changed. An alternative is to use the PATCH action, which requires only sending in members to be changed together with the response tracking code.

At the successful completion of the PUT action, the full updated record is sent in the response.

Request Samples

1

Response Samples

1{
2 "creationTimeStamp": "2018-05-13T15:02:40.719Z",
3 "modifiedTimeStamp": "2018-05-13T15:02:40.719Z",
4 "createdBy": "joeMarket",
5 "modifiedBy": "joeMarket",
6 "id": "5195ceb6-228e-439d-b3df-307197f1e7a7",
7 "subjectId": "Francis.Albert.Bacon.19195313421",
8 "subjectLevel": "household",
9 "objectUri": "/decisions/flows/5c5bc46a-cea0-4102-a88c-71cf1506e2c5",
10 "objectRevisionId": "afb62877-64cb-4ae6-bf0c-4e2783a38d3a",
11 "objectType": "decision",
12 "objectVariables": [
13 {
14 "id": "a4722451-fb6f-4c9a-8bb8-4cf1eaba73c0",
15 "name": "ov1",
16 "value": "A",
17 "dataType": "string"
18 },
19 {
20 "id": "395aebd9-1646-4d84-9c05-d8e80efe72b7",
21 "name": "ov2",
22 "value": "B",
23 "dataType": "string"
24 }
25 ],
26 "treatmentsForConsideration": [
27 {
28 "id": "f025ee1f-a60a-4bb5-8236-0c697562653e",
29 "treatmentId": "4f3f14cf-69ed-4d59-9ea2-ecfb525cfa83",
30 "treatmentRevisionId": "7aa86c12-55cf-4e99-8060-5b516314dc44",
31 "treatmentGroupId": "bc912f15-96a0-4991-ba2a-9f12491cefc0",
32 "treatmentGroupRevisionId": "9d2fccaa-428a-4604-a242-4f259ab8a553",
33 "objectNodeId": "6bf8f1b3-9910-40ad-8146-6affd4f49a1f",
34 "presented": true,
35 "presentedTimeStamp": "2018-05-13T15:02:40.719Z",
36 "subjectContactId": "5195ceb6-228e-439d-b3df-307197f1e7a7"
37 },
38 {
39 "id": "383bebdf-9378-4ed9-a2f3-127f53acfd22",
40 "treatmentId": "826c9635-809a-44cf-a982-63e374846087",
41 "treatmentRevisionId": "d14e393d-c21c-4654-8095-376909edace5",
42 "treatmentGroupId": "1ba80181-7996-4ed5-8d58-66be8d2204e3",
43 "treatmentGroupRevisionId": "f38725dc-cb53-4f09-b69c-661a7d675dac",
44 "objectNodeId": "cf328b78-81b3-465e-b86b-2eb71876a66a",
45 "presented": true,
46 "presentedTimeStamp": "2018-05-13T15:02:40.719Z",
47 "subjectContactId": "5195ceb6-228e-439d-b3df-307197f1e7a7"
48 },
49 {
50 "id": "23c1ebb8-7df8-4555-92d7-226ad88ad734",
51 "treatmentId": "2826de5a-d0d6-4bd1-8a80-08c12ba2ad81",
52 "treatmentRevisionId": "f14c3aa2-98a4-4a42-8b29-c99ad3cc02a8",
53 "treatmentGroupId": "1ba80181-7996-4ed5-8d58-66be8d2204e3",
54 "treatmentGroupRevisionId": "f38725dc-cb53-4f09-b69c-661a7d675dac",
55 "objectNodeId": "f7d361a9-d488-47f6-a579-e4cf28fb7324",
56 "presented": true,
57 "presentedTimeStamp": "2018-05-13T15:02:40.719Z",
58 "subjectContactId": "5195ceb6-228e-439d-b3df-307197f1e7a7"
59 }
60 ],
61 "ruleFired": "00010",
62 "pathTraversed": "/9e4e324b-de68-4035-b511-84cd558d5408/2541ab6e-3e7d-4ba0-8f04-7fc13a8e9794/509c4d2d-dc2c-4cb3-a094-5628e1ec879d",
63 "abTests": [
64 {
65 "id": "f025ee1f-a60a-4bb5-8236-0c697562653f",
66 "nodeId": "4f3f14cf-69ed-4d59-9ea2-ecfb525cfa86",
67 "champion": true,
68 "pathName": "Champion",
69 "pathId": "9d2fccaa-428a-4604-a242-4f259ab8a555",
70 "pathKey": "term1Name",
71 "pathType": "Champion/Challenger"
72 }
73 ],
74 "responseTrackingCode": "GreatCustomer.07f16e7a-db89-400a-91d9-8b6868f07b7b",
75 "receiverId": "Francis.Albert.Bacon.19195313421",
76 "receiverRole": "customer",
77 "channel": "web",
78 "excludeFromContactRule": false,
79 "conclusionResponseValue": "",
80 "conclusionResponseType": "crt_x",
81 "version": 1,
82 "links": [
83 {
84 "method": "GET",
85 "rel": "self",
86 "href": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
87 "uri": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
88 "type": "application/vnd.sas.decision.subject.contact"
89 },
90 {
91 "method": "PUT",
92 "rel": "update",
93 "href": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
94 "uri": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
95 "type": "application/vnd.sas.decision.subject.contact",
96 "responseType": "application/vnd.sas.decision.subject.contact"
97 },
98 {
99 "method": "POST",
100 "rel": "create",
101 "href": "/subjectContacts/contacts",
102 "uri": "/subjectContacts/contacts",
103 "type": "application/vnd.sas.decision.subject.contact",
104 "responseType": "application/vnd.sas.decision.subject.contact"
105 },
106 {
107 "method": "PATCH",
108 "rel": "patch",
109 "href": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
110 "uri": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
111 "type": "application/vnd.sas.decision.subject.contact",
112 "responseType": "application/vnd.sas.decision.subject.contact"
113 },
114 {
115 "method": "DELETE",
116 "rel": "delete",
117 "href": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7",
118 "uri": "/subjectContacts/contacts/5195ceb6-228e-439d-b3df-307197f1e7a7"
119 },
120 {
121 "method": "GET",
122 "rel": "up",
123 "href": "/subjectContacts/contacts",
124 "uri": "/subjectContacts/contacts",
125 "type": "application/vnd.sas.collection",
126 "itemType": "application/vnd.sas.decision.subject.contact"
127 }
128 ]
129}

Path Parameters

NameTypeRequiredDescription
contactId
string
true

The resource identifier for a contact.

Header Parameters

NameTypeRequiredDescription
If-Match
string
false

The ETag value that was returned from a GET, POST, or PATCH of the resource. If the ETag value does not match the ETag value of the resource, the update cannot be completed. This is preferred over the If-Unmodified-Since header.

If-Unmodified-Since
string
false

The value of the last modified timestamp of the resource. If the resource has been updated since this time, the update cannot be completed.

Request Body

The full contact record.

A contact representation

NameTypeRequiredDescription
subjectId
string
true

A string that identifies the subject. This cannot be unique across subject levels.

subjectLevel
string
true

A string that indicates the type of subject ID. Example values are household and customer. A subject is uniquely identified by the subjectLevel and subjectId tuple.

objectUri
string
true

A URI of the resource that created this contact record.

objectRevisionId
string
true

A string that identifies the revision of the resource that created this contact record.

objectType
string
true

A string that identifies the type of resource that created this contact record.

objectVariables
array [Object Value]
false

A place for saving arbitrary values from the object.

treatmentsForConsideration
array [Treatments for Subject Consideration]
false

All the treatments that a subject can consider.

ruleFired
string
false

An encoded string that records which business rules evaluated to true.

pathTraversed
string
false

An ordered string that shows the IDs of rules that were evaluated.

abTests
array [AB Test Node Records]
false

A place for recording values from AB test node.

responseTrackingCode
string
true

A string that a response uses. This is provided by the merchant's application. This is for grouping all the responses, one for each treatment, considered by the subject.

receiverId
string
false

A string that identifies the person that receives this treatment. If the receiver is the subject, then receiverId equals subjectId. Otherwise, they are not equal.

receiverRole
string
false

Identifies whether the receiver is a subject or an agent.

channel
string
false

The channel through which the contact is made. This can be different from the response channel. For example, a subject receives an email for a purchase offer and makes the purchase by telephone.

modifiedTimeStamp
string<date-time>
false

Timestamp when this object is last modified. This field is a derived field. This tells when the response is recorded.

modifiedBy
string
false

ID of the user who last modified this object. This field is a derived field.

conclusionResponseValue
string
false

A summary response value derived from the responses to the individual treatments

conclusionResponseType
string
false

An interpretation of conclusionResponseValue.

excludeFromContactRule
boolean
false

When true, this contact record is ignored by a contact rule when determining an answer. The default is false.

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
400Bad RequestThe request was invalid.Schema
404Not FoundNo resource exists at the requested path.Schema
412Precondition FailedThe `If-Match` request header did not match the resource's entity tag, or the `If-Unmodified-Since` request header did not match the resource's last modified timestamp.Schema
428Precondition RequiredThe request headers did not include a `If-Match` or 'If-Unmodified-Since' precondition.Schema