botframework

How to send data when my card triggers automatically


I'm working with botframework and I need some data to be send even if the card is triggered automatically.

Here is how my actionSet is defined

{
          "type": "ActionSet",
          "actions": [
              {
                  "type": "Action.Execute",
                  "title": "Guardar",
                  "verb": "actionExecutedByStatusSelectionCard",
                  "data": {
                      "ActionableMessage_ID": "${ActionableMessage_ID}",
                      "FieldToEdit": "_Estado",
                      "EntityId": "${EntityId}",
                      "InstanceId": "${InstanceId}",
                      "MerlinAPIURL": "${MerlinAPIURL}",
                      "MerlinUser": "${MerlinUser}",
                      "MerlinPassword": "${MerlinPassword}"
                  },
                  "fallback": "Action.Submit"
              }
          ]
      }

I need MerlinUser and MerlinPassword always to be sent.

This is what I get if the card is triggered automatically(Notice that Data comes empty). enter image description here

I have no clue about what to try.


Solution

  • I found that in order to send data when the card refreshes, you need to add the data you want to send in the refresh key of the card, like this:

    "refresh": {
        "action": {
          "type": "Action.Execute",
          "title": "Submit",
          "verb": "personalDetailsCardRefresh",
          "data": {
            "ActionableMessage_ID": "${ActionableMessage_ID}",
            "MerlinAPIURL": "${MerlinAPIURL}",
            "MerlinUser": "${MerlinUser}",
            "MerlinPassword": "${MerlinPassword}"
          }
        },
    

    This way, when the user opens up the message, this data will be sent automatically.