# Best way to achieve BuildMap rule functionality in WebServicesAfterOperation rule?

**URL:** <https://developer.sailpoint.com/discuss/t/best-way-to-achieve-buildmap-rule-functionality-in-webservicesafteroperation-rule/100502>\
**Category:** SHF Discussion and Questions\
**Tags:** webservice-connector, rules, aggregation, sailpoint-identity-security\
**Created:** [February 8, 2025, 7:30pm UTC](https://developer.sailpoint.com/discuss/t/best-way-to-achieve-buildmap-rule-functionality-in-webservicesafteroperation-rule/100502 "2025-02-08T19:30:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexFKing](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/alexfking/32/4885_2.png) [@AlexFKing](https://developer.sailpoint.com/discuss/u/AlexFKing)\
**Post date:** [February 8, 2025, 7:30pm UTC](https://developer.sailpoint.com/discuss/t/best-way-to-achieve-buildmap-rule-functionality-in-webservicesafteroperation-rule/100502/1 "2025-02-08T19:30:16Z")

</div>

Hi SailPoint Community,

I have a WebServices source where I would like to compute and set an additional account attribute based on the information returned by the web service call during account aggregation. This can be most naturally achieved with a BuildMap rule, where values from the already-built ResourceObject map can be used to set another value into this map to form the account. This rule however is not available in ISC for this connector type.

I understand that the WebServicesAfterOperation rule can be used instead of a BuildMap rule, but examples I’ve seen more or less have to do the _entire_ transformation from WebService response to the ResourceObject data map, in order to achieve the computation of that one additional attribute.

**Does anyone know if there is a way to achieve this requirement using the WebServicesAfterOperation rule in a way that more closely mirrors the simplicity of a BuildMap rule?**

**And/or, does anyone have an example or template of a WebServicesAfterOperation rule that does something similar?**

I could also do this computation at the Identity Attribute level but I would much rather do it in a connector rule where I can deploy and build myself, vis a vis cloud rule with a review process.

Thank you!

Alex King

---

<div class="post-metadata">

**Author:** ![schattopadhy](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/schattopadhy/32/8854_2.png) [@schattopadhy](https://developer.sailpoint.com/discuss/u/schattopadhy)\
**Post date:** [February 9, 2025, 2:21am UTC](https://developer.sailpoint.com/discuss/t/best-way-to-achieve-buildmap-rule-functionality-in-webservicesafteroperation-rule/100502/2 "2025-02-09T02:21:27Z")

</div>

> [@AlexFKing](#):
>
> WebServices source where I would like to compute and set an additional account attribute based on

@AlexFKing please find a sample after rule for your refrence

```auto
import connector.common.JsonUtil; 
import java.util.HashMap; 
import java.util.Map.Entry; 
import java.util.Map; 
import java.util.List; 
import java.util.ArrayList; 
import javax.net.ssl.HttpsURLConnection; 
import java.io.BufferedReader; 
import java.io.PrintStream; 
import java.io.StringWriter; 
import java.text.SimpleDateFormat; 
import sailpoint.tools.GeneralException; 
import com.google.gson.Gson; 
import org.json.*; 
import sailpoint.integration.*; 
 
 
List list = new ArrayList(); 
Map response = new Gson().fromJson(rawResponseObject, Map.class); 
 
List Finallist = new ArrayList(); 
log.info(\"Get raw response\"+response); 
 
list = response.get(\"Resources\"); 
log.info(\"get List\"+list); 
 
    for(int d = 0; d < list.size(); d++ ){ 
      Map responseMap = (Map) list.get(d); 
 
 
        Map newmap = new HashMap(); 
        newmap.put(\"id\", responseMap.get(\"id\")); 
        newmap.put(\"displayName\",responseMap.get(\"displayName\")); 
       Finallist.add(newmap); 
  } 
 
Map updatedMapInfo = new HashMap(); 
updatedMapInfo.put(\"data\", Finallist); 
log.info(\"Get Final List\"+Finallist);
 
return updatedMapInfo;

```

---

<div class="post-metadata">

**Author:** ![Tushar\_9625](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/tushar_9625/32/9294_2.png) [@Tushar\_9625](https://developer.sailpoint.com/discuss/u/Tushar_9625)\
**Post date:** [February 9, 2025, 6:29am UTC](https://developer.sailpoint.com/discuss/t/best-way-to-achieve-buildmap-rule-functionality-in-webservicesafteroperation-rule/100502/3 "2025-02-09T06:29:41Z")

</div>

Hi Alex,

Use WebServices After Operation Rule.  
Once you have the rule developed as per your requirements, attach it to your “Account Aggregation” Operation.

> **[Web Services After Operation Rule | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/rules/connector-rules/webservices-after-provisioning-rule)**
>
> This rule calculates attributes after a web-service operation call.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [April 10, 2025, 6:30am UTC](https://developer.sailpoint.com/discuss/t/best-way-to-achieve-buildmap-rule-functionality-in-webservicesafteroperation-rule/100502/4 "2025-04-10T06:30:24Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
