# Assistance Needed with Initial Sync of State from ADO to Salesforce

**URL:** <https://community.exalate.com/t/assistance-needed-with-initial-sync-of-state-from-ado-to-salesforce/5680>\
**Category:** General Questions\
**Tags:** cloud-salesforce, usecase, azuredevops, salesforce-azure, migrated\_question\
**Created:** [November 4, 2024, 8:21am UTC](https://community.exalate.com/t/assistance-needed-with-initial-sync-of-state-from-ado-to-salesforce/5680 "2024-11-04T08:21:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xl8bot](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/xl8bot/32/324_2.png) [@xl8bot](https://community.exalate.com/u/xl8bot)\
**Post date:** [November 4, 2024, 8:21am UTC](https://community.exalate.com/t/assistance-needed-with-initial-sync-of-state-from-ado-to-salesforce/5680/1 "2024-11-04T08:21:28Z")

</div>

_Originally asked by Kaleigh Garcia on 17 October 2024 [(original question)](https://oldcommunity.exalate.com/questions/128024590)_

* * *

Hello!

I’m experiencing an issue with our Exalate sync setup between ADO and Salesforce where the `State` field from ADO does not sync over to the Salesforce record `Status` during the initial connection. It only appears after the `State` has been modified post-connection, rather than on the first sync.

Our setup is designed to connect existing records without creating duplicates in ADO by marking them accordingly. So, we then need to Connect the items within ADO through the Exalate panel.

We currently have mapping `State` to a `Status` field in Salesforce. That’s why you see `State` (ADO) → `Status` (SF)

Here is the relevant portion of our **ADO Outgoing** script:

```auto
/* ADO OUTGOING */
replica.key = workItem.key;
replica.assignee = workItem.assignee;
replica.status = workItem.state;
replica.substate = workItem.substate;
replica.project = workItem.project;
replica.areaPath = workItem.areaPath;
replica.iterationPath = workItem.iterationPath;
replica.AddedToSprintDate__c = workItem."Custom.AddedtoSprintDate";
replica.AddedToReleaseDate__c = workItem.customFields."Added To Release Date";
replica.ReleaseNotes__c = workItem.customFields."Release Notes";
replica.attachments = entity.attachments;

```

And here is the key portion of our **Salesforce Incoming** script:

```auto
// Salesforce Incoming
if(firstSync){
    entity.entityType = "TechItem__c";
}
if(entity.entityType == "TechItem__c"){
    entity.UniqueKey__c = replica.key;
    entity.Status__c = replica.status?.name;
    entity.Assignee__c = replica.assignee?.displayName;
}

```

The goal is to have the `State` from ADO appear on the connected Salesforce record `Status` on the initial Connection, but it currently only updates after a `State`change in ADO. I’d appreciate any guidance on possible adjustments to ensure the `State` field in ADO transfers over the `Status on`the initial Connection/Sync.

Thank you in advance for your help! I’m sure this is likely something simple I’m missing. I just haven’t had luck with the testing I’ve performed.

```auto
  

```

* * *

---

<div class="post-metadata">

**Author:** ![Javier](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/javier/32/338_2.png) [@Javier](https://community.exalate.com/u/Javier)\
**Post date:** [May 23, 2025, 2:17am UTC](https://community.exalate.com/t/assistance-needed-with-initial-sync-of-state-from-ado-to-salesforce/5680/2 "2025-05-23T02:17:00Z")

</div>



---

<div class="post-metadata">

**Author:** ![Javier](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/javier/32/338_2.png) [@Javier](https://community.exalate.com/u/Javier)\
**Post date:** [May 23, 2025, 2:17am UTC](https://community.exalate.com/t/assistance-needed-with-initial-sync-of-state-from-ado-to-salesforce/5680/3 "2025-05-23T02:17:21Z")

</div>



---

<div class="post-metadata">

**Author:** ![Javier](https://dub1.discourse-cdn.com/flex018/user_avatar/community.exalate.com/javier/32/338_2.png) [@Javier](https://community.exalate.com/u/Javier)\
**Post date:** [May 23, 2025, 2:17am UTC](https://community.exalate.com/t/assistance-needed-with-initial-sync-of-state-from-ado-to-salesforce/5680/4 "2025-05-23T02:17:23Z")

</div>


