How to create a Salesforce trigger to automatically create a case based on an inbound phone menu call.
You must have the following Truly custom fields in your Salesforce instance:
truly_callDurationMinutes
truly_callDurationSeconds
truly_exitNode
Steps to create trigger:
Log into Salesforce and click on the settings icon in the upper right.
Click on Setup
'Quick Find' search for Process Builder
Click New in the upper right to start creating a new process.
Enter in a Name. (The API Name will automatically populate)
The process starts when: A record changes
Click Save
Click + Add object
Object: Task
Start the process: when the record is created or edited
Click Save
Click + Add criteria
Criteria Name: your preference
Criteria for Executing Actions: Conditions are met
Under Set Conditions:
Field:
truly_exitNode
This field checks to see which option they picked in the advanced phone menu.
Operator: equals
Type: String
Value: Set to the name of your exit node.
You can find this by looking at a previous call where the exit node has populated. If you've set a label in the Truly admin console for that particular node, the exit node will populate with this label.
Click Add Row
Field:
truly_callDurationMinutes
ortruly_callDurationSeconds
This field checks that the call was longer than X minutes to filter out calls where reps didn't have long conversations but it can be set to your preference.
Operator: Greater Than
Type: Number
Value: preference (ex: 2 under minute field means over 2 minutes)
Conditions: All of the conditions are met (AND)
Click Save
Click Immediate Actions > Add action
Note: these are all customizable based on your needs.
Action Name: Create Case
Action Type: Case
Set Field Values
Field: Status
Type: Picklist
Value: New
This will set the case that’s created to a Status of New.
Click Add Row
Field: Account ID
Type: Field Reference
Value: [Task].AccountId
This will reference the Account ID from the created task and assign it to the newly created case.
Click Add Row
Field: Contact ID
Type: Field Reference
Value: Name ID > [Task].WhoId
This will reference the Contact ID (who) from the created task and assign it to thee newly created case
Click Save > Activate
If you have any questions or issues, please reach out to the Truly support team at support@truly.co or by clicking your initials in the upper right corner in the desktop app and we’ll be happy to assist!