
- #If i call from the salesforce app will it record it install
- #If i call from the salesforce app will it record it code
- #If i call from the salesforce app will it record it plus
The next two packages are jsonwebtoken in version 8.3.0 and form-data version 2.3.2.Īfter we added our dependencies to the Functions configuration, create a new Function. The package allows you to make HTTP requests and will talk to the Salesforce API.
#If i call from the salesforce app will it record it plus
Open the Twilio Functions Configuration, click on the plus button and add three entries to the list.
#If i call from the salesforce app will it record it install
In our case we’ll be using three dependencies from npm that we have to install first.
#If i call from the salesforce app will it record it code
Twilio Functions let you host Node.js code directly in the Twilio console. We will do this by using a Twilio Function. Now that we have configured our Salesforce CRM to expose the information, we need to configure Twilio to be able retrieve the information from our Connected App. Our CRM is configured, we have a Salesforce Connected App with an profile attached, and we issued a certificate for OAuth verification. When we later access data from Twilio we request it with a Salesforce user name, make sure the user we use later is in the profile you chose. The profile controls which users have access to this application. Change the permitted users to pre-authorization and press save.īack on the app configuration page add a profile to our app. You now need to add a policy to your app in order to define the access rights. Open Manage Connected Apps and then click on your app name. The last task is to configure roles and permissions. Once we saved our app we get a Consumer Key displayed, copy it to your clipboard or to a file, we have to add it to our serverless function in the next chapter. Add the Perform requests on your behalf at any time and the Access and manage your data scopes. The scope defines the permissions associated with the tokens that you’re requesting. Next select check Use digital signatures and choose the certificate public.crt we created earlier as the digital signature.ĭon’t forget to set the OAuth Scopes for your app. Next we activate OAuth access.Ĭheck Enable OAuth Settings and Enable for Device Flow, a callback URL is automatically filled with a default after we enabled the device flow.

Open the App Manager within the Application section.Ĭlick on New Connected App, first set the App Name, API Name and Contact Email. We need to create a Salesforce App which works as a connection to the CRM system. I suggest using the search box on top of the Salesforce setup page to access the sections we will use from now on. Your account is hosted on one instance, but links will be different from one account to the other.

Please note that Salesforce is a multi-tenancy cloud with multiple instances. The certificate is uploaded to Salesforce and will be used to validate our request. Later we will use the private key to sign our JWT token we send to Salesforce. We have now created a private key and a certificate. Type the following command into your command line. Make sure you have openssl installed on your computer. To get the authentication working we require a X.509 certificate. In case you want to check in depth how the bearer token flow works follow this link. With our pre-authorization this step is skipped and we can directly request data. This is a bit different to the well-known OAuth login on websites where the authentication is requested with a callback. With this method our token is already authorized and therefore this allows a direct server-to-server communication between Twilio and Salesforce. The Salesforce API supports JSON Web Token (JWT) authentication to request a OAuth 2.0 access token. If you don’t have an account yet or you just want to try this tutorial, sign up for a developer account. To do this you will need all administrative permissions on your Salesforce account. We start by setting up the Salesforce API and build our connector to Twilio. This JavaScript code will request call routing data from Salesforce CRM. It allows us to run Node.js code directly on Twilio, without requiring any other hosting environment. In this post we will mainly use the Functions widget. Flows in Studio are built with widgets which is a state or transition in our flow. With this additional context, we can present an IVR tailored to their needs or use that information to intelligently route their call.īefore we get started, if you haven’t yet used Studio, I recommend taking a look at this getting started with Studio guide.

This means, that when a customer calls into your contact center, in realtime, we can ask the CRM for more details about the caller based on their phone number. In this blog post, we will walk through the steps involved in connecting to Salesforce CRM database with Twilio Studio. As it lets you customize your interactions specific to that customer and address their needs promptly. Access to customer context is key to a great customer experience in voice and messaging flows.
