mbr_automation
Usage
This shortcode adds and/or removes an ActiveCampaign contact to/from ActiveCampaign automations. The contact is either that linked with the logged in user, or the contact specified.
The shortcode can be run automatically or used to generate a button or link within a page or post that, when clicked, will add/remove the contact to/from the automations.
Parameters
Parameters | Description |
---|---|
cid | The ActiveCampaign contact ID of the contact to add to or remove from automations. Default: Current logged in user contact ID. Required: no. |
assign | One or more automation ID's defined within ActiveCampaign to add the contact to. The available automations can be found in ActiveMember360, Utilities, Automations. If more than one is entered, please separate with commas. Default: none. Required: Yes if remove parameter not set. |
remove | One or more automation ID's defined within ActiveCampaign to remove the contact from. The available automations can be found in ActiveMember360, Utilities, Automations. If more than one is entered, please separate with commas. Default: none. Required: Yes if assign parameter not set. |
autorun | If set to yes the shortcode will execute without waiting for user input. Otherwise it will generate a form and a submit button or link_style and wait for user input. If set to yes the following parameters will be ignored; link_text , link_style , button_text , button_image , button_style , redirect_popup , aftertext .Permitted Values: yes Default: none. Required: no. |
link_text | The text to display for the link. Default: Click here to submit Required: no. |
link_style | The CSS style to apply for the link. Default: mbr_automation_link Required: no. |
button_text | The text to displayin the button. Default: Click here to submit Required: no. |
button_image | The URL of the image to use for the button. Default: none. Required: no. |
button_style | The CSS style to apply for the button. Default: mbr_automation_btn Required: no. |
redirect | The URL to send the user to after assigning/removing the contact to/from the automations. A special value can be passed, #reload#, to force all shortcodes on the page to resolve based on the latest changes that may have been introduced by processing this shortcode. Please note the redirect occurs immediately after the contact has been added/removed from the automations not after the automations have processed. Default: none. Required: no. |
redirect_popup | Specifies whether the user will be redirected to a new window after clicking the link or button. Only used if the redirect parameter is set. Permitted Values: yes Default: none. Required: no. |
after_text | The text that should be displayed after the shortcode has been processed, if the user hasn’t been redirected. Default: Your request was processed Required: no. |
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_automation].
Nesting
Shortcode nesting is NOT supported.
Examples
- Example 1
- Example 2
- Example 3
- Example 4
- Example 5
- Example 6
Add the contact linked with the logged in user to the automation with ID 12. Process this automatically as soon as they visit the page. When processing has completed display 'Your request was processed':
[mbr_automation autorun='yes' assign='12']
Add the contact linked with the logged in user to the automation with ID 34 and remove them from the automations with IDs 90 and 92. Process this automatically as soon as they visit the page. When processing has completed display 'Your request was processed':
[mbr_automation autorun='yes' assign='34' remove='90,92']
Add the contact with ActiveCampaign contact ID 456 to the automation with ID 12. Process this automatically as soon as they visit the page. When processing has completed display 'Your request was processed':
[mbr_automation autorun='yes' cid='456' assign='12']
Add the contact linked with the logged in user to the automation with ID 12 when they click on the link labelled 'Click here to submit'. When processing has completed display 'You have been added to the automation':
[mbr_automation assign='12' link_text='Click here to submit' after_text='You have been added to the automation']
Add the contact linked with the logged in user to the automation with ID 12 when they click on the link labelled 'Click here to submit'. When processing has completed redirect to the URL https://mysite.com:
[mbr_automation assign='12' link_text='Click here to submit' redirect='https://mysite.com']
Add the contact linked with the logged in user to the automation with ID 12 when they click on the link labelled 'Click here to submit'. When processing has completed redirect to the URL https://mysite.com which will open in a new browser tab:
[mbr_automation cid='456' assign='12' link_text='Click here to submit' redirect='https://mysite.com' redirect_popup='yes']
API
There is currently no ActiveMember360 API function equivalent for this shortcode.