Step 8. Integrations and APIs
On the other hand, non-browser-based Container Apps, including Fat Client Apps, Mobile Apps, and Chatbots, utilize Yonyx REST APIs. These REST APIs are commonly employed to access decision trees one guidance step at a time as JSON objects, presenting each tree node through the user interface of the Container App. This process is repeated when the user selects a response node.
Below are key code references for developers seeking guidance on integrating Yonyx decision trees into a browser-based CRM system.
Click Here for a Mock CRM system where Yonyx decision trees are integrated and displayed within an iFrame on the right one-third of the screen. The page is unobfuscated, allowing you to right click “View Source” and examine the code.
With this context in mind, the following are detailed step by step instructions, for integrating Yonyx decision trees into a browser-based CRM.
- Sign in to Yonyx, select the Administration Console, and retrieve the line of business (LOB) ID for the specific LOB you intend to incorporate into the CRM.
- Embed the Yonyx landing page into an iFrame within Agent-facing screens. The Landing Page URL passed to the iFrame should be https://<yourdomain>.yonyx.com/y/portal/?id=<lobid>.
- Upon an Agent concluding a journey through a decision tree, for the automated uploading of the Yonyx transcript to a CRM field, the Container App needs to invoke https://corp.yonyx.com/ui-api-v1/#complete-traversal following a ticket closure event. Subsequently, the Container App should actively monitor https://corp.yonyx.com/ui-api-v1/#traversal-completed to retrieve the transcript.
- For the automated inclusion of a ReferenceID (e.g., Case#, LeadID, etc.) with each traversal of the decision tree (Yonyx Incident), include an extra parameter named “rid” in the landing page URL. This action will update the ReferenceID field in the Yonyx Incident. Use the following format: https://<yourdomain>.yonyx.com/y/portal/?id=<lobid>&rid=<crm-ticket-id>
- To retrieve data from CRM fields into corresponding Yonyx Placeholders, implement a custom command called “read-from-crm.” Similarly, to transmit back updated values of Yonyx Placeholders when data is captured or modified during the journey through a decision tree, implement the “write-to-crm” command.
- Begin by asking your Decision tree authors to furnish you with a list of CRM fields they intend to read or write data from. Additionally, request a corresponding list of Yonyx Placeholders that should be linked to each CRM field. Develop a user-friendly UI screen that allows non-developers to adjust the list of CRM fields they wish to read or write, to accommodate future needs.
- To perform the read-from-crm function, initiate a call to https://corp.yonyx.com/ui-api-v1/#set-incident-placeholder-values, and transmit all CRM fields data to their respective Yonyx placeholders. Monitor https://corp.yonyx.com/ui-api-v1/#result-set-incident-placeholder-values for confirmation of success.
- To perform write-to-crm, track all Placeholders whose values were updated during Agent traversal. Write the values of each updated Yonyx placeholder to corresponding CRM field.