Title: Accessing values from wordpress database
Last modified: April 25, 2018

---

# Accessing values from wordpress database

 *  Resolved [Ambyomoron](https://wordpress.org/support/users/josiah-s-carberry/)
 * (@josiah-s-carberry)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/accessing-values-from-wordpress-database/)
 * 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](https://wordpress.org/support/users/katsnelson/)
 * (@katsnelson)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/accessing-values-from-wordpress-database/#post-10217415)
 * 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](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](https://wordpress.org/support/users/cognitiveclass/)
 * (@cognitiveclass)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/accessing-values-from-wordpress-database/#post-10217587)
 * 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.

 * ![](https://ps.w.org/conversation-watson/assets/icon-256x256.png?rev=1684465)
 * [Chatbot with IBM watsonx Assistant](https://wordpress.org/plugins/conversation-watson/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/conversation-watson/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/conversation-watson/)
 * [Active Topics](https://wordpress.org/support/plugin/conversation-watson/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/conversation-watson/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/conversation-watson/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [cognitiveclass](https://wordpress.org/support/users/cognitiveclass/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/accessing-values-from-wordpress-database/#post-10217587)
 * Status: resolved