Talkdesk enables you to use Studio variables in automations which:
- are associated with an inbound call and;
- allow the use of variables.
For example, if your Talkdesk account is integrated with a CRM like Salesforce, you can create automations that send Studio variables to a Salesforce case, i.e., you will automatically transport the information you gather in Studio to Salesforce.
Let’s say that you request your callers to input their Social Security number via an Input IVR in your Studio flow. After you store that number in a variable, you can create an automation that sends the variable to Salesforce whenever an inbound call ends. Here’s how you can do it:
1. Select Integrations  under the Admin tab.
2. Click on the "Salesforce" option .
3. Click on Add New Automated Task .
4. Choose a Talkdesk event and an associated action . You can only select one of the following events:
- a call is abandoned
- a call is missed
- a call is short abandoned
- a transferred call is answered
- a voicemail is left
- an inbound call ends
- an inbound call is ringing
- an inbound call starts
In our example, we created the following condition:
When an inbound call ends in Talkdesk Internal then create a case in Salesforce
5. (Optional) Add a filter to create a highly targeted automation . This is necessary, for instance, if you have variables with the same name in different published flows (and with phone numbers assigned to them) and you don’t want your automation applied to all of them.
6. Go to the “Description” field and add the variable(s) that you want you present in the Salesforce case . You must add it in the following format:
In our example, we wanted the Salesforce case to include the number stored in the “social_security” variable that we previously configured in one of our flows.
7. Fill out all the remaining fields in your automation.
8. Hit Save in the bottom-right corner of the page.
Note: The variable(s) you include in your automations must always be selected in the Manage Context window. Consequently, they always appear in the agent’s Callbar.