younifyd
Menu

Create Attribute

Create custom attribute

POST/v1/attributes

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Create Attribute action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{createAttribute.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

entitystringrequired

The name of the entity that can have this attribute. When creating or updating the entities of a given type, you can include an `attributes` object with keys corresponding to the `name` of the custom attributes for that type.

One ofApplicationCampaignCustomerProfileCustomerSessionCartItemCouponEventGiveawayLoyaltyCardReferralStore

eventTypestring
namestringrequired

The attribute name that will be used in API requests and Talang. E.g. if `name == "region"` then you would set the region attribute by including an `attributes.region` property in your request payload.

titlestringrequired

The human-readable name for the attribute that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique.

typestringrequired

The data type of the attribute, a `time` attribute must be sent as a string that conforms to the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) timestamp format.

One ofstringnumberbooleantime(list string)(list number)(list time)location(list location)

descriptionstringrequired

A description of this attribute.

suggestionsarray<string>required

A list of suggestions for the attribute.

hasAllowedListboolean

Whether or not this attribute has an allowed list of values associated with it.

Default false

restrictedBySuggestionsboolean

Whether or not this attribute's value is restricted by suggestions (`suggestions` property) or by an allowed list of value (`hasAllowedList` property).

Default false

editablebooleanrequired

Whether or not this attribute can be edited.

subscribedApplicationsIdsarray<integer (int64)>

A list of the IDs of the applications where this attribute is available.

subscribedCatalogsIdsarray<integer (int64)>

A list of the IDs of the catalogs where this attribute is available.

allowedSubscriptionsarray<string>

A list of allowed subscription types for this attribute. **Note:** This only applies to attributes associated with the `CartItem` entity.

json
{
  "entity": "Event",
  "name": "pageViewed",
  "title": "Page view event",
  "type": "string",
  "description": "Event triggered when a customer displays a page.",
  "suggestions": [
    "string"
  ],
  "editable": true,
  "eventType": "pageViewed",
  "hasAllowedList": false,
  "restrictedBySuggestions": false,
  "subscribedApplicationsIds": [
    1,
    4,
    9
  ],
  "subscribedCatalogsIds": [
    2,
    5
  ]
}

Response

Returns 201 with an object. Read it in later steps with {{createAttribute.response.data.<field>}}.

idinteger (int64)

The internal ID of this entity.

createdstring (date-time)

The time this entity was created.

accountIdinteger (int64)

The ID of the account that owns this entity.

entitystring

The name of the entity that can have this attribute. When creating or updating the entities of a given type, you can include an `attributes` object with keys corresponding to the `name` of the custom attributes for that type.

One ofApplicationCampaignCustomerProfileCustomerSessionCartItemCouponEventGiveawayLoyaltyCardReferralStore

eventTypestring
namestring

The attribute name that will be used in API requests and Talang. E.g. if `name == "region"` then you would set the region attribute by including an `attributes.region` property in your request payload.

titlestring

The human-readable name for the attribute that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique.

typestring

The data type of the attribute, a `time` attribute must be sent as a string that conforms to the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) timestamp format.

One ofstringnumberbooleantime(list string)(list number)(list time)location(list location)

descriptionstring

A description of this attribute.

suggestionsarray<string>

A list of suggestions for the attribute.

hasAllowedListboolean

Whether or not this attribute has an allowed list of values associated with it.

Default false

restrictedBySuggestionsboolean

Whether or not this attribute's value is restricted by suggestions (`suggestions` property) or by an allowed list of value (`hasAllowedList` property).

Default false

editableboolean

Whether or not this attribute can be edited.

subscribedApplicationsIdsarray<integer (int64)>

A list of the IDs of the applications where this attribute is available.

subscribedCatalogsIdsarray<integer (int64)>

A list of the IDs of the catalogs where this attribute is available.

allowedSubscriptionsarray<string>

A list of allowed subscription types for this attribute. **Note:** This only applies to attributes associated with the `CartItem` entity.

eventTypeIdinteger (int64)
json
{
  "id": 6,
  "created": {},
  "accountId": 3886,
  "entity": "Event",
  "name": "pageViewed",
  "title": "Page view event",
  "type": "string",
  "description": "Event triggered when a customer displays a page.",
  "suggestions": [
    "string"
  ],
  "editable": true,
  "eventType": "pageViewed",
  "hasAllowedList": false
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.