How to use Salesforce Field Service Mobile Flow in app AND lightning web - salesforce-lightning

I am designing a Field Service Mobile Flow for a Salesforce instance (release Winter '23 Patch 17.7) using the Field Service Lightning package to manage technicians with service appointments in the field. The flow will be presented to technicians in the field in the Salesforce Field Service Mobile (FSM) app on iOS devices.
This flow will be added as quick action on a specific object, e.g. a ServiceAppointment object. Hence it will be presented in the app to the technician to execute the flow. Additionally, quick actions are also shown in the lightning web view of the object, enabling to execute the same flow, even though it is a Field Service Mobile Flow.
The challenge occurs, when trying to use the Id of the calling record (here the ServiceAppointment) as input.
The FSM app provides the Id of the calling object as variable Id, while a flow executed from the lightning web view passes the variabled recordId.
How can one handle this to use the same Field Service Mobile Flow in the FSM app AND in web lightning view.

I added a subflow to retrieve the origin of the call, differentiating between the two input variables, and setting an output variable current_record_id accordingly.
The condition checks, wether the input variable Id or the input variable recordId is set and assigns the output variable current_record_id accordingly.
You might already spot the actual challenge. The behaviour of not-provided variables is different in the FSM app, the web call and (to make it even worse) when debugging the flow.
The following table shows my checks for the different origins and the resulting outcome (which check proofs as true)
Path
Call flow from
outcome
1
FSM app (provides Id)
recordId is null
2
Lightning Web (provides recordId)
Id is empty
3
Flow designer debug (recordId provided)
Id is null
4
Flow designer debug (Id provided)
recordId is null
hence we have to explicitly check for null OR empty for the missing variable.
Now you can use four Field Service Mobile Flow via a quick action the Field Service Mobile App, in Salesforce Lightning and in the Flow Debugger successfully.

Related

How to pass cognito ID into amazonEventbridge from Amazon location service in order to invoke Lambda with id as paramater

I have a mobile app in swift. I am using AWS technologies. For all my users I have created only one tracker that is linked to several geofences. I want that when a certain user enters the geofence, a lambda function will be triggered, and as parameter of the lambda function I want to pass the cognitoID, how would I do that?
I want to invoke the lambda function not on my mobile app, however through amazon eventbridge and still pass the cognito Id
I am expecting the overall high level and if possible especifics and also where can I find the information for it.

Azure Communication Services logs don't seem to show the caller's ID

I implemented Azure Communication Services for a p2p video application.
Callers application uses the ACS mobile SDK, whereas callees use a web app and the web SDK.
In the call log table in log analytics (ACSCallSummary) I find two entries per call, with the same correlationID. The record for the callee correctly has the ACSID in the "identifier" field. The record for the caller doesn't (Identifier is empty: for example in correlationID 97001b82-d875-4fa2-957f-900b9e6d168e)
How can I count the calls made by a user if the caller's record in log analytics doesn't show the acs id?

Facebook marketing API Does not select the correct pixel conversion event

I'v built an app that creates ads using the marketing API. When it creates the adset it sets a specific pixel and a page view event.
All our users get the correct pixel and the correct event except for one user.
Here is the object from the post request that is being sent to Facebook where we can see that they are equal
User one
"promoted_object":"{\"pixel_id\":xxxxxxxxxx63,\"custom_event_type\":\"CONTENT_VIEW\",\"pixel_rule\":\"{\\\"event\\\":{\\\"eq\\\":\\\"PageView\\\"}}\"
User two
"promoted_object":"{\"pixel_id\":xxxxxxxxxx63,\"custom_event_type\":\"CONTENT_VIEW\",\"pixel_rule\":\"{\\\"event\\\":{\\\"eq\\\":\\\"PageView\\\"}}\"
Both get the correct pixel with the correct id but one gets no conversion event, and say Missing conversion event.
Both ad accounts have full access to the pixel under the business settings in ads manager.
Here is an image that describes the issue.
Anyone have any ideas here?
make sure the conversion event is defined in that account.
The conversion event is usually set on Campaign Level and supplied when you create a campaign via API.
As you're trying to use a custom conversion it might be that you've created it for one account but didn't create it for another. That's why you don't see it in you campaign setup view. You can create it via API as described here:
Custom Conversion API
Or just do it via Business Manager and use it afterward when creating you campaigns via API or manually.
It's definitely not a request that fails in this case but a proper account configuration.

Do Google Actions have unique ids?

When developing for Alexa, every skill has a unique Id. This allows me to develop multiple skills, using the same lambda / codebase, that return unique info based on the skill id.
However, from what I've seen with Google Assistant, Actions don't have ids. Requests include a unique userId and the conversationId. And Responses include an intent id -- but there's no way to identify the action itself.
Any ideas / pointers to things I may have missed?
There are a few ways you can approach this, depending on what platform you're using for your webhook.
For both Dialogflow and the Action SDK, you can always specify a unique query parameter as part of the webhook or even have different path portions of the webhook go to the same lambda and examine either the query value or the path. This has the benefit that you're in full control of what the possible values are.
If you're using Dialogflow, there is a unique IntentID for each Intent that comes through. This might be one way to track which one has been invoked. But this seems somewhat kludgy.
Also for Dialogflow, you can set unique headers in the Dialogflow console, and then examine the value of these headers in your webhook. Again, this has the advantage of giving you control of the value.
The Action SDK doesn't have that feature, but it does transmit a JWT token in the Authorization header. This token is for verifying it has come from the correct project (and from Google), but once you've decoded it (and verified it), the aud field should contain the same project ID as the project in the Action Console.

Populating new form data from REST api

I've come from a background of ASP.Net MVC where when the user wants to create a new entity the server returns values to populate drop down lists(for example).
Now I'm doing a UI that is invoking a REST Api. I have my urls for creating/retrieving etc but this is purely for actual resources. How would the REST be defined to get data to populate the create form.
For example:
a user wants to create a new order. They go to the 'create order' screen and need to select their payment method. They have 3 payment methods (card, paypal, amazon) but the logic on the server side knows that amazon cannot be accepted on this order. How would I go about letting the UI know what can be populated in the drop down list using REST?
I can't seem to get this to fit into REST principles but then I don't want the user to submit amazon and then the server return a Bad Request, just seems bad implementation.
Thanks