Skip to main content

#Salesforce Scheduler0 debatiendo

I have a requirement to expose the salesforce scheduler to an external users for appointment booking and we have the complete scheduling functionality built using flows(screen), when I create a site for external users and expose the flow related to the scheduling I am not able to create the Assigned Resource record. I have given all the necessity access to that External Guest User Profile and also provided the required Sharing Settings rules.

 

Error Occurred: This error occurred when the flow tried to create records: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: entity type cannot be inserted: Assigned Resource.

 

CREATE RECORDS: Assign Resource to Appointment

Create one AssignedResource record where:

IsRequiredResource = true

ServiceAppointmentId = {!Create_Service_Appointment} (08p7j000000)

ServiceResourceId = {!selectedServiceResourceId} (0Hn7j0000008*******)

Result

Failed to create record.

 

Error Occurred: This error occurred when the flow tried to create records: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: entity type cannot be inserted: Assigned Resource. You can look up ExceptionCode values in the SOAP API Developer Guide.

4 respuestas
0/9000

I've cloned Fix Schedule Overlaps flow. Currently, for debugging purposes it has only one Create Records element.Fix Overlaps by Using an Automated Scheduling Flow (Beta) - what triggers a flow?After reading a documentation and making a few tests I have the following questions:

1. Is it correct that a flow above isn't triggered when a service appointment's duration is decreased/increased by using Adjust Duration action and this appointment doesn't have another appointment to overlap with?

2. Is it correct that the only cases when a flow above is triggered are when a service appointment's duration is decreased/increased by using Adjust Duration action and this appointment does have another appointment to overlap with?

3. Which time zone is taken into account while filling in end and start flow variables? For both operating hours and company default time zone I have (GMT+03:00) Eastern European Summer Time (Europe/Kyiv) and I run a logic at 6 PM (6/12/2024) as a result for end and start flow variables I have 6/13/2024, 3:00 AM and 6/14/2024, 3:00 AM.

4. Could I invoke the logic which is invoked by Check If Overlap Is Today and Fix Schedule Overlaps flow actions from Apex?

5 respuestas
0/9000

Hello...does somebody have experience with translation of salesforce scheduler? How we can translate components? What I see in setup it is possible to translate only labels of fields and objects. 

Hello...does somebody have experience with translation of salesforce scheduler? How we can translate components? What I see in setup it is possible to translate only labels of fields and objects.

 

#Salesforce Scheduler

2 comentarios
0/9000

We currently have more than 10 consultants available but scheduler shows up only 10 service resources.  On the component field 'Number of Resources to Show (Appointment Distribution)', We try to change from 10 to 20 and then 10 to 5 service resources but it doesn't work. Does anyone has an idea on this issue? How to show more than 10 service resources in scheduler window?

3 respuestas
  1. Michael Brown (Salesforce) Forum Ambassador
    1 sept 2023, 14:16

    Actually, according to this document it sounds like the maximum is 10: https://help.salesforce.com/s/articleView?id=sf.ls_flowscreencmp_select_srvc_resource_and_time.htm&type=5

     

    You might have to break it into two screens where you first use the Select Service Resource component and then select the time slots on a separate screen.

0/9000

Hi good night everyone, i have an issue while i was configurating shcedule , i already made the permission sets and i have active my service territory  registers , but still when im doing the appointment i cant select any terrytory service because  it shows me this error " Ask your Salesforce admin to enable the Maps and Locations permission". anything is usefull thank you 

 

#Salesforce Scheduler

1 respuesta
  1. Divs Chauhan (kcloud) Forum Ambassador
    6 mar 2024, 05:55
0/9000

I downloaded a Trial Org to test out the functionality, but I was hoping that someone with experience using this product could let me know if my business scenario is something that could be made easier by using the Scheduler before I spend too much time testing.

 

I am working with a client that hosts product pickups at different locations. There is only 1 product, but each location has a different capacity for this product and different hours of operation. The customers would need to be able to access the company's Website to schedule a pickup at one of these locations, and if they are a first time customer, create a new Contact record.

 

Currently, they use custom code and Visualforce for this, and I am hoping to replace this code and interface with the scheduler, as the historical code is a mess and causing issues all over the Org. Based on the Salesforce Help pages and other resources, I believe the Scheduler should be able to work for this business case, but I want to make sure before suggesting this solution to the client. Any help with understanding limitations or considerations would be appreciated. Thanks in advance

 

@* Salesforce Field Service * 

3 respuestas
  1. 29 ene 2024, 14:53

    Hi Thomas, 

    Based on the description of your use case, Scheduler would seem to be a very good fit for your customer. 

    The basic building blocks for Scheduler are: 

    1. Appointment topic (work type group object)would seem to be simply product pickup. 

    2. Appointment details (work type) would seem to be pretty consistent regardless as to the pickup location (service territory). 

    3. The Service Territory definition can include operating hours. 

    4. The Service Resources could likely be defined as assets as opposed to individuals/users.  I am assuming that any available person at the location can help the customer with the pickup.  

    5. You could likely allow for concurrent scheduling. 

     

    The only item/issue that would require a bit of further discussion is how to account for the different capacity at each pickup location. I will reach out to you offline to discuss this further.  

0/9000

Hi, with the below code email is not getting sent out. Can you please let me know what's missing in my code?

 

global class InvoiceReminder implements Schedulable {

    global void execute(SchedulableContext sc) {

        sendReminderMailToKAM();

    }

 

    public void sendReminderMailToKAM() {

        List<Messaging.SingleEmailMessage> masterListMails = new List<Messaging.SingleEmailMessage>();

 

        // Query invoices with Pending_POD__c

        List<Invoice__c> invoices = [SELECT Id, Invoice_Number__c, Name, CreatedDate, Hospital__r.Name, Hospital__r.AccountNumber, Hospital__r.KAM_Email_ID__c, Reminder_Date__c

                                     FROM Invoice__c

                                     WHERE Pending_POD__c > 0];

 

        // Group invoices by KAM Email

        Map<String, List<Invoice__c>> kamToInvoicesMap = new Map<String, List<Invoice__c>>();

        for (Invoice__c invoice : invoices) {

            Integer reminderDays = invoice.Reminder_Date__c != null ? Integer.valueOf(invoice.Reminder_Date__c) : 0;

 

            if (!String.isBlank(invoice.Hospital__r.KAM_Email_ID__c) && (reminderDays == 7 || reminderDays == 14 || reminderDays > 14)) {

                if (!kamToInvoicesMap.containsKey(invoice.Hospital__r.KAM_Email_ID__c)) {

                    kamToInvoicesMap.put(invoice.Hospital__r.KAM_Email_ID__c, new List<Invoice__c>());

                }

                kamToInvoicesMap.get(invoice.Hospital__r.KAM_Email_ID__c).add(invoice);

            }

        }

 

        // Iterate through KAMs and create a consolidated email

        for (String kamEmail : kamToInvoicesMap.keySet()) {

            List<Invoice__c> kamInvoices = kamToInvoicesMap.get(kamEmail);

            if (kamEmail != null && !kamInvoices.isEmpty()) {

                Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();

                email.setToAddresses(new List<String> { kamEmail });

                email.setSubject('Reminder to create POD for the Invoices created');

 

                String baseUrl = URL.getSalesforceBaseUrl().toExternalForm();

                String mailBody = 'Hello, <br><br>' +

                                 'The following invoices are pending POD creation:<br><br>' +

                                 '<table border="1" style="border-collapse: collapse"><tr><th>Invoice Name</th><th>Invoice Number</th><th>Created Date</th><th>Account Number</th></tr>';

 

                for (Invoice__c invoice : kamInvoices) {

                    String invoiceUrl = baseUrl + '/' + invoice.Id;

                    String invoiceName = invoice.Name;

                    String invoiceNumber = invoice.Invoice_Number__c;

                    String createdDate = invoice.CreatedDate.format();

                    String accountNumber = invoice.Hospital__r.AccountNumber;

                    mailBody += '<tr><td><a href="' + invoiceUrl + '">' + invoiceName + '</a></td><td>' + invoiceNumber + '</td><td>' + createdDate + '</td><td>' + accountNumber + '</td></tr>';

                }

 

                mailBody += '</table><br><br>';

                mailBody += 'Thank you, <br>System Admin';

 

                email.setHtmlBody(mailBody);

                masterListMails.add(email);

            }

        }

 

        if (!masterListMails.isEmpty()) {

            Messaging.SendEmailResult[] results = Messaging.sendEmail(masterListMails);

            for (Messaging.SendEmailResult result : results) {

                if (result.success) {

                    System.debug('Email was sent successfully.');

                } else {

                    System.debug('Email sending failed: ' + result.errors[0].message);

                }

            }

        }

    }

}

 

#Apex Class #Salesforce Scheduler 

1 respuesta
  1. 20 oct 2023, 04:20

    Hello @Ekta Khandelwal,

     

    There are a few possible reasons why this might happen, and some possible solutions that you can try.

     

    • One reason is that your scheduled apex class is not running at the specified time or frequency. This could be because you did not schedule it correctly, or because there are other scheduled jobs that are taking up the system resources. You can check and edit the schedule of your apex class by going to Setup > Monitoring > Scheduled Jobs. You can also monitor the status and logs of your apex class by going to Setup > Jobs > Apex Jobs.
    • Another reason is that your email limits are exceeded or your email deliverability settings are not configured properly. Salesforce has limits on the number of emails that can be sent per day and per hour, depending on your edition and license. You can check your email limits by going to Setup > Email Administration > Email Usage. You can also check your email deliverability settings by going to Setup > Email Administration > Deliverability.
    • A third reason is that your email logic or template is not working as expected. This could be because you have errors or typos in your code, or because you have incorrect or missing values in your fields or variables. You can debug your code by using System.debug statements and checking the debug logs. You can also test your email template by using the Send Test and Verify Merge Fields button.

    I hope this helps you.

0/9000

When scheduling an appointment “By work type group, appointment type, or service territory,” I get as far as “Select Candidate” screen before receiving an error message, “You don’t have any service resources available for the selected engagement channel type.” 

Has anyone been successful in getting Salesforce Scheduler working in EC?

I am not sure why it is going to the Select Candidate screen when the appointment was scheduled from the person account, and I have been unable to find any documentation about associating service resources with engagement channels. I have associated the engagement channels with the service resources shift record.

 

#Salesforce Scheduler

2 respuestas
0/9000

I know you can have multiple attendees (service resources), but it seems like its only possible to set up an appointment with a single customer (i.e. Person Account or Contact).

 

Am I missing something or is this a major limitation?

3 respuestas
  1. Michael Brown (Salesforce) Forum Ambassador
    6 oct 2023, 13:52

    Hi Alex, 

     

    Concurrent Scheduling is how I've typically seen this handled, which allows you to let a resource be assigned to multiple appointments at the same time. However, this is really meant to work with self-scheduling as far as I'm aware, so that when customers schedule on their own, they can see a time slot as open even if another customer book. 

     

    If you're doing the scheduling, you would probably have to add in your own logic. The customers can't be added to the same appointment, but what you could do is schedule the appointment for one customer, and then clone it for other customers. In your flow, you could probably build a mechanism for selecting all the customers, using the scheduling components to create that appointment for the first one, and then clone those appointments for the other customers. 

     

    Thanks,

    Mikey

0/9000

🌟Upcoming Event: Ask a Salesforce Scheduler Expert🌟

 

Date/Time: 9/5 @ 10:30 am EST

Topic: Open Forum

REGISTER HERE: https://cs.salesforce.com/events/7013y000000a7lBAAQ

 

This open forum webinar will focus on new Scheduler topics each session and allow you to ask our Experts your Scheduler questions. 

#Salesforce Scheduler

0/9000