How to implement Ticketing on Salesforce?
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
In order to implement Ticketing on Salesforce, you need to move to your Haptik bot, and follow the steps as mentioned below.
Create case(ticket) in Salesforce
Every time the bot hits your Salesforce app, a new case gets generated.
To generate a new case during the bot and user conversation, you should use the CURL request below. Add the python request format of this CURL at any point in the user journey, where you want to have this ticketing functionality. You will have to create a Code Step and add the following CURL to it.
curl --location --request POST '<BASE_URL>/third_party_integrations/v1/salesforce/create/' \ --header 'username: “put the email id using which you login to SF” --header 'clientid: “put the consumer key here” --header 'privatekey: “put the base64 encoded host.key file content here” --header 'Content-Type: application/json' \ --data-raw '{ "Description": “value”, "Subject": “value”, "Type": “value”, "Reason": "value", "SuppliedEmail": "value", "SuppliedName": "value", "SuppliedPhone": "value", "Priority": "value" }'
Now, in order to retrieve the details of the cases, that have been created, the URL will change to <BASE_URL>/third_party_integrations/v1/salesforce/get_data/, and by using the GET method, pass below parameters in the payload -
{ "object_type": "Case", "object_id": "id value" }
Below is the CURL command to get the Case details from Salesforce -
curl --location --request GET 'https://<BASE_URL>/third_party_integrations/v1/salesforce/get_data/?object_type=Case&object_id=<id value>' --header 'username: <Username>' \ --header 'clientid: <Client Id>' \ --header 'privatekey: <Private Key>'
The response will contain various case attributes and values, as shown.