Can support forms be submitted via the forms API?

SOLVE
Regular Contributor

If we setup a support form to create conversations directly into our support inbox as detailed here: https://www.hubspot.com/product-updates/support-conversations can that form receive submissions via the forms API like a normal HubSpot marketing hub form?

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
Regular Contributor

Went ahead and tested it, and yes, you can submit via the API. Just have to grab the API name for the issue and details fields (which are TICKET.subject and TICKET.content respectively, in case anyone else is wondering)

 

 

6 Replies 6
Highlighted
Regular Contributor

Went ahead and tested it, and yes, you can submit via the API. Just have to grab the API name for the issue and details fields (which are TICKET.subject and TICKET.content respectively, in case anyone else is wondering)

 

 

Community Manager

Thank you for sharing this @kaious 

 

Have a great rest of the week!

 

Best,

Sharon

Reply
0 Upvotes
New Member

@kaious are you using the AJAX method? I've tried submitting these fields as you describe, but I'm still unable to get past validation. If I add "TICKET.subject" to the fieldname I get an "Error in 'fields.TICKET.subject'. Field 'TICKET.subject' isn't in form definition".

 

Any ideas?

Reply
0 Upvotes
Regular Contributor

Hi @ellefsen - we're using a custom form built on our website which collects the data and passes it to HubSpot via the forms API directly from our server, as opposed to a form embed (https://developers.hubspot.com/docs/methods/forms/forms_overview)

 

And make sure you're using a specific ticket form, not a general hubspot form (ie setup here: https://app.hubspot.com/live-messages-settings/{YOURPORTALID}/inboxes/edit/3246/forms )

 

Not sure if it's any help, but here's the body of the API call we're making:

 

{"fields":
[
{
"name":"email",
"value":"kaitestfeedbackformgeneral3@graphicfood.com"
},
{
"name":"joyous_source",
"value":"info-end-user.js"
},
{
"name":"firstname",
"value":"Kai"
},
{
"name":"lastname",
"value":"Crow"
},
{
"name":"phone",
"value":"987636792390"
},
{
"name":"TICKET.subject",
"value":"Joyous user enquiry form - Kai Crow"
},
{
"name":"TICKET.content",
"value":"And another test!"
}
],"context":{"pageUri":"http://localhost:3000/on-behalf-of","pageName":"About Joyous"},"skipValidation":true}
 
*Maybe that last skip validation piece is the key?
 
This is how the ticket shows up in HubSpot:
Screen Shot 2019-08-30 at 10.22.05 AM.png
New Member

I can confirm that I was unable to get this to work until I added 

skipValidation: true

to the form data. Thanks!

Reply
0 Upvotes
Regular Contributor

Sorry @ellefsen, also the endpoint we're using is https://api.hsforms.com/submissions/v3/integration/submit/ - so I believe that is the AJAX method?

 

 

Reply
0 Upvotes