iDialogue scripts may create or update Salesforce records from customer experience (CX) rooms.
Examples of common interactions including
Recording a quote selection
Updating context information
Record I/O Best Practices
It is generally best practice for a script to update a checkbox or DateTime field on a Salesforce record to record an interaction. Then let a record-trigger flow execute more detailed DML or record modification.
Scripts should implement AJAX and asynchronous handlers when POSTing to the /records API.
Scripts should handle exceptions gracefully, protecting the end user from experiencing full stack traces.
Records are created and updated on-behalf of the iDialogue OAUth user established under the iDialogue Admin “Quick Start” tab.
The API endpoint can be constructed by concatenating the roomContext.url prperty and /records.
Method
The API supports only POST requests. The request method property determines the context of record INSERT, UPDATE, or UPSERT.
Request
The POST body contains the following properties.
Response
SRecord
The records property in the API Request and Response defines the following properties:
API Examples
Query Quotes and Update Opportunity
The following example queries all quotes associated with an Opportunity, then updates a custom field on Opportunity to designate the customer selected Quote.