mails failing to deliver when I send Amazon SES emails using the SendTemplatedEmail operation (Attribute 'vehicle' is not present in the rendering data)

0

Our team is facing issues with dynamic templates on production with SES after successfully submitting a queue. Webhook returning error "failure":{"errorMessage":"Attribute 'vehicle' is not present in the rendering data." even the attribute and value is there.

Template data you can find from "templateName":"Email_13122022_163112_c65a93f9-80e4-4cb6-8616-5370445fc5f7_8120"

Given below from the sending queue two types of data. Please check and provide the resolution of this issue.

  1. It has the value "34344343443434" with the "vehicle" attribute.

{"vehicle no":"","city":"","company":"","country":"","email":"pankaj@loyaltycommunication.com","firstname":"Pankaj","gender":"Male","home town":"Haryana","lastname":"Batra","municipal":"","numeric":"ghygg","mobilenumber":"919416399171","state":"Haryana","street":"","vehicle":"34344343443434","zip":"","1 oct hi new":"","14 dec":"","14 december (1)":"","14 december (2)":"","14 december (3)":"","14 december (4)":"","14 december (5)":"","23sept country name":"","28 september":"","7 mrch a":"","7 mrch":"","abc":"","add1":"","add2":"","age":"","age454":"","all":"","average":"","boolean value. ":"","boolean":"","campaignnotification":"","ccc":"","cf1":"","chckbox":"","cn":"","confirmkeyword":"","contact id":"","country 123":"","country 23":"","country 4":"","country a":"","country sept":"","custom ":"","custom 2":"","custom field include in all list":"","custpom":"","d":"","data type nummm":"","date 1 ":"","date 2":"","date 22":"","date 2222":"","date":"","devicetoken":"","devicetypeid":"","discountcode":"","dob":"","doubleemailoptin":"","doublesmsoptin":"","drop down":"","drop-down 1st october":"","emailoptindate":"","emailoptinoptout_time":"","emailoptoutdate":"","eventenddate":"","eventname":"","eventstartdate":"","exit contact iddd new":"","exit contact iddd":"","exte cv ":"","external contact id 8":"","external contact idv ":"","external cv ":"","external cv":"","externalcontactid":"","externalcontactid_old":"","extinfo1":"","extinfo10":"","extinfo11":"","extinfo12":"","extinfo13":"","extinfo14":"","extinfo15":"","extinfo16":"","extinfo17":"","extinfo18":"","extinfo19":"","extinfo2":"","extinfo20":"","extinfo3":"","extinfo4":"","extinfo5":"","extinfo6":"","extinfo7":"","extinfo8":"","extinfo9":"","extjson":"","fk_termsid":"","fullname firstname lastname":"","hello (ext con id- alpha-num)":"","hello":"","hi 234":"","hi new ":"","hi":"","image":"","interest":"","isdevicetokenvalid":"","islocationtrackingactive":"","keyword":"","latest":"","lc_dob":"","lc_old_contactid":"","list box":"","middlename":"","mobileappoptinoptout":"","mobileappoptinoptout_time":"","mobilenumber 3444":"","mobilenumber111111111":"","multile":"","multiple value":"","name check":"","new ":"","new 1":"","new 12":"","new 2":"","new 3":"","new check fields 4":"","new custom field":"","new field ":"","new list checks":"","new lsittt 1":"","new one":"","new sheet test":"","new sheet testhi 29 september":"","new":"","newly created ":"","nm":"","nmed country":"","Note":"","num string":"","numeric 1":"","numeric value.":"","numericcc":"","okokoko":"","olcd":"","old":"","predefined single":"","predefineddd":"","productid":"","registrationno":"","rollno":"","shortcode":"","singleemailoptin":"","singlesmsoptin":"","skypeid":"","smsoptinoptout_time":"","stopkeyword":"","SystemContactId":"","test abc":"","title":"","uniqueurl":"","unsubscribe:AllContacts":"","unsubscribe:New Group":"","unsubscribe":"","value":"","lc_campid":"a7fea776-d57a-ed11-abd7-029067118550","qid":"b758532f-c8a2-ed11-abd7-029067118550&lcuid=1035&email=pankaj%40loyaltycommunication.com&campid=a7fea776-d57a-ed11-abd7-029067118550&lc_contactid=22516132","lc_r":"in","emailurl":"https://sms.club/0ewZpoABcQ","email-address":"pankaj@loyaltycommunication.com","preHeader_tag":"live 919416399171 ghygg Haryana","lc_contactid":"22516132","lc_recpientId":"13790010","emailuid":"b758532f-c8a2-ed11-abd7-029067118550","lc_qfw":"19","lc_qtempid":"89881","lc_kfwhcl":"","lc_qstarttime":"1675324562161","lc_qwhnewthread":"False","lc_whpriority":"high"}

Webhook response:-

{"eventType":"Rendering Failure","mail":{"timestamp":"2023-02-02T07:59:13.475Z","source":"noreply@loyaltycommunication.com","sourceArn":"arn:aws:ses:ap-south-1:664378509502:identity/loyaltycommunication.com","sendingAccountId":"664378509502","messageId":"010901861123059e-2a74f4f7-55da-493f-996d-daf9442bdeb3-000000","destination":["pankaj@loyaltycommunication.com"],"headersTruncated":false,"tags":{"lc_qstarttime":["1675324562161"],"ses:operation":["SendTemplatedEmail"],"emailuid":["b758532f-c8a2-ed11-abd7-029067118550"],"ses:caller-identity":["ses"],"lc_whpriority":["high"],"qid":["b758532f-c8a2-ed11-abd7-029067118550"],"lc_qtempid":["89881"],"lc_recpientId":["13790010"],"accountid":["1035"],"lc_qfw":["19"],"lc_contactid":["22516132"],"ses:configuration-set":["lcom-ses-in-dconfig"],"ses:source-ip":["112.196.49.130"],"ses:from-domain":["loyaltycommunication.com"],"lc_r":["in"],"lc_qwhnewthread":["False"],"lc_queuebatchid":["8046ab8d-5e8f-4549-a461-2add4c783661"]}},"failure":{"errorMessage":"Attribute 'vehicle' is not present in the rendering data.","templateName":"Email_13122022_163112_c65a93f9-80e4-4cb6-8616-5370445fc5f7_8120"}}

  1. It has the value empty "" with the "vehicle" attribute.

{"vehicle no":"","city":"","company":"","country":"","email":"prabhjot@loyaltycommunication.com","firstname":"Prabhjot","gender":"Male","home town":"Punjab","lastname":"Khalsa","municipal":"","numeric":"ghfyhghh","mobilenumber":"919888802475","state":"Punajb","street":"","vehicle":"","zip":"","1 oct hi new":"","14 dec":"","14 december (1)":"","14 december (2)":"","14 december (3)":"","14 december (4)":"","14 december (5)":"","23sept country name":"","28 september":"","7 mrch a":"","7 mrch":"","abc":"","add1":"","add2":"","age":"","age454":"","all":"","average":"","boolean value. ":"","boolean":"","campaignnotification":"","ccc":"","cf1":"","chckbox":"","cn":"","confirmkeyword":"","contact id":"","country 123":"","country 23":"","country 4":"","country a":"","country sept":"","custom ":"","custom 2":"","custom field include in all list":"","custpom":"","d":"","data type nummm":"","date 1 ":"","date 2":"","date 22":"","date 2222":"","date":"","devicetoken":"","devicetypeid":"","discountcode":"","dob":"","doubleemailoptin":"","doublesmsoptin":"","drop down":"","drop-down 1st october":"","emailoptindate":"","emailoptinoptout_time":"","emailoptoutdate":"","eventenddate":"","eventname":"","eventstartdate":"","exit contact iddd new":"","exit contact iddd":"","exte cv ":"","external contact id 8":"","external contact idv ":"","external cv ":"","external cv":"","externalcontactid":"","externalcontactid_old":"","extinfo1":"","extinfo10":"","extinfo11":"","extinfo12":"","extinfo13":"","extinfo14":"","extinfo15":"","extinfo16":"","extinfo17":"","extinfo18":"","extinfo19":"","extinfo2":"","extinfo20":"","extinfo3":"","extinfo4":"","extinfo5":"","extinfo6":"","extinfo7":"","extinfo8":"","extinfo9":"","extjson":"","fk_termsid":"","fullname firstname lastname":"","hello (ext con id- alpha-num)":"","hello":"","hi 234":"","hi new ":"","hi":"","image":"","interest":"","isdevicetokenvalid":"","islocationtrackingactive":"","keyword":"","latest":"","lc_dob":"","lc_old_contactid":"","list box":"","middlename":"","mobileappoptinoptout":"","mobileappoptinoptout_time":"","mobilenumber 3444":"","mobilenumber111111111":"","multile":"","multiple value":"","name check":"","new ":"","new 1":"","new 12":"","new 2":"","new 3":"","new check fields 4":"","new custom field":"","new field ":"","new list checks":"","new lsittt 1":"","new one":"","new sheet test":"","new sheet testhi 29 september":"","new":"","newly created ":"","nm":"","nmed country":"","Note":"","num string":"","numeric 1":"","numeric value.":"","numericcc":"","okokoko":"","olcd":"","old":"","predefined single":"","predefineddd":"","productid":"","registrationno":"","rollno":"","shortcode":"","singleemailoptin":"","singlesmsoptin":"","skypeid":"","smsoptinoptout_time":"","stopkeyword":"","SystemContactId":"","test abc":"","title":"","uniqueurl":"","unsubscribe:AllContacts":"","unsubscribe:New Group":"","unsubscribe":"","value":"","lc_campid":"a7fea776-d57a-ed11-abd7-029067118550","qid":"b758532f-c8a2-ed11-abd7-029067118550&lcuid=1035&email=prabhjot%40loyaltycommunication.com&campid=a7fea776-d57a-ed11-abd7-029067118550&lc_contactid=22516133","lc_r":"in","emailurl":"https://sms.club/0ewZpoABcQ","email-address":"prabhjot@loyaltycommunication.com","preHeader_tag":"live 919888802475 ghfyhghh Punjab","lc_contactid":"22516133","lc_recpientId":"13790011","emailuid":"b758532f-c8a2-ed11-abd7-029067118550","lc_qfw":"19","lc_qtempid":"89881","lc_kfwhcl":"","lc_qstarttime":"1675324562161","lc_qwhnewthread":"False","lc_whpriority":"high"}

Webhook response:-

{"eventType":"Rendering Failure","mail":{"timestamp":"2023-02-02T07:59:13.426Z","source":"noreply@loyaltycommunication.com","sourceArn":"arn:aws:ses:ap-south-1:664378509502:identity/loyaltycommunication.com","sendingAccountId":"664378509502","messageId":"010901861123059a-08f3a0d1-ee64-4c95-b03a-eea50db0fdb9-000000","destination":["prabhjot@loyaltycommunication.com"],"headersTruncated":false,"tags":{"lc_qstarttime":["1675324562161"],"ses:operation":["SendTemplatedEmail"],"emailuid":["b758532f-c8a2-ed11-abd7-029067118550"],"ses:caller-identity":["ses"],"lc_whpriority":["high"],"qid":["b758532f-c8a2-ed11-abd7-029067118550"],"lc_qtempid":["89881"],"lc_recpientId":["13790011"],"accountid":["1035"],"lc_qfw":["19"],"lc_contactid":["22516133"],"ses:configuration-set":["lcom-ses-in-dconfig"],"ses:source-ip":["112.196.49.130"],"ses:from-domain":["loyaltycommunication.com"],"lc_r":["in"],"lc_qwhnewthread":["False"],"lc_queuebatchid":["8046ab8d-5e8f-4549-a461-2add4c783661"]}},"failure":{"errorMessage":"Attribute 'vehicle' is not present in the rendering data.","templateName":"Email_13122022_163112_c65a93f9-80e4-4cb6-8616-5370445fc5f7_8120"}}

1 Answer
0

JSON parsing can be problematic with space in the attribute. Try the parsing as below:

var vehicle = { "id": "555", "vehicle no": "432432" } alert(func["vehicle no"]);

profile pictureAWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions