Data Pass API

Data Pass API sends custom data to the agent regarding context, or about the user or their experience.

You should not directly instantiate the DataPassAPI class. Instead use init method with a block parameter, which returns an instance of DataPassAPI class.

  1. Using DataPassBuilder
  2. DataPassAPI methods
  3. Accessing Response
  4. Code Example
Public Methods

You can use the following builder public method to add data pass property and value, those props and values are then send to Nuance Messaging Systems. Atleast one property and value are required.

Finally invoke DataPassAPI sendDataPass method to send data pass to agent.

Public Methods
Public Properties
  • NSString* statusCode

    statusCode property has one of the following values which denotes the status of this request.


    200: Message was accepted by server

    400: Request has incorrect parameters.

    401: There is no such chat on server, chat should be started anew

    403: User hasn't privileges to use api or to see requested site.

    500: Server error.


	 
	let dataPass = DataPassAPI.init(block:{ (builder) in
		builder?.add("Test", andValue:"value1");
		
	 });
	 
	 datapass?.sendDataPass({ (success, error) in
	    if(error != nil) {
		
		} else {
		     
		}
	 });