API Reference - Data Flow Actions

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000108107

← Back to API Reference | Getting Started

Data Flow Actions

Data Flow Actions define the specific email notification rules, auto-matching behavior, and visitor/member communication steps that execute within a Data Flow. Each action controls which email templates are sent at each stage of the lead lifecycle, from initial submission through acceptance and completion.

Model name in URL: data_flow_actions — DB table: data_flow_actions

The Data Flow Action Object

FieldTypeDescription
action_idintegerUnique action ID (primary key, read-only)
action_namestringDisplay name for this action (EG Main Action) required on create
data_flow_variable_namestringMachine name of the parent Data Flow this action belongs to (EG default_flow) required on create
membership_idstringComma-separated membership plan IDs this action applies to; empty for all plans
redirect_urlstringURL path to redirect the visitor after form submission
tracking_codestringConversion tracking code or pixel snippet to fire on form completion
preview_templatestringEmail template slug sent to members as a lead preview before they accept
complete_templatestringEmail template slug sent to members when a lead is fully delivered
auto_match_methodstringMethod used for auto-matching leads to members (EG preview)
account_specific_auto_matchintegerWhether auto-matching is restricted to members in the visitor's account: 1 yes, 0 no
admin_templatestringEmail template slug sent to the site admin when a lead is submitted
email_adminintegerWhether to send the admin notification email on submission: 1 yes, 0 no
extra_admin_addresstextAdditional email addresses (one per line) to CC on admin notifications
main_flow_actionintegerWhether this is the primary action for its parent flow: 1 yes, 0 no
activeintegerWhether this action is active: 1 active, 0 inactive
visitor_templatestringEmail template slug sent to the visitor confirming their form submission
copy_admin_on_visitorstringWhether to CC admin on visitor confirmation emails: 1 yes, 0 no
visitor_emailintegerWhether to send a confirmation email to the visitor: 1 yes, 0 no
visitor_email_variablestringForm field name containing the visitor's email address
accept_email_lead_actionstringAction to take when a member accepts a lead (EG email)
accept_email_lead_templatestringEmail template slug sent when a member accepts a lead
accept_lead_sold_outintegerWhether to send a sold-out notification when the lead reaches capacity: 1 yes, 0 no
sold_out_templatestringEmail template slug sent to the visitor when the lead is sold out
member_automatch_methodstringAuto-match method used for member-side matching in this action
member_preview_templatestringEmail template slug for the member lead preview in member-initiated flows
member_complete_templatestringEmail template slug for lead completion in member-initiated flows
auto_match_statestringGeographic state scope for auto-matching; empty for no state filter
accept_email_lead_copy_adminstringWhether to CC admin when a member accepts a lead: 1 yes, 0 no
member_auto_match_copy_adminintegerWhether to CC admin on member auto-match notifications: 1 yes, 0 no
enable_automatchintegerWhether auto-matching is enabled for this action: 1 yes, 0 no
site_wide_auto_matchintegerWhether auto-matching searches all site members rather than filtered results: 1 yes, 0 no
third_party_emailintegerWhether to send notifications to third-party email addresses: 1 yes, 0 no
auto_match_state_copy_adminintegerWhether to CC admin on state-based auto-match notifications: 1 yes, 0 no
accept_lead_sold_out_copy_adminintegerWhether to CC admin on sold-out notifications: 1 yes, 0 no
third_party_email_copy_adminintegerWhether to CC admin on third-party email sends: 1 yes, 0 no
third_party_lead_matchintegerWhether to enable lead matching for third-party recipients: 1 yes, 0 no
third_party_lead_match_copy_adminintegerWhether to CC admin on third-party lead match emails: 1 yes, 0 no
third_party_templatestringEmail template slug sent to third-party recipients
third_party_lead_match_templatestringEmail template slug for third-party lead match notifications
member_auto_match_statestringState scope for member-side auto-matching; empty for no state filter
third_party_email_addressestextNewline-separated list of third-party email addresses to notify
third_party_lead_match_extra_emailstextNewline-separated list of additional emails for third-party lead match notifications
email_admin_purchase_leadintegerWhether to email admin when a member purchases a lead: 1 yes, 0 no
admin_purchase_lead_templatestringEmail template slug sent to admin when a lead is purchased
visitor_member_contact_emailintegerWhether to send the visitor a contact email when connected to a member: 1 yes, 0 no
visitor_member_contact_email_copy_adminintegerWhether to CC admin on visitor-member contact emails: 1 yes, 0 no
visitor_member_contact_email_templatestringEmail template slug for visitor-member contact notifications
enable_get_multiple_repliesintegerWhether visitors can receive replies from multiple matched members: 1 yes, 0 no
profile_map_enabledintegerWhether to show a map on the member profile in the lead preview: 1 yes, 0 no
profile_map_requiredintegerWhether location data is required for profile map display: 1 yes, 0 no
profile_map_displaystringControls what location granularity is shown on the profile map (EG city)
profile_category_enabledintegerWhether to show category information on the member profile in the lead preview: 1 yes, 0 no
profile_category_requiredintegerWhether category data is required for profile category display: 1 yes, 0 no
profile_category_displaystringControls how category information is displayed on the preview profile
decline_lead_email_admin_templatestringEmail template slug sent to admin when a member declines a lead
share_profile_website_form_optionsintegerWhether to show the visitor's form options on the shared profile: 1 yes, 0 no
website_map_enabledintegerWhether to show a map on the website-level lead result page: 1 yes, 0 no
website_map_requiredintegerWhether location data is required for website-level map display: 1 yes, 0 no
website_map_displaystringControls location granularity shown on the website-level map
website_category_enabledintegerWhether to show category information on the website-level result page: 1 yes, 0 no
website_category_requiredintegerWhether category data is required for website-level category display: 1 yes, 0 no
website_category_displaystringControls how category information is displayed on the website-level result page

List Data Flow Actions

GET /api/v2/data_flow_actions/get

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/data_flow_actions/get?limit=25" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "action_id": "1",
      "action_name": "Main Action",
      "data_flow_variable_name": "default_flow",
      "membership_id": "",
      "redirect_url": "",
      "tracking_code": "",
      "preview_template": "member-lead-preview",
      "complete_template": "member-lead-complete",
      "auto_match_method": "preview",
      "account_specific_auto_match": "1",
      "admin_template": "admin-lead-submitted",
      "email_admin": "1",
      "extra_admin_address": "",
      "main_flow_action": "1",
      "active": "1",
      "visitor_template": "visitor-lead-submitted",
      "copy_admin_on_visitor": "0",
      "visitor_email": "1",
      "visitor_email_variable": "email",
      "accept_email_lead_action": "email",
      "accept_email_lead_template": "member-lead-accepted",
      "accept_lead_sold_out": "0",
      "sold_out_template": "",
      "member_automatch_method": "",
      "member_preview_template": "",
      "member_complete_template": "",
      "auto_match_state": "",
      "accept_email_lead_copy_admin": "0",
      "member_auto_match_copy_admin": "0",
      "enable_automatch": "1",
      "site_wide_auto_match": "0",
      "third_party_email": "0",
      "auto_match_state_copy_admin": "0",
      "accept_lead_sold_out_copy_admin": "0",
      "third_party_email_copy_admin": "0",
      "third_party_lead_match": "0",
      "third_party_lead_match_copy_admin": "0",
      "third_party_template": "",
      "third_party_lead_match_template": "",
      "member_auto_match_state": "",
      "third_party_email_addresses": "",
      "third_party_lead_match_extra_emails": "",
      "email_admin_purchase_lead": "0",
      "admin_purchase_lead_template": "",
      "visitor_member_contact_email": "0",
      "visitor_member_contact_email_copy_admin": "0",
      "visitor_member_contact_email_template": "",
      "enable_get_multiple_replies": "0",
      "profile_map_enabled": "0",
      "profile_map_required": "0",
      "profile_map_display": "",
      "profile_category_enabled": "0",
      "profile_category_required": "0",
      "profile_category_display": "",
      "decline_lead_email_admin_template": "",
      "share_profile_website_form_options": "0",
      "website_map_enabled": "0",
      "website_map_required": "0",
      "website_map_display": "",
      "website_category_enabled": "0",
      "website_category_required": "0",
      "website_category_display": ""
    }
  ],
  "total": "1",
  "current_page": 1,
  "total_pages": 1
}

Retrieve a Data Flow Action

GET /api/v2/data_flow_actions/get/{action_id}

Example Request

Copy
curl -X GET "https://www.yourdomain.com/api/v2/data_flow_actions/get/1" \
  -H "X-Api-Key: your-api-key-here"

Example Response

Copy
{
  "status": "success",
  "message": [
    {
      "action_id": "1",
      "action_name": "Main Action",
      "data_flow_variable_name": "default_flow",
      "membership_id": "",
      "active": "1",
      "main_flow_action": "1",
      "email_admin": "1",
      "admin_template": "admin-lead-submitted",
      "visitor_email": "1",
      "visitor_template": "visitor-lead-submitted",
      "enable_automatch": "1",
      "auto_match_method": "preview",
      "preview_template": "member-lead-preview",
      "complete_template": "member-lead-complete"
    }
  ],
  "total": "1",
  "current_page": 1,
  "total_pages": 1
}

Create a Data Flow Action

POST /api/v2/data_flow_actions/create

Example Request

Copy
curl -X POST "https://www.yourdomain.com/api/v2/data_flow_actions/create" \
  -H "X-Api-Key: your-api-key-here" \
  -d "action_name=Premium+Action" \
  -d "data_flow_variable_name=premium_flow" \
  -d "active=1" \
  -d "main_flow_action=1" \
  -d "email_admin=1" \
  -d "admin_template=admin-lead-submitted" \
  -d "visitor_email=1" \
  -d "visitor_template=visitor-lead-submitted" \
  -d "visitor_email_variable=email" \
  -d "enable_automatch=1" \
  -d "auto_match_method=preview" \
  -d "preview_template=member-lead-preview" \
  -d "complete_template=member-lead-complete"

Example Response

Copy
{
  "status": "success",
  "message": {
    "action_id": "2",
    "action_name": "Premium Action",
    "data_flow_variable_name": "premium_flow",
    "membership_id": null,
    "redirect_url": null,
    "tracking_code": null,
    "preview_template": "member-lead-preview",
    "complete_template": "member-lead-complete",
    "auto_match_method": "preview",
    "account_specific_auto_match": null,
    "admin_template": "admin-lead-submitted",
    "email_admin": "1",
    "extra_admin_address": null,
    "main_flow_action": "1",
    "active": "1",
    "visitor_template": "visitor-lead-submitted",
    "copy_admin_on_visitor": null,
    "visitor_email": "1",
    "visitor_email_variable": "email",
    "enable_automatch": "1"
  }
}

Update a Data Flow Action

PUT /api/v2/data_flow_actions/update

Example Request

Copy
curl -X PUT "https://www.yourdomain.com/api/v2/data_flow_actions/update" \
  -H "X-Api-Key: your-api-key-here" \
  -d "action_id=2" \
  -d "enable_automatch=0" \
  -d "visitor_email=0"

Example Response

Copy
{
  "status": "success",
  "message": {
    "action_id": "2",
    "action_name": "Premium Action",
    "data_flow_variable_name": "premium_flow",
    "active": "1",
    "email_admin": "1",
    "visitor_email": "0",
    "enable_automatch": "0"
  }
}

Delete a Data Flow Action

DELETE /api/v2/data_flow_actions/delete

Example Request

Copy
curl -X DELETE "https://www.yourdomain.com/api/v2/data_flow_actions/delete" \
  -H "X-Api-Key: your-api-key-here" \
  -d "action_id=2"

Example Response

Copy
{
  "status": "success",
  "message": "data_flow_actions record was deleted"
}