Closed dylanexpensify closed 3 months ago
Triggered auto assignment to @greg-schroeder (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
Job added to Upwork: https://www.upwork.com/jobs/~015bae9383e2075bb8
Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura (External
)
The problem we are trying to solve is that the Sage Intacct subsidiary is not shown on the Connections card under the Sage Intacct logo after connecting to Sage Intacct from the Workspace settings.
The root cause of this problem is likely due to an incorrect implementation of the Sage Intacct API or a misconfiguration of the connection settings, which prevents the subsidiary information from being retrieved and displayed on the Connections card.
To solve this problem, we need to review and adjust the Sage Intacct API implementation to ensure that it correctly retrieves and displays the subsidiary information on the Connections card. Specifically, we should verify that the Sage Intacct web services user ID, password, and Company ID are correct and properly configured, check the XML API calls to ensure that they are correctly formatted and include the necessary fields to retrieve the subsidiary information, and review the code that handles the connection to Sage Intacct and the display of the Connections card to ensure that it is correctly parsing and displaying the subsidiary information.
// Verify Sage Intacct credentials and connection settings
const sageIntacctCredentials = {
userId: 'your_user_id',
password: 'your_password',
companyId: 'your_company_id'
};
// Set API endpoint and headers
const endpoint = 'https://api.intacct.com/ia/xml/xmlgw.aspx';
const headers = {
'Content-Type': 'application/xml',
'Authorization': `Basic ${sageIntacctCredentials.userId}:${sageIntacctCredentials.password}`
};
// Set XML payload to retrieve subsidiary information
const payload = `
<?xml version="1.0" encoding="UTF-8"?>
<request>
<control>
<senderid>${sageIntacctCredentials.companyId}</senderid>
<password>${sageIntacctCredentials.password}</password>
<controlid>string</controlid>
<uniqueid>false</uniqueid>
<dtdversion>3.0</dtdversion>
</control>
<operation>
<authentication>${sageIntacctCredentials.companyId}</authentication>
<get>
<object>subsidiary</object>
</get>
</operation>
</request>
`;
// Send request to Sage Intacct API
const response = await fetch(endpoint, {
method: 'POST',
headers,
body: payload
});
// Parse response to retrieve subsidiary information
const subsidiaryInfo = await response.xml();
if (subsidiaryInfo) {
// Display subsidiary information on Connections card
console.log('Subsidiary information:', subsidiaryInfo.text);
} else {
console.error('Failed to retrieve subsidiary information');
}
Proposal review underway
@greg-schroeder not much to review here. Unfortunately, @kabeer95's proposal looks like a generic GPT-generated answer (they've been warned about such proposals in the past, but nothing really changed): generic self-repeating sentences with no App-specific code links, etc.
Word, thanks @paultsimura
Hello, I was implementing this feature, so you can assign me to this 😄. I though that having no entity chosen is a viable option and means "syncing at a top level" as mentioned in design doc. But now when I think of it, we don't give the user an option to come back to Top Level sync, so we surely need to address it. How should Entities work in Sage Intacct @yuwenmemon? When we connect to Intacct, should entity be chosen arbitrarily? How to show that user is syncing at a top level(I think that showing no entity chosen is a bac way to indicate this)?
📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
@SzymczakJ We show the option as "Top Level". I'll even share with you the JS from OldDot:
// create entities selector
let entities;
let entitiesClass = '';
if (!_.isEmpty(data.entities)) {
entitiesClass = 'hasEntities';
const entitiesOptions = _.map(data.entities, entity => ({value: entity.id, text: entity.name}));
entitiesOptions.unshift({value: '', text: 'Top level'});
entities = (
<div className="form xl-labels rowGaps">
<label htmlFor="intacct_entities">Top or entity level sync</label>
<React.c.FormElementSelect id="intacct_entities" options={entitiesOptions} defaultValue={config.entity} onChangeCallback={this.changeEntity} />
</div>
);
}
How to show that user is syncing at a top level(I think that showing no entity chosen is a bac way to indicate this)?
So based on the above, we should show an explicit "Top Level" option.
cc @ryanldonato
So basically we should translate missing entity field or entity set to ""
to a Top level option, right?
Yep!
Hey @yuwenmemon – will this PR require C+ review? If so – could you please help me get access to the testing doc? I've requested but haven't gotten access yet.
Sorry @paultsimura it will not require C+ review, I'll unassign here.
Triggered auto assignment to @tgolen, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.17-2 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-08-14. :confetti_ball:
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
I don't think we need to treat this as a regression. As pointed out above, this was just something missed during implementation.
Related to this regression suite update - https://github.com/Expensify/Expensify/issues/414754#issuecomment-2278409936
@SzymczakJ I'm still able to reproduce that the Intacct Entity is not displayed on the latest staging build:
I've also stumbled upon such bug once, it comes from Sage Intacct connection object not being connected properly causing entity object to be empty. Did it fix after reconnecting/relogging @isagoico? I noticed sometimes connection action fails and we get such "not complete" objects in connections
I'm not able to see the option even after disconnect > reconnect or refreshing the page.
There aren't any payments due here from my end. Should we close this is or the above discussion still unresolved?
@greg-schroeder let's keep this discussion for a moment. Cannot reproduce on my end but I've checked frond-end code and it seems like it might be related to BE.
it comes from Sage Intacct connection object not being connected properly causing entity object to be empty.
@NikkiWines @yuwenmemon are there any BE issues related to connecting to Sage intacct?
I'll OOO the whole next week but feel free to ask @war-in, as he has a lot of context.
@greg-schroeder let's get @war-in assigned here to keep it moving? @yuwenmemon @NikkiWines can you confirm @SzymczakJ's query here?
@NikkiWines @yuwenmemon are there any BE issues related to connecting to Sage intacct?
There could be a multitude of errors. However, I, too, am unable to reproduce it on my end. @isagoico would you be able to spin up an issue with reproduction steps?
And then I think we can close this issue out.
Oooooh wait I know what's happening. @isagoico You're using the QA account right? That one doesn't use subsidiaries/entities. You can confirm this by looking at the same connection in OldDot, there is no entity selector there either. So, this is working as expected:
Ah! My apologies for this then 🫠 I think we can close this one out if it's a expected configuration on the QA account
Testing doc: here (request, will share)
Pre-testing steps
Daily
or “slower”Pre-testing steps
Steps:
Connect
Expected result: Once connected, the Sage Intacct subsidiary is shown on Connections card under Sage Intacct logo + Last synced message Actual result: The Sage Intacct subsidiary is not shown on Connections card under Sage Intacct logo + Last synced message
Screenshot:
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @greg-schroeder