🛠️ Example Use Case: Create Case Tool
Let’s say your assistant is talking to a customer who wants to report a complaint. You want the assistant to:- Capture the **customer’s name, contact number **and complaint
- Check if a contact already exists in CRM using the customer’s phone number.
- If found, create a Case and relate it to that contact.
- If not found, create a new Contact, then create the Case record in Salesforce with that new contact.
- Return the Case Number and Case Subject as output.
Create_Case.
This is a great use case for a Flow-based Tool. We’ll use a Salesforce Autolaunched Flow to handle the backend logic while your assistant keeps the conversation going.
🧱 Required Flow Inputs (Match Tool Parameters)
These inputs come from the assistant, so make sure the variable names match exactly in your flow:| Variable Name | Type | Description | Input |
|---|---|---|---|
name | String | Customer’s full name | ✅ |
contact_number | Number | Mobile number with country code | ✅ |
complaint | String | Complaint or issue description | ✅ |
🔁 Make sure these match the Flow input variable names exactly.
🧱 Usesnake_casefor consistency and better integration.
🎁 Flow Outputs
Your flow is returning two variables back to ConverseKit:| Variable Name | Type | Description | Output |
|---|---|---|---|
created_caseid | String | ID of the created Case | ✅ |
created_case_subject | String | Subject line of the new Case | ✅ |
🧭 Steps to Build the Flow
1
Create a New Auto-Launched Flow
- Go to Setup → Flows
- Click New Flow
- Select Auto-Launched Flow (No Trigger)
- Click Create
2
Add Input Variables
- Click New Resource → Variable
- Name:
name - Data Type: Text
- Check Available for Input
- Name:
contact_number(Number, input)complaint(Text, input)
3
Lookup Existing Contact
- Drag an Element → Get Records
- Label: Fetch Contact
- Object:
Contact - Filter:
MobilePhone Equals {!contact_number} - Select Only the first record
- Store all fields
- Connect this to a Decision element
- Label:
Record Found? - Outcome 1: Yes → If
Fetch_Contact.Id Is Null False - Default: No (contact not found)
- Label:
4
Create Records
If Contact Found → Create Case:
- Use Create Records
- Object:
Case - Fields:
ContactId = {!Fetch_Contact.Id}Subject = {!complaint}priority = Medium
- Object:
-
Create
Contactusing:LastName = {!name}MobilePhone = {!contact_number}
-
Create
CaseusingContact.Idfrom above new contact Fields:ContactId =Contact Id from above new conactSubject = {!complaint}priority = Medium
5
Create Output Variables
- Click New Resource → Variable
- Name:
created_case_id - Data Type: Text
- Check Available for Output
- Name:
created_case_subject– Text – Available for Output
6
Add Output Assignment
- Use an Assignment element:
- Assign
created_case_id = Case.Id - Assign
created_case_subject = {!complaint}
- Assign
7
Save & Activate
- Name the Flow:
Create Voice Case - Set API Name:
create_voice_case - Click Activate
Now that your backend logic is ready, it’s time to register this flow as a Tool.
Create Tool
Let’s walk through how to create a Tool
