This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(pm.response.code === 200 || pm.response.code === 201){ | |
var responseBody = pm.response.json(); | |
pm.environment.set('access_token', responseBody.access_token); | |
pm.environment.set('refresh_token', responseBody.refresh_token); | |
pm.environment.set('scope', responseBody.scope); | |
pm.environment.set('id_token', responseBody.id_token); | |
pm.environment.set('instance_url', responseBody.instance_url); | |
pm.environment.set('token_type', responseBody.token_type); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<lightning-card variant="Narrow" > | |
<lightning-button if:true={messageList} variant="border-filled" | |
label="Chat with another customer" onclick={handleAnOtherChat} slot="actions"> | |
</lightning-button> | |
<lightning-spinner alternative-text="Loading" size="small" if:true={isSpinner}></lightning-spinner> | |
<div class="slds-p-horizontal_small"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger ContentVersionTrigger on ContentVersion (after insert) { | |
/* | |
* Develop a solution so that whenever a file is getting inserted under Task, | |
* Event or Case Object the same file should be linked to the related Account Record | |
*/ | |
Set<Id> contentDocumentIdsSet = new Set<Id>(); | |
/* Step1 - Get the content document Id */ | |
for(ContentVersion version: Trigger.New){ | |
contentDocumentIdsSet.add(version.ContentDocumentId); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void UploadFile(String fileName, String bodyEncoded, String contentType) { | |
String fileExtension = fileName.substring(fileName.indexOf('.')+1, fileName.length()); | |
String boundary = '----WebKitFormBoundary7MA4YWxkTrZu0gW'; | |
String header = '\r\n--' + boundary + '\r\n'; | |
String footer = '\r\n--' + boundary + '--'; | |
String fileNameToUpload = fileName;//+'.'+fileExtension.trim(); | |
String folderId = '19xl6WOmqZIfLCukX4YskGqlQIRSZDzXc'; | |
List<String> listofFolderId = new List<String>(); | |
listofFolderId.add(folderId.trim()); | |
String body = header + 'Content-Type: application/json\r\n\r\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestResource(urlMapping='/whatsapp/webhooks/v1/*') | |
global without sharing class WhatsAppWebhook { | |
private static Final String SIGNATURE_VALID_MESSAGE = 'Signature Verified'; | |
private static Final String SIGNATURE_NOT_VALID_MESSAGE = 'Signature could not be verified'; | |
@HttpGet // GET | |
global static void doGet() { | |
RestResponse response = RestContext.response; | |
RestRequest request = RestContext.request; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DateClassUtility { | |
@InvocableMethod(label='Date Operations' | |
description='Operations related to date class' | |
category='Date Utils' | |
iconName='slds:standard:date_time' | |
) | |
// iconName - <slds:category:name> // see | |
// iconName - <resource:namespace:resourceId> // managed packages | |
public static List<Date> dateUtils(List<InputWrapper> inputs){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF( | |
TEXT( Department__c )="IT", | |
IMAGE("https://www.vecteezy.com/vector-art/5928014-it-logo-design-for-information-technology-company-logo-design-vector", "Information Technology", 200, 200) , | |
IF( | |
TEXT( Department__c )="CSE", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.btnIconOverlay { | |
position: absolute; | |
z-index: 1; | |
margin: 0% 0px 0px 88%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WhatsAppUtils { | |
public static List<WAMessage__c> listAllMessageByCustomer(String customerPhone){ | |
List<WAMessage__c> messages = new List<WAMessage__c>(); | |
messages = [SELECT Id, Name, MessageContent__c, MessageType__c, Outgoing__c FROM WAMessage__c WHERE CustomerPhone__c =: customerPhone]; | |
return messages; | |
} | |
public static WAMessage__c sendTextMessage(String messageContent, String toPhone){ | |
HttpRequest httpReq = new HttpRequest(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global without sharing class ChatGPTClass { | |
// ChatGPTClass.generateResponse('Hello'); | |
@AuraEnabled | |
public static String generateResponseFromGPT(String queryText){ | |
try { | |
String content = generateResponse(queryText); | |
return content; | |
} catch (Exception e) { |
NewerOlder