Profile Object

A JSON object that can be used to access persisted data about the current users profile using CognigyScript


The Profile object can be used to access the data persisted in the current users contact profile.


Example of a Profile Object


You can access the values in the Profile object using CognigyScript or Tokens.

The Profile object is accessible using cp in CognigyScript or Code Nodes. For example, use Hi {{cp.profile}} in a Say Node to output Hi Bob in our example.

You can also use the "First Name" token to get the same result:


This will produce the same output


Undefined values

If a value (e.g. cp.lastname) is not defined in the profile, there will be no text replacing the script in the output, so be sure to implement checks where needed.


This will also produce the same output, since cp.lastname is not defined in our example

Default value

When newly created, a Profile Object only contains its own ID, accessible using cp.profileId.

You can use this ID for API calls to e.g. update the profile (See API reference here) etc.