Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackrabbithanna/d40edacba4da41023dd959bc097f3d12 to your computer and use it in GitHub Desktop.
Save jackrabbithanna/d40edacba4da41023dd959bc097f3d12 to your computer and use it in GitHub Desktop.
Sample Rule, create Drupal user when EntityTag with Name = Application is created for a contact
langcode: en
status: true
dependencies: { }
id: create_user_1
label: 'Create user'
events:
-
event_name: 'rules_entity_insert:civicrm_entity_tag--civicrm_entity_tag'
description: ''
tags: { }
config_version: '3'
expression:
id: rules_rule
uuid: 1b94f813-b7a9-4409-9fb9-985f7a86669b
weight: 0
conditions:
id: rules_and
uuid: 743ec3ca-cb66-4e67-8a72-bac2730ba181
weight: 0
conditions:
-
id: rules_condition
uuid: bbadeaac-0568-4dd6-a32b-f42f73b3b643
weight: 0
context_values:
operation: '=='
value: Application
context_mapping:
data: civicrm_entity_tag.tag_id.entity.name.value
context_processors:
operation:
rules_tokens: { }
value:
rules_tokens: { }
provides_mapping: { }
condition_id: rules_data_comparison
negate: false
actions:
id: rules_action_set
uuid: 3dd57416-8ce9-437c-8ae7-76ec91b9584a
weight: 0
actions:
-
id: rules_action
uuid: a38116b9-931a-46ab-92f6-a78c45678a75
weight: 0
context_values:
is_active: 'FALSE'
notify: 'FALSE'
signin: 'FALSE'
context_mapping:
contact_id: civicrm_entity_tag.entity_id.value
context_processors:
is_active:
rules_tokens: { }
notify:
rules_tokens: { }
signin:
rules_tokens: { }
provides_mapping: { }
action_id: civicrm_entity_user_create
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment