Действующая карта работает только при отправке на себя - PullRequest
0 голосов
/ 04 апреля 2019

Я настраиваю поток Microsoft, который отправляет электронное письмо в формате HTML с действующей картой в обычном действии «Отправить письмо». Это вызвано графиком. Он отлично работает, когда я отправляю его самому себе, но ничего не отображается, когда я отправляю его другим пользователям в моей организации. Я попытался исследовать его и даже узнал, что мне нужен идентификатор профиля, но он все еще не работает, когда отправляется кому-либо, кроме меня. Действующая карта ниже.

<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <script type="application/adaptivecard+json">

{
    "originator": "289c11f5-796a-45f2-8531-08f8c1649549",
    "type": "AdaptiveCard",
    "hideOriginalBody": true,
    "body": [
        {
            "type": "TextBlock",
            "horizontalAlignment": "Center",
            "size": "Large",
            "weight": "Bolder",
            "text": "Opportunity needs updating\n"
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "items": [
                                {
                                    "type": "FactSet",
                                    "facts": [
                                        {
                                            "title": "Name:",
                                            "value": "@{items('Apply_to_each')?['Name']}"
                                        },
                                        {
                                            "title": "Close Date:",
                                            "value": "@{items('Apply_to_each')?['CloseDate']}"
                                        }
                                    ]
                                }
                            ],
                            "width": "stretch"
                        },
                        {
                            "type": "Column",
                            "items": [
                                {
                                    "type": "FactSet",
                                    "facts": [
                                        {
                                            "title": "Stage:",
                                            "value": "@{items('Apply_to_each')?['StageName']}"
                                        },
                                        {
                                            "title": "Value:",
                                            "value": "@{items('Apply_to_each')?['Amount']}"
                                        }
                                    ]
                                }
                            ],
                            "width": "stretch"
                        }
                    ]
                }
            ]
        },
        {
            "type": "TextBlock",
            "horizontalAlignment": "Left",
            "size": "Small",
            "weight": "Bolder",
            "text": "Please update the neccesary fields below and \nclick update. If you want to update it yourself inside of Salesforce.com, please click \"View and update opportunity in SF.\"",
            "wrap": true
        },
        {
            "type": "TextBlock",
            "text": "What should the new close date be? (mm/dd/yyyy)"
        },
        {
            "type": "Input.Date",
            "id": "CloseDate",
            "spacing": "None"
        },
        {
            "type": "TextBlock",
            "text": "Annual Value:"
        },
        {
            "type": "Input.Number",
            "id": "Value",
            "spacing": "None",
            "value": "@{items('Apply_to_each')?['Amount']}"
        },
        {
            "type": "TextBlock",
            "text": "What Stage?"
        },
        {
            "type": "Input.ChoiceSet",
            "id": "Stage",
            "spacing": "None",
            "value": "@{items('Apply_to_each')?['StageName']}",
            "choices": [
                {
                    "title": "1 (Qualified Prospect)",
                    "value": "1 (Qualified Prospect)"
                },
                {
                    "title": "2 (Building Relationships)",
                    "value": "2 (Building Relationships)"
                },
                {
                    "title": "3 (Determining Needs)",
                    "value": "3 (Determining Needs)"
                },
                {
                    "title": "4 (Proposal submitted)",
                    "value": "4 (Proposal submitted)"
                },
                {
                    "title": "5 (Trial Performance)",
                    "value": "5 (Trial Performance)"
                }
            ]
        },
        {
            "type": "TextBlock",
            "size": "Small",
            "weight": "Bolder",
            "text": "If the opportunity should be closed, please click \"View and update opportunity in SF\" and it will take you to the website to close the op."
        },

    ],
    "actions": [
        {
            "type": "Action.OpenUrl",
            "id": "View_In_SF",
            "title": "View and update Opportunity in SF",
            "url": "@{concat('https://chemtreat.lightning.force.com/lightning/r/Opportunity/',variables('OpID'),'/view')}"
        },
        {
            "type": "Action.Http",
            "id": "UpdateOp",
            "title": "Update Opportunity",
            "method": "POST",
            "url": "https://prod-57.westus.logic.azure.com:443/workflows/931674b26673417da1b0b8c2ed773cf9/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=imZ74GRo1v34moV4rbs_kJ3PnfWBLquxgnFn5lRSvxQ",
            "body": "


{
  'Opportunity': [

    {
      'Missed': '{{Missed.value}}',
      'Stage': '{{Stage.value}}',
      'Value': '{{Value.value}}',
      'CloseDate': '{{CloseDate.value}}',
      'Competitor': '{{Competitor.value}}',
      'OpID': '@{items('Apply_to_each')?['Id']}'
    }
  ]
}

",
            "headers": [
                {
                    "name": "Authorization",
                    "value": ""
                }
            ]
        }
    ],
    "version": "1.0"
}
  </script>
</head>
<body>
This opportunity (@{items('Apply_to_each')?['Name']}) is 30 days pass the expected close date. If you don't see options to update the opportunity in this email, it is most likely because it is not compatable with your device. Check this email on your main device to edit the opportunity inside this email. If you would rather update the opportunity inside salesforce OR if you still can't see options than click here to update the opportunity: <a href="@{concat('https://chemtreat.lightning.force.com/lightning/r/Opportunity/',variables('OpID'),'/view')}">Update Opportunity</a>.
</body>
</html>
...