• Resolved Ambyomoron

    (@josiah-s-carberry)


    Do I understand correctly that it is not currently possible for a dialog to access values coming from the wordpress database? For example, suppose an ecommerce plugin is installed and a visitor asks for the price of a certain product. There is no way the response can include the price, unless that price is hard coded in the response. Is that correct?

    If so, adding such functionality (via shortcode or via db queries) would open up the plugin to vast possibilities.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Leon Katsnelson

    (@katsnelson)

    Josiah, thank you for your question.
    “How do I grow my chatbot beyond FAQ and wire my chatbot in to my system of record (ERP, CRM, database etc.) so that it can execute business transactions?” is the number one question we get. Our typical suggestion is to build integration in to the business systems from a back-end app. We have many examples and even a course on how to do that with NodeRed (https://courses.competencies.ibm.com/courses/course-v1:developerWorks+CB105EN+v1/about).

    The question you are asking is basically “WordPress database is my system of record. How do I integrate with it?” With the WordPress plugin, we eliminated the need for the backend app as WP itself is acting as the backend app. So, how do we wire that up? We are very interested in solving this problem especially if we can hook in to WooCommerce and other popular eCommerce WordPress systems.

    Plugin Contributor cognitiveclass

    (@cognitiveclass)

    Hi Josiah,

    The plugin also currently has WordPress hooks that you could potentially use to write your own PHP function that accesses your database and adds these values to the chatbot response. This feature is currently undocumented, but there is a filter hook with tag “watsonconv_bot_message” that is called before the chatbot response is sent to the user.

    By attaching a function to this hook, you can check if the response contains a specific intent or certain text, and if so, then you query your database for the required data and modify the response to include it.

    Feel free to let us know if you have any further questions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Accessing values from wordpress database’ is closed to new replies.