Create a new contact record
The contact and response are recorded. If the presentation is configured to be recorded, it can be recorded at this time or deferred to a future update. The PATCH action can be used with the responseTrackingCode property to make the update and record the response to the treatment. If the operation is to be fulfilled asynchronously by using asynchronous=true, a resource ID is issued without waiting for the completion of the operation. The endpoint returns a URI for retrieving the resource in the Location response header. An HTTP status of 202 is returned.
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}
Name | Type | Required | Description |
---|---|---|---|
asynchronous | boolean | false | Whether the operation is to be carried out asynchronously or not. The default is false. |
The contact and response representation.
A contact representation
Name | Type | Required | Description |
---|---|---|---|
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. |
Status | Meaning | Description | ||
---|---|---|---|---|
201 | Created | A resource was created. | Headers | Schema |
202 | Accepted | The asynchronous request is accepted for processing, but the processing has not been completed. | Headers | Schema |
400 | Bad Request | The request was invalid. | Schema |