String

The value for this input datatype will be available in the session object in the following format:

Attribute NameDatatype Description
MetamapString Meta (A)
ValuemapThe details of the string ex: Hello There

String Meta (A)

Attribute NameDatatype Description
TypeString'string'
valueString'Hello There'

Note: Note: To pass input through the visitor.info() JavaScript API or the Update Custom Information REST API, use the key name in the format %visitor.custominfo.<keyname>%. For example, if the key name is "Plan," the input should be set as %visitor.custominfo.Plan%.

Sample Code:

Format received in input "session" object:

Copied{
      "meta":{
         "type":"string",
         "value":"Hello There!"
      },
      "value":"Hello There!"
   }

Format to be returned in response object:

Copiedresponse=map();
response.put('string' , “Hello There”);
return response;