Create Salesforce Platform Event from Azure Logic App Salesforce Connector

Matthew Lennington 1 Reputation point
2021-01-26T15:39:56.447+00:00

Is it possible to create a salesforce platform event from the azure logic app? I know that it has the ability to create records, and I am able to create standard objects with this feature, but when i attempt to create a platform event it errors out with an error of :

"message": "The field 'Id' is not part of the 'test_platform_event__e' table."

I notice that the endpoint path used for the connected app is also different from what i expected for salesforce. It is in the form of "/v2/datasets/default/tables/test_platform_event__e/items", where if i attempt to create that platform event through postman the correct endpoint path is "/services/data/v50.0/sobjects/test_platform_event__e". Is there something special i will need to do to create this record? or is platform events not supported?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,996 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Raghavendiran Sudhakaran 6 Reputation points
    2021-05-07T10:12:41.913+00:00

    Hi, is there an update on this?
    I am facing the same issue with Platform Event.

    My Platform event has 3 fields, name, email & phone.
    The logic app create record activity looks like below:

    "Create_record": {
        "runAfter": {
            "Set_vEmail": [
                "Succeeded"
            ],
            "Set_vName": [
                "Succeeded"
            ],
            "Set_vPhone": [
                "Succeeded"
            ]
        },
        "type": "ApiConnection",
        "inputs": {
            "body": {
                "Email__c": "@variables('vEmail')",
                "Name__c": "@variables('vName')",
                "Phone__c": "@variables('vPhone')"
            },
            "host": {
                "connection": {
                    "name": "@parameters('$connections')['salesforce']['connectionId']"
                }
            },
            "method": "post",
            "path": "/v2/datasets/default/tables/@{encodeURIComponent(encodeURIComponent('AgentCreation__e'))}/items"
        }
    }
    

    The events are created in Salesforce but on logic apps side, it reports 404, ID does not exist.

    1 person found this answer helpful.

  2. MayankBargali-MSFT 70,016 Reputation points
    2021-01-27T06:27:16.943+00:00

    Hi @Matthew Lennington

    Welcome to Microsoft Q&A! Thanks for posting the question.

    You can refer to the salesforce connectors document for currently supported actions. I don't see any action currently supported for the salesforce platform event.
    Please feel free to raise a feature request on UserVoice to support, if this is something that you would want to see in the Salesforce connector.

    Update:
    If anyone facing this error: "The field 'Id' is not part of the 'yourtablename' table"
    The salesforce connector logic based on assumption that every table is derived from the default “Standard Object” type, that has an Id column. You can verify if your table in the error if it has Id column or not using Salesforce Workbench.

    We will document this behavior for now and I have already passed the feedback to the team if this can be enhanced in future.


  3. Ben Cline 6 Reputation points
    2021-07-22T17:55:03.167+00:00

    @MayankBargali-MSFT is there any update on this? I am working with a company that would like to use Salesforce Platform Events if possible using the Logic Apps connector.

    Thanks,