mbr_update_contact
Usage
This shortcode updates the ActiveCampaign contact record associated with the logged in WordPress user.
It can be used to:
- Add and remove tags
- Update any contact fields
- Add and remove the contact from automations
- Subscribe and unsubscribe the contact from lists.
Parameters
Parameters | Description |
---|---|
field=value | Specifies the name of an ActiveCampaign contact field to update and the value to update it with. The field can be any contact field in ActiveCampaign, e.g. first_name, last_name, phone, my_custom_field etc. The available field names can be found in ActiveMember360, Utilities, Contact Fields. The lower case version of the Perstag should be used as the field name. Defaults: none. Required: no. |
assign_tags | One or more tag ID's or tag names defined within ActiveCampaign to add to the contact. The available tags can be found in ActiveMember360, Utilities, Tags. If more than one is entered, please separate with commas. Defaults: none. Required: no. |
remove_tags | One or more tag ID's or tag names defined within ActiveCampaign to remove from the contact. The available tags can be found in ActiveMember360, Utilities, Tags. If more than one is entered, please separate with commas. Defaults: none. Required: no. |
assign_automations | One or more automation ID's defined within ActiveCampaign to add to the contact. The available automations can be found in ActiveMember360, Utilities, Automations. If more than one is entered, please separate with commas. Defaults: none. Required: no. |
remove_automations | One or more automation ID's defined within ActiveCampaign to remove from the contact. The available automations can be found in ActiveMember360, Utilities, Automations. If more than one is entered, please separate with commas. Defaults: none. Required: no. |
subscribe_lists | One or more list ID's defined within ActiveCampaign to subscribe the contact to. The available lists can be found in ActiveMember360, Utilities, Lists. If more than one is entered, please separate with commas. Defaults: none. Required: no. |
unsubscribe_lists | One or more list ID's defined within ActiveCampaign to unsubscribe the contact from. The available lists can be found in ActiveMember360, Utilities, Lists. If more than one is entered, please separate with commas. Defaults: none. Required: no. |
unsubscribe_reason | Reason for using unsubscribe_lists .Default: Contact unsubscribed on site https://yoursite.com” (the site URL will be the site on which they unsubscribed) Required: no. |
autocreate_tags | If set to yes non-existent tags in your ActiveCampaign application specified for the assign_tags parameter will be automatically created. If the tag does not exist the value for assign_tags will be used as the tag name. Default: yes Required: no. |
The use of tag ID's over tag names is encouraged. Unless a tag is deleted, its tag ID can be considered persistent and unique. Tag names, on the other hand, can be changed at any time and do not need to be unique. Using a tag name that is not unique or has been changed can cause your shortcode, hook or module to no longer work as expected.
Validity
This shortcode is only processed for logged in users who also exist as contacts within ActiveCampaign.
In all other cases, including WordPress users with the Administrator role nothing will be processed.
Conditional Branching
This shortcode does NOT support conditional branching with [ELSE_update_contact].
Nesting
Shortcode nesting is NOT supported.
Examples
- Example 1
- Example 2
- Example 3
- Example 4
Update the currently logged in users ActiveCampaign contact field first_name
to John:
[mbr_update_contact field='first_name' value='John']
Update the currently logged in users ActiveCampaign contact field; email
to john@example.com and my_custom_field
to 12345. Please note the email update will also update the email address for the logged in WordPress user:
[mbr_update_contact email='john@example.com' my_custom_field='12345']
Update the currently logged in user's ActiveCampaign contact field my_custom_field
to 12345. Also assign tag IDs 123, 456 and tag name My Tag Name to the contact. Do not autocreate any tags specified in the assign_tags
parameter if they do not exist in the ActiveCampaign application i.e are not found in ActiveMember360, Utilities, Tags:
[mbr_update_contact my_custom_field='12345' assign_tags='123,My Tag Name,456' autocreate_tags='no']
Update the currently logged in user's ActiveCampaign contact field my_custom_field_2
to 12345. Also assign ActiveCampaign tag IDs 123, 456 and tag name My Tag Name to the contact and remove tags IDs 987, 876 and tag name Another Tag Name. Autocreate any tags specified in the assign_tags
parameter if they do not exist in the ActiveCampaign application i.e are not found in ActiveMember360, Utilities, Tags. In addition add the contact to the ActiveCampaign automation with id 65:
[mbr_update_contact my_custom_field_2='98765' assign_tags='123,My Tag Name,456' remove_tags='987,Another Tag Name,876' assign_automation='65']
API
There is currently no ActiveMember360 API function equivalent for this shortcode.