In omnichannel, I am routing custom object to agents. it is assiging the agents that custom object records. But how can I define compltion of that task? So that new records can be routed to that agent?
Generally, salesforce marks the task to be completed once the work tab is closed by the agent.
As in your case it's the Custom Object that is being routed, so you have to write a trigger on the object to close or mark the related task as completed on some particular criteria.
Related
I am new to salesforce and I am trying working on an integration, where I need to send object schema to a third party system. I was able to create a simple apex class to create a JSON message and send it to an end point.
I am trying to figure out how to automate this, meaning.. I want to trigger this apex class when an new field is created or an existing field is modified in a specific custom object.
Created an apex class to generate a JSON with the list of custom fields in the object and their properties. I want to be able to trigger this automatically when object is updated
There's a "you're doing it wrong" element to it. It's metadata, not data, not so easy to trigger from inside Apex. Salesforce has mechanisms for easy pulling of this info, not pushing. External system can call "describes" with If-Modified-Since, querying EntityDefinition, FieldDefinition with Tooling API...
Even if you pull it off - technically it'll be useless to external system. When you created new field but didn't modify Profiles/Permission Sets yet - attempts to query it will fail. Same error is thrown for genuine syntax errors in SOQL and for "yes, we do have such field but you're not authorised to see it".
If you really want to continue down this path you can look into scheduling Apex (say run every 5 minutes, will that be good enough? Class to check EntityDefinition or Setup Audit Trail and send the message if needed)
I have a service account that should represent the flow for multiple mail-accounts. The flow is started whenever a mail arrives in a mailbox, then a confirmation should be sent after that. Let's assume I have 100 different mail-accounts in the company and the flow should be triggered for all of them, this should be bundled (dynamically) in the service account. How can this be done?
With dynamically I mean not "hardcoded" mail-accounts in the trigger (because they are changing a lot).
I never have used logic apps, but are they a better solution for that?
I have 2 ways for this
WAY-1
You can either use a Distributed list mail where all the members in your team are the members and trigger an email.
WAY-2
I have created a list adding the person column and adding the members to the list in SharePoint and sent mails using that column. Here is the Screenshot of the flow that I used
As I am having a logic app where the trigger is service bus topic subscription. I want to add multiple subscription ("A", "B","C") for the given topic in my logic app service bus topic trigger . Whenever i select topic it only allows me to select single subscription. Is there any way to add multiple subscription from an array or static variables ? if yes then how to add conditions ? I tried using array, but i have to provide the index of the subscription.
I can use multi trigger logic app for all of the subscriptions to achieve what I am looking for, but is there any other way like using some wildcard characters ***** or / or something else which i am not familiar with .
The action supports selecting only one subscription as you have observed.
Multi Trigger Logic App is indeed one way to go about it but note that the designer doesn't support them, and you will be forced to edit only using the code view.
One alternative would be to split your logic app into two
one for your business logic that is triggered by a HTTP request
one (or more) that is triggered by the service bus subscription trigger and calls the first logic app
Another alternative is to leverage the Event Grid Integration in Service Bus, but note that this is currently applicable only for the Premium Tier.
In this approach, the logic app would trigger based on an event message from Event Grid with details of the subscription that has messages ready to process. You would then use the Get messages from a topic subscription action to fetch the messages to process.
I have a SN question about workflow activities. Ideally when a user in an approval group activity rejects the item, catalog tasks are re-opened and approvals re-sent. That works fine. However, in the event that another user rejects the item, we do not want to re-open catalog tasks and re-send approvals. i.e. looping over again. We just want to keep the comments from the second, third and so on approver. Any ideas on how to obtain this functionality?
So just to understand what you're trying to accomplish:
1 user rejects, all other users approve: loop
2 or more users reject: cancel request
The easiest way to do this might be to use the workflow scratchpad and a script in the approval activity.
If you run a 'condition based on a script' in your workflow activity for the approvals, you could write to the workflow scratchpad with the actual number of rejections. Then you could use an if block to govern what happens when you leave the activity.
Alternately, you could add a condition to the approval workflow activity itself; a third option, based on the two existing ones (you can view the contents of any workflow activity condition by double-clicking on it). This would also require 'condition based on a script' to be active.
I need a fairly trivial thing: every time a user changes a salesoforce custom object field, I need to notify the external service about the change.
Either push the notification or somehow log the object change event somewhere in salesforce. (and make the external service regularly check those latest events for any new activity)
Is either of those options possible?
The only info I could find on this issue is this somewhat relevant SO thread, but it's 3 years old and doesn't answer anything.
This can be done by creating a PushTopic and subscribing to it via Streaming API.