Skip to main content

Notifications

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 .
  • 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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans