APIs & Integrations

Stefan_PSV
Participant | Diamond Partner
Participant | Diamond Partner

ChatBot doesn't display botMessage

Hello everyone,

I'm currently working on a product registration with the help of the chatbot and have a little script problem that I don't understand:

I have a bot script, which in the first step fetches the necessary contact data from the CRM, then creates a deal and finally assigns this deal to the contact.
All information is stored in an object and should be transferred via customState so that the data can be used further on.

There are 3 nested requests to the API for this purpose (contact-search, create-deal, assoc-deal-to-contact). All requests are carried out successfully and the corresponding step is listed as "success" in the log.

 

Now to the problem: The bot does not output the message and does not pass the customState, so that I cannot continue working with the object data.
For one reason: customState can only have one level. It seems that multilevel objects are not processed. And all of this without an error message. The output is simply ignored.

 

Any thoughts?

That's the return from the log:

 

 

{
  "botMessage": "Fast geschafft! Ich stelle dir nur noch ein paar Fragen zum Kauf deines Antriebs!",
  "customState": {
    "regEntry": {
      "deal": {
        "id": "5304365212",
        "amount": "0",
        "dealname": "John Doe",
        "pipeline": "13721419",
        "dealstage": "13721421"
      },
      "assocs": {
        "companyToDeal": 0,
        "contactToDeal": "123456789",
        "lineItemToDeal": 0
      },
      "company": {
        "id": 0,
        "name": "",
        "domain": ""
      },
      "contact": {
        "id": "123",
        "zip": "12345",
        "city": "Musterstadt",
        "email": "email@example.de",
        "address": "1 Testallee",
        "country": "Deutschland",
        "lastname": "Doe",
        "firstname": "John"
      },
      "line_item": {
        "id": 0,
        "name": "",
        "amount": "",
        "searlno": "",
        "product_id": 0
      }
    }
  },
  "responseExpected": false
}

 

 

0 Upvotes
1 Reply 1
dennisedson
HubSpot Product Team
HubSpot Product Team

ChatBot doesn't display botMessage

@RMones , @tominal have either of you worked with anything similar?

0 Upvotes