Salesforce
Open a Salesforce Case for each Sayvara follow-up ticket, on the customer's Contact, and close or reopen it as the ticket changes.
What it does
When Sayvara opens a follow-up ticket for a customer, for example after a low score, it opens a Case in your Salesforce org:
- Sayvara looks for the customer's Contact by email first, then by phone number. It finds the number in any
common written form, such as
+966 5…,05…or9665…. - If no Contact matches, Sayvara creates one with the customer's name, email and mobile number.
- The Case is opened on that Contact, with the ticket reference, the survey name and the customer's comment.
- The Case follows the ticket. When the ticket is resolved or closed, Sayvara closes the Case. When the ticket reopens, Sayvara reopens the Case.
Sayvara never opens two Cases for the same ticket, even when it has to try again.
Status
Available to owners and admins on a plan that includes integrations. The Salesforce tile is under Other systems on the Integrations page. If you don't see it, write to support@sayvara.com.
What you need first
- In Sayvara: the owner or admin role, and a plan that includes integrations.
- In Salesforce: an administrator who can create custom fields and a connected app.
- Your My Domain host, for example
acme.my.salesforce.com. - On the Case object, these picklist values must be active: Origin
Web, and StatusClosedandWorking. Sayvara uses them for the Cases it opens, closes and reopens.
Set it up
1. In Salesforce: add the reference field
On the Case object, create a Text custom field, for example Sayvara_Ref__c. Tick External ID and
Unique. Sayvara writes its ticket ID here, so a retry finds the Case instead of opening a second one.
2. In Salesforce: create a connected app
- Create a connected app with OAuth settings switched on.
- Add the OAuth scope Manage user data via APIs (api).
- Switch on the Client Credentials Flow.
- In the app's policies, set the Run As user. Sayvara works as this user, so the user must be able to read and create Contacts, and read, create and edit Cases.
- Copy the app's Consumer Key and Consumer Secret.
3. In Sayvara: connect
- Go to Integrations. Under Other systems, on the Salesforce tile, select Set up CRM.
- On the Salesforce card, select Connect.
- Fill in the form:
- My Domain host: for example
acme.my.salesforce.com. - Client ID: the Consumer Key.
- Client secret: the Consumer Secret. It is stored safely and never shown again.
- Reference field: the field from step 1, for example
Sayvara_Ref__c. - Language of the text Sayvara writes into the CRM: Arabic or English.
- My Domain host: for example
- Select Connect. Sayvara checks the values with Salesforce before it saves anything. The card then shows Connected.
4. Optional: field mapping
You can send more values into your own Case fields. On the Salesforce card, select Field mapping. For each value,
type the API name of a custom field on Case (it ends in __c), or leave it empty to skip it:
- Score, Survey name, Channel, Branch, Customer comment, Link to the ticket.
Select Save mapping. Each field can take one value only.
5. Optional: map inbound fields and test
To bring Salesforce contacts into Sayvara, tell Sayvara which Salesforce Contact field fills which Sayvara field.
- On the Salesforce card, select Inbound mapping.
- Under Contact fields, select Add a contact field. Choose the Sayvara field, for example Name, Email, Phone, Language, City or Branch, and type the CRM field (its API name in Salesforce).
- Add more rows as needed. Each Sayvara field can be filled once.
- For a field with fixed values, such as Language, add a Value list: each CRM value and the Sayvara value it becomes. A CRM value that is not in the list is used as it is when it matches.
- Select Save mapping. You see Inbound mapping saved.
The window also has Ticket fields (read from the Salesforce Case), such as Priority and Root cause, and Response values: named values kept with the customer's responses, for filters and reports.
Once contact fields are mapped, Sayvara keeps importing Salesforce contacts that change, matched by mobile number, else email. An import never gives consent and never clears an opt-out.
Test the mapping first
In the same window, in the test section with the Run test button:
- Choose the Records per type, from 1 to 10.
- Select Run test.
Sayvara reads the newest records from Salesforce and shows, for each Record, the Sayvara values it would make and what is Left out, with the reason, for example not a valid email or no branch with this name. Nothing is stored.
Data shared
| Direction | What |
|---|---|
| Sayvara to Salesforce | A new Contact, only when none matches: name, email and mobile number |
| Sayvara to Salesforce | A new Case: subject, description (the customer's comment and the ticket reference), origin Web, priority (High, Medium or Low, from the ticket), the Contact, and your mapped fields |
| Sayvara to Salesforce | Case status: Closed when the ticket is resolved or closed, Working when it reopens |
| Salesforce to Sayvara | Contacts, with the fields you map in Inbound mapping. Without a map, Sayvara only reads Contacts to find the customer, and the status of its own Cases |
The subject reads, for example, "Customer follow-up FU-1042: Branch visit survey". It is written in the language you chose.
What it does not do
- Changes you make to the Case in Salesforce do not change the ticket in Sayvara.
- Contacts come in from Salesforce only for the fields you map in Inbound mapping.
- Tickets opened before you connected, or more than 30 days ago, do not get a Case.
- A ticket whose customer has no email or phone number does not get a Case.
- One Salesforce org per Sayvara organisation.
See the case on a ticket and retry
Open a ticket in Sayvara. The panel CRM case shows the case number, its status in Sayvara and its status in Salesforce, as last read. Sayvara reads the status from Salesforce every few minutes, so it may be a little behind.
If Salesforce refused the case, the panel says Salesforce did not accept this case. Owners and admins see Try again:
- Fix the cause first, for example the connection or a field in Salesforce.
- Select Try again. You see Sayvara will send this case to Salesforce again in a moment.
If the Salesforce connection is paused, Sayvara says so. Select Resume on the Salesforce card, then try again.
Test, pause or disconnect
On the Salesforce card in Integrations > Set up CRM:
- Test now asks Salesforce for a Case and a Contact. The card shows the result of the last test.
- Pause stops new Cases and status changes. Resume starts them again.
- Disconnect stops Sayvara writing to Salesforce and removes the secret. Cases already in Salesforce stay there.
If Salesforce cannot be reached, Sayvara tries again with a growing wait, up to 10 times.
Troubleshooting
| Message | What to do |
|---|---|
| The CRM refused the client ID or secret. | Check the Consumer Key and Secret, that the Client Credentials Flow is on, and that a Run As user is set. |
| The CRM could not be reached. Try again in a minute. | Check the My Domain host. Try again in a few minutes. |
| This CRM is already connected. | Your organisation already has a Salesforce connection. Disconnect it first to connect another org. |
| Use custom fields only (Salesforce: ending in __c; Dynamics 365: with your publisher prefix). | Use the API name of a custom field, ending in __c. |
| Check the values: a host, ID or field is not in the expected form. | The host looks like acme.my.salesforce.com, and the reference field ends in __c. |
| Your plan does not include integrations. | Ask us about a plan with integrations. |
| Only owners and admins can connect a CRM. | Ask an owner or admin. |
Was this page helpful?
Thanks. Need more help? Email support@sayvara.com