web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

system entity stage skip in BPF based on a field value in Customer service module.

(3) ShareShare
ReportReport
Posted on by 15
Scenario - based on an optionset value in the first stage of BPF , i want to skip the next stage in bpf .
 
i am working on Case entity main form where it was configured with a BPF "phone to case" , i have added a custom field which is optionset in to the main form and added the same in stage 1(Identify) of BPF.. As per my scenario i need to skip to Resolve Stage when skillSet=javascript.  i have written some js code but its not working as expected .here is the code 
function AdvanceBPF(executionContext) {
    var formContext = executionContext.getFormContext();
    var skillSetVal = formContext.getAttribute("crbaa_skillset").getValue();
    var Stage1 = "15322a8f-67b8-47fb-8763-13a28686c29d";
    var Stage2 = "43705509-726f-499c-9351-6058f9139011";
    var Stage3 = "14f57c64-2bcd-4146-be63-abf69d29a2de";
    
    var entity = {};
    entity["activestageid@odata.bind"] = "/processstages(" + Stage2 + ")";
    entity["traversedpath"] = Stage1 + "," + Stage2;
    var BPFId = "47c0f979-8275-ef11-a670-000d3ac893ab";
if(skillSetVal==878810000){
    
    var req = new XMLHttpRequest();
    req.open("PATCH", Xrm.Utility.getGlobalContext().getClientUrl() + "/api/data/v9.2/phonetocaseprocesses(" + BPFId + ")", true);
    req.setRequestHeader("OData-MaxVersion", "4.0");
    req.setRequestHeader("OData-Version", "4.0");
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function() {
        if (this.readyState === 4) {
            req.onreadystatechange = null;
            if (this.status === 204) {
                alert("Success");
            } else {
                alert("Error");
            }
        }
    };
    req.send(JSON.stringify(entity));
}
else{alert("Not Moved the stages")}
     
}
Can Some one guide me how to skip the stage .
I have the same question (0)
  • Verified answer
    gulshankhurana Profile Picture
    15 on at
    system entity stage skip in BPF based on a field value in Customer service module.
     
    I'm not into code so here's my suggestion for achieving it in a no-code, out-of-the-box way:
     
    Create a solution and add the 'Phone to Case' BPF in that solution.
    Open the BPF by double-clicking on it.
    In the UI that appears, add the needed 'skillset' option set column in the first 'Identify' stage.
    After the Identify stage, add a condition and connect one path of the condition with the 'Resolve' stage.
     
    The following video demonstrates it clearly:
    https://www.youtube.com/watch?v=InUNdHtKZ4E
     
    Kind regards
    Gulshan

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 60

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 16 Super User 2025 Season 2

#2
CU29080825-0 Profile Picture

CU29080825-0 16

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans