Gigya Job Openings

Preferences Object REST

Skip to end of metadata
Go to start of metadata

 

 

Description

The Preferences object contains all the user's consent preferences.

This parameter or feature is part of our Early Adopters Program. To find out if you are eligible for participation, contact your Customer Engagement Executive by filling out a support form. You can access the support page by clicking Support on the upper menu after logging into your Gigya Console

Preferences Object Properties

RequiredFieldTypeDescription
typestringValue must be consent.
currentDocUri (TBD)stringThe URI of the document that this consent object is related to.
currentDocVersion*floatThe active version number of the consent statement. Either currentDocVersion or currentDocDate are required.
currentDocDate*dateThe active version date of the consent statement. Either currentDocVersion or currentDocDate are required.
customdataArray of objects

An array of custom data objects that are part of the schema for this consent statement. Each data set is comprised of a key-value pair. Both of these are strings.

 "customdata": [{
                    "key": "keyName",
                    "value": "value"
                }, {
                    "key": "keyName2",
                    "value": "value2"
                }
            ]

The maximum number of characters for the key is 20, and 256 for the value. The maximum number of custom key-value pairs per consent statement is 50.

descriptionstringA description of this consent object.
legalStatementsJSON object

An object containing the supported locales for this consent statement. Each locale includes the following fields:

  • purpose - (string) The purpose of the consent statement, this is publicly visible to the end-user.
  • documentUrl - (string) The URI location of the PDF that contains the consent statement for the defined locale.

Example:

"en": {
    "purpose": "This is my purpose",
    "documentUrl": "https://www.site.com/doc_en.pdf"
},
"fr": {
	"purpose": "C'est mon but",
    "documentUrl": "https://www.site.com/doc_fr.pdf"
}

For a list of all supported locales, see Advanced Customizations and Localization. Note that legalStatements are not available via accounts.getAccountInfo and can only be viewed inside the Consent Vault.

requiredBooleanThis applies to the requirement of the isConsentGranted field of the Preferences object and defines whether consent is required.
tagsArray of strings

Additional information in the form of a list of tags that you would like to save in the consent vault for any consent collection interaction (Grant/Withdraw/Renew). Once set, this value can be viewed in the Consent Vault, or searched for in the audit log.

Notes:

  • This field is not available via accounts.getAccountInfo or accounts.search for consents granted prior to July 22nd, 2018.
  • Tags can not be edited once set, to update the tags for a user they must consent to a new version of the agreement with the new/additional tags.
formatstring

Defines whether the isConsentGranted field requires validation in order to be submitted. Possible values are:

  • true
  • false
  • any
writeAccessstring

Specifies whether to allow unsigned requests to write into this object. This property applies when using the accounts.setAccountInfo method, or when setting fields through the usage of a Screen-Set. The supported values are:

  • "serverOnly" (default) - Only signed requests coming from the server are allowed.

  • "clientCreate" - Unsigned requests coming from the client are allowed to write into this field, only if it wasn't set before.
  • "clientModify" - Unsigned requests coming from the client are allowed to write into this field and modify existing values.
minDocVersionfloatFor statements that are versioned by numbers: The lowest version number that a user can consent to and still be considered to have a valid consent statement assigned to their account.
minDocDatedateFor statements that are versioned by dates: The earliest version date that a user can consent to and still be considered to have a valid consent statement assigned to their account.
refreshIntervalintegerThe number of days since consent was previously given before requesting the user's re-consent.
entitlementsarray

An array of comma-separated strings, where each string is an entitlement to which the user granted consent.

Entitlements are a sub-set of each statement, and are used to add nuance to the general consent statement.

For more information about the types of data that can be customized per consent statement, see Customizing Consent-Related Data.

setSchema Example:

preferencesSchema: {
 "fields": {
   "tos": {
     "type: "consent",
     "required": "true",
     "format": "True",
     "currentDocDate: "2017-05-15T12:00:00Z",
     "minDocDate: "2017-01-01T00:00:00Z",
     "writeAccess": "clientCreate"
   },
   "dataSharing.share_pii": {
     "type: "consent",
     "currentDocVersion: 2.1,
     "minDocVersion": 2.0,
     "writeAccess": "clientModify"
   },
   "dataSharing.share_anonymous": {
     "type: "consent",
     "currentDocVersion: 1.0
     "writeAccess": "clientModify"
   }
 }
}

 

 

The Preferences object returned from accounts.getAccountInfo contains (if not empty):

  • terms
  • privacy
  • custom (The name provided at creation)

Each of the above contain multiple objects, one for each consent object that was added to the schema. Each of those objects then contains the following Preference Object Properties.

 

Preference Object Response Properties

FieldTypeDescription
isConsentGrantedBooleanWhether the user granted consent.
docVersionfloatThe version of the document the isConsentGranted property references.
docDatedateThe date of the document the isConsentGranted property references.
lastConsentModifieddateThe date that the isConsentGranted property was last changed/updated.

 

Response Example:

"preferences":{  
	"terms":{
		"november_16_2017":{  
            "isConsentGranted":true,
            "docDate":"2017-11-16T00:00:00Z",
			"lastConsentModified":"2017-11-22T12:33:55.518Z"
		}
    },
    "testOptionalConsent_01":{  
        "isConsentGranted":false,
        "docVersion":2.4,
		"lastConsentModified":"2017-11-22T12:33:55.518Z"
	}
}

 

 

 

.

  • No labels