M v2.0 Allows you to write an Interaction to Rock when the command is executed. For example, you could write an interaction in response to the user tapping a button. By default, only a single Interaction will be written no matter how many times the command is executed. Normally this is probably what you want. If for some reason you want to allow multiple Interactions to be generated, set the IsMultipleAllowed property to true. This command takes a parameter object of type InteractionParameters that contains the following details. Properties In order for your parameters to be considered valid, you must provide at least one of ChannelId or ChannelGuid; and you must provide at least one of ComponentId or ComponentName. Also, note that some event sources will provide defaults for some of the properties in the table below or may even override a value you provide. PropertyTypeDescription ChannelIdint? The identifier of the channel where this interaction will be recorded. Must already exist. Defaults to null. ChannelGuidGuid? The unique identifier of the channel where this interaction will be recorded. Must already exist. Defaults to null. ComponentIdint? Specifies a specific component identifier where this interaction will be recorded. If used, the component must already exist. Defaults to null. ComponentNamestring Specifies a component name for where this interaction will be recorded. If you use this property to pick the component then the system will look for a matching component and if not found create one. Defaults to null. ComponentEntityIdint? If the channel is configured to have an Entity associated with the components then this would provide the Id of the Entity if it gets created from the ComponentName property. Defaults to null. Datastring Custom data that should be stored with the interaction. There is no specific format requirements, as long as the data is a string. Defaults to null. EntityIdint? Associates the interaction with the specified entity. The entity type will be taken from the channel configuration. Defaults to null. OperationstringThe type of operation that identifies this interaction. There is no specific list of strings that you must use, but a few suggestions are View and Watch. Defaults to null. SummarystringThe text that describes this event in a user friendly manner. Defaults to null. RelatedEntityTypeIdint?Sets the EntityTypeId of the related entity that should be associated with this Interaction. Defaults to null. RelatedEntityIdint?Sets the EntityId of the related entity that should be associated with this Interaction. Defaults to null. ChannelCustom1stringSets the first custom interaction string value. Defaults to null. ChannelCustom2stringSets the second interaction string value. Defaults to null. ChannelCustomIndexed1stringSets the first custom indexed interaction string value. Defaults to null. IsMultipleAllowedboolSpecifies if multiple interactions can be written for this single command. If set to true then each time the command is executed a new interaction will be written. Otherwise only the first execution will write an interaction. Note: If the page is reloaded then a new parameter object is created and a new interaction could again be written. Defaults to false. SendModeInteractionSendModeCurrently accepts two values:Queued: Adds the interaction to the internal queue, that posts to the server every so often. This is recommended and is used to maintain high performance. Immediate: In some rare cases, you may want to make sure an interaction gets posted to the server as soon as possible. This will cause the interaction to bypass the internal queue and post immediately upon execution. Be cautious using this, as you could flood your server with POST requests. Defaults to Queued. Example <Button Text="Like" Command="{Binding WriteInteraction}"> <Button.CommandParameter> <Rock:InteractionParameters Operation="Like" Summary="I like this." ChannelId="3" ComponentId="87" /> </Button.CommandParameter> </Button>