Hi,
Is it possible to send ticket data to a form via api form submission like this :
// Create the new request
var xhr = new XMLHttpRequest();
var url = 'https://api.hsforms.com/submissions/v3/integration/submit/id/id // Example request JSON:
var data = {
"submittedAt": Date.now(),
"fields": [
{
"name": "email",
"value": this.email
},
{
"name": "firstname",
"value": this.firstname
},
{
"name": "lastname",
"value": this.lastname
},
{
"name": "company",
"value": this.company
},
{
"name": "jobtitle",
"value": this.job
},
{
"name": "phone",
"value": this.formatted_phone
},
{
"name": "TICKET.subject",
"value": "Contact"
},
{
"name": "TICKET.content",
"value": this.message
}
],
"context": {
"pageUri": "https://spurred.io/contact-us",
"pageName": "Contact us"
},
"legalConsentOptions":{ // Include this object when GDPR options are enabled
"consent":{
"consentToProcess": this.process_data,
"text":"I agree to allow to store and process my personal data.",
"communications":[
{
"value": this.communication,
"subscriptionTypeId":999,
"text":"I agree to receive marketing communications from."
}
]
}
}
}
When I try i got this error : “Error in ‘fields.TICKET.content’. Field ‘TICKET.content’ isn’t in form definition”,“errorType”:“FIELD_NOT_IN_FORM_DEFINITION”