java-sparkpost icon indicating copy to clipboard operation
java-sparkpost copied to clipboard

Unable to use Java SDK to map the Webhook Event

Open tekpartner-new opened this issue 1 year ago • 0 comments

When attempting to use the Java Library for mapping the Webhook Events I notice that your Java SDK uses int for “click_tracking” while the value that comes in the payload is Boolean. This makes the SDK unusable. Please provide an update on when we can use your SDK.

https://github.com/SparkPost/java-sparkpost/blob/master/libs/sparkpost-lib/src/main/java/com/sparkpost/model/webhook/event/DeliveryEvent.java

Sample Payload:

{
    "msys":
    {
        "message_event":
        {
            "click_tracking": true,
            "customer_id": "247909",
            "delv_method": "esmtp",
            "event_id": "7267563893113173055",
            "friendly_from": [[email protected]](mailto:[email protected]),
            "injection_time": "2023-08-17T22:10:07.000Z",
            "ip_address": "209.222.82.252",
            "ip_pool": "default",
            "mailbox_provider": "Barracuda Networks",
            "mailbox_provider_region": "B2B - Filter",
            "message_id": "64dbbf9ade6492db2c5b",
            "msg_from": [msprvs1=19593-G44ELib=bounces-247909-4@notification.ambetterhealth.com](mailto:msprvs1=19593-G44ELib=bounces-247909-4@notification.ambetterhealth.com),
            "msg_size": "8662",
            "num_retries": "0",
            "outbound_tls": "1",
            "queue_time": "2661",
            "rcpt_meta":
            {},
            "rcpt_tags":
            [],
            "rcpt_to": [[email protected]](mailto:[email protected]),
            "recv_method": "rest",
            "routing_domain": "handandstone.com",
            "sending_ip": "147.253.214.151",
            "subaccount_id": "4",
            "subject": "Ambetter Payment Confirmation",
            "template_id": "checks-amb-mktplcpymtconf",
            "template_version": "66",
            "timestamp": "1692310210",
            "transmission_id": "7268408008680427921",
            "type": "delivery",
            "raw_rcpt_to": [[email protected]](mailto:[email protected]),
            "recipient_domain": "handandstone.com"
        }
    }
}

tekpartner-new avatar Aug 22 '23 19:08 tekpartner-new