Loading...
Area: Episerver Campaign
Applies to versions: Not applicable

updatefields

This operation updates recipient data fields in Episerver Campaign. Field values can be overwritten, added, subtracted, prepended or appended.

This operation is available in the mail and the form service. If you are using the mail service, we recommend to use the system parameter bmUrl to avoid that a white page with a status message is displayed to the recipient.

Note: Transactional recipient lists (recipient lists that can only be used for API calls) cannot be updated using this operation.

Parameters

Name Mandatory Default value Description

bmRecipientId

yes/no

The ID of the recipient (usually the email address)

If used in the mail service, this parameter is not mandatory (the email address is sent anyway). If used in the form service, the parameter is mandatory.

bmNewRecipientId

no

If you want to change the bmRecipientId of a recipient, use this parameter, since the parameter bmRecipientId is not a regular data field, but an identifier.

Warning: Changing the ID of a recipient also affects all other recipient lists of the same client. In addition, all historical information is preserved and assigned to the new ID.

bmOverwrite

no

false

If you want to change the bmRecipientId of a recipient (see previous parameter) and the specified bmRecipientId already exists, an error message is returned and the operation is cancelled. If you set the value of bmOverwrite to true, the existing value is overwritten and no error message is returned.

bmSanitize

no

Set the value of this parameter to true to convert potentially dangerous characters in the supplied recipient data into their respective HTML equivalents.

...

no

Any parameter that corresponds to a parameter of the recipient list.

Return values

Value Description
ok

Recipient data successfully updated

wrong_tag

Authorization failed.

Error codes:

  • 501=wrong authentication tag
  • 502=wrong request IP
  • 503=wrong request method
  • 504=wrong protocol
  • 505=wrong recipient list
  • 506=wrong action
  • 507=action not found

Note: If a verification of the authentication tag does not solve the problem, contact customer support.

already_exist

Only with bmOverwrite=false: The new recipient ID transmitted using the parameter bmNewRecipientId already exists. To avoid this error and overwrite the existing ID, set bmOverwrite to true.

missing_id

No bmRecipientId was transmitted (mandatory) when using the form service.

not_found

No entry with the given bmRecipientId found

system_error

A general error occurred.

Example 1

.../mail/.../updatefields?interesse=ja&bmUrl=http://www.example.com

The dataset field interests of the recipient is set to yes. Then, the recipient is forwarded to "www.example.com".

Example 2

.../mail/.../updatefields?myclicks[add]=3&hasclicked=true&bmUrl=http://www.example.com

The value of the dataset field myclicks of the recipient of the email is increased by 3. The dataset field hasclicked is set to true. Then, the recipient is forwarded to "www.example.com".

Example 3

.../form/.../updatefields?myclicks[add]=3&hasclicked=true&bmRecipientId=john.smith%40example.com

The value of the dataset field myclicks of the recipient with the ID "john.smith@example.com" is increased by 3. The dataset field hasclicked is set to true.

Example 4

.../form/.../updatefields?bmRecipientId=john.smith%40example.com&bmNewRecipientId=mark.spencer%40example.com

The ID of the recipient "john.smith@example.com" is changed to "mark.spencer@example.com".

Last updated: Apr 25, 2018