In a workflow, you can change a contact's data using the Update contact node or change their status using Change contact status. With Update contact, you can update up to 10 fields in the same node, assigning each field either a direct value or a value calculated through an expression.
Update one or more fields
The Update contact node lets you change multiple contact fields in a single step.
For example, if you need to update the renewal date, privacy consent, and region, you no longer need to add three consecutive nodes: you can configure all the fields in the same node, and the contact is saved only once.
Select Add field to choose a field and define its new value. You can configure up to 10 fields in the same node.
For each field, choose one of the available modes:
- Simple: directly set the value to assign. The available options depend on the field type, for example text, date, Yes/No, or values from a list.
- Expression: use an expression to calculate the new value. You can also use contact data and workflow variables in the expression.
After saving the field, the node configuration shows the list of fields that will be updated and their values. Values calculated through an expression are identified by the fx icon.
You can add, edit, or remove fields before saving the node.
How multiple fields are updated
When a session passes through the node, magnews calculates the configured values and updates all fields with a single contact save.
All values must be valid for the update to be completed.
The order of the fields in the list does not determine the execution order. All values are calculated using the contact data as it was when the contact entered the node.
For example, if in the same node:
- You set field A to a new value.
- You set field B using an expression that reads field A.
The expression for field B uses the value that A had before the node was executed, not the value just assigned within the same node.
If you need one update to use the result of a previous update, use two consecutive Update contact nodes.
Change the contact status
To change the contact status, use the Change contact status node.
You can set the contact as:
- Subscribed.
- Unconfirmed.
- Suspended.
- Unsubscribed.
Depending on the selected status, additional information may be available. For example, when you unsubscribe a contact, you can specify the unsubscribe reason so that the reason is retained.
The two nodes therefore serve different purposes: use Update contact to change profile field values, and Change contact status when you need to change the contact's subscription status.