Loading
Important Advisory: iOS Update Impacting CG Mobile ApplicationRead More
Extend Salesforce with Clicks, Not Code
Verify Receiving Events in CloudWatch

Verify Receiving Events in CloudWatch

Verify that events sent from Salesforce are received in EventBridge using a CloudWatch log.

  1. Click the rule that you just created.
  2. Under Targets, click the log. The CloudWatch log opens in a new tab.
  3. Publish an event from Salesforce. In this example, we publish an event message with REST API.
    1. Perform a POST request to this URI. If using Postman, click REST > SObject > SObject Create, and replace the :SOBJECT_API_NAME placeholder with Carbon_Comparison__e.
      /services/data/v58.0/sobjects/Carbon_Comparison__e/

      Use this request body.

      {
        "Annual_Mileage__c" : "12003",
        "Current_Vehicle__c" : "Fast Car",
        "Model_Year__c" : "2021"
      }
      To find out about methods for publishing an event, see Publishing Platform Events in the Platform Events Developer Guide. For example, you can use REST API to publish this Carbon_Comparison__e event message.
  4. You get a response similar to this response. The status of OPERATION_ENQUEUED means that the platform event message is published asynchronously.
    {
      "id": "e00xx0000000001AAA",
      "success": true,
      "errors": [
          {
              "statusCode": "OPERATION_ENQUEUED",
              "message": "e4aa03c9-d0e0-4c80-bf93-2e6779096018",
              "fields": []
          }
      ]
    }
  5. Refresh the CloudWatch log stream. The received event is displayed in the log group, similar to this event.
    {
        "version": "0",
        "id": "6f33d717-8e35-4488-5690-89e681b5737c",
        "detail-type": "Carbon_Comparison__e",
        "source": "aws.partner/salesforce.com/00DRM000000LqxV2AS/0YLRM00000001es4AA",
        "account": "XXXXXXXXXXXX",
        "time": "2023-04-03T19:23:23Z",
        "region": "us-west-2",
        "resources": [],
        "detail": {
            "payload": {
                "CreatedById": "005RM000002eap4YAA",
                "Current_Vehicle__c": "Fast Car",
                "CreatedDate": "2023-04-03T19:23:22.686Z",
                "Model_Year__c": "2021",
                "Annual_Mileage__c": 12003
            },
            "schemaId": "mVBhpA7tU9MCtBEbqjycBQ",
            "id": "118dab75-7b45-498e-8478-52d0324c1060"
        }
    }
    The received event contains the payload of the Salesforce event in the detail field. The top-level fields, such as version and detail-type, are EventBridge event fields. The detail-type field contains the Salesforce event API name. In combination with the source field, the detail-type field identifies the fields and values that appear in the detail field. For more information, see Amazon EventBridge events in the AWS documentation.
 
Loading
Salesforce Help | Article