purecloud - anatomy of a data action€¦ · data actions • url template o defines the endpoint...
TRANSCRIPT
Anatomy of a Data Action
Richard Schott, Sr. Product ManagerJune, 2019
Data Actions
•Pre-composed web service calls that contain placeholders for dynamic data
What Are they?
Data Actions
•Roughly 1/3 of PureCloud customers use data actions•Approximately 1/2 of PureCloud Customers using a client integration also use data actions
Who uses them?
Data Actions
• /services/data/v37.0/search/?q=$esc.url("FIND {$salesforce.escReserved(${input.PHONE_NUMBER})} IN PHONE FIELDS RETURNING Account(AccountNumber, AccountSource, AnnualRevenue, BillingAddress, BillingCity, BillingCountry, BillingPostalCode, BillingState, BillingStreet, Description, Fax, Id, Industry, IsDeleted, Name, OwnerId, Ownership, ParentId, Phone, Rating, ShippingAddress, ShippingCity, ShippingCountry, ShippingPostalCode, ShippingState, ShippingStreet, Site, TickerSymbol, Type, Website)")
Placeholders?
Data Actions
•Data Actions are used in:oArchitect FlowsoAgent ScriptsoComing soon: Dialer pre/post call Rules•Will be coming to other PureCloud services soon
How can I use data actions?
Data Actions
•Data Actions allow PureCloud services to implement one interface, not every “flavor” of API available
Why are Data Actions important to PureCloud?
Data Actions
• Data Actions allow PureCloud customers to separate responsibilities:o One person is responsible for creating the data action• Should have some expertise in the APIs you’re connecting
too Another person is responsible for creating interaction
flows/agent scripts• Allows them to focus on “what should my customer/agent
experience be like?”
Why are Data Actions important to me?
Data Actions
•Data Actions supportoHTTP Verbs GET, PUT, PATCH, and POST•Data Actions DO NOT Support DELETE
oWeb Services that use No Auth, Basic Auth, User Defined Auth, or Oauth-like authentication
What can I do with Data Actions?
Data Actions
•Secure Data ActionsoSecure designation indicates an action is designed for handling sensitive information•PCI, HIPPA, PII, ETC.
oOnly actions tagged as “Secure” can be used with secure variables in Secure IVR Call Flows
What can I do with Data Actions?
Data Actions
•Data Actions have 2 main componentsoInput/Output ContractsoRequest/Response configurations
Anatomy of a Data Action
Data Actions
•These are the “forms” that are visible in Architect, Scripter and other areas of PureCloud•JSON Schema documents that describe what attributes are used to invoke an action and what will be returned
Contracts
Data Actions
•Input contract: Generally simple key/value pairs•This is the dynamic data used to complete the request to the web service
Contracts
Data Actions
•Output contract: The end result of the Action.oProvides the data to use in Architect flows or displayed in the agents’ script
Contracts
Data Actions
•Request configuration: Defines the specifics of the web service call that is going to be sent to the remote endpoint
Request configuration
Data Actions
• 3 Request contexts:o Input.*• Inserts a value from the input contract at the time of invocationo Input.foo would insert the value of “foo” into your request
o Credentials.*• Inserts a value from the integration’s credentialso Credentials.apiKey would insert the value of the “apiKey”
attribute in the integration’s credentialo Authresponse.*• Inserts a value from the response to the auth actiono Authresponse.token would insert the value of “token” from the
response to the auth action
Request configuration
Data Actions
•3 Request contexts:oThe contexts allow for “boiler plating” of requests•Majority of the web service call is defined in advance•Context fills in the dynamic portion of the call•Also used to protect credentials
Request configuration
Data Actions
• URL Templateo Defines the endpoint the action is going to interact with• Request Typeo HTTP Verb the action will use• Supports GET, PATCH, POST, and PUT
• Headerso HTTP Headers sent as part of the request• Request Templateo The body of the HTTP request that is sent to the endpoing• Only needed for PUT, POST, and PATCH types
Request configuration
Data Actions
•Translation mapoUses JSONPath notation to parse the response from the remote endpoint
oAllows for breaking down complex JSON response objects into simpler key value pairs
Response Configuration
Data Actions
•Translation Map DefaultsoDefault values for items defined in the translation mapoDefaults are only returned if the response does not contain any value
Response Configuration
Data Actions
•Success TemplateoThe ultimate output of the data actionoUses a ${foo} context to return values from the translation mapoThis is what is ultimately mapped to your Output Contract
Response Configuration
Data Actions
•Schema builder:
Tools to make things easier
Data Actions
• Configuration builder:
Tools to make things easier
Data Actions
• Test Mode:
Tools to make things easier