Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Shopify] Customer/Company Metafields #27542

Merged
merged 25 commits into from
Nov 1, 2024

Conversation

tinestaric
Copy link
Contributor

@tinestaric tinestaric commented Oct 25, 2024

This pull request does not have a related issue as it's part of delivery for development agreed directly with @AndreiPanko
Fixes #26819

Existing metafield engine applied to integrate Customer and Company metafields

Changes done to apply the engine:

  • Extended ShpfyGQLCompany.Codeunit.al and ShpfyGQLCustomer.Codeunit.al GQL query to get metafields with required properties in response. Removed the namespace from query to retreive all metafields.
  • Created 2 new GraphQL queries Shpfy GQL CustomerMetafieldIds and Shpfy GQL CompanyMetafieldIds to make RetrieveMetafieldsFromShopify function work with Company and Customer.
  • Created 2 new IMetafield Owner Type implementation codeunits for Company and Customer
  • Added values to related interface enums
  • Added UpdateMetafield functions in API codeunits to update metafields if there are metafields in response
  • Removed old not working code to update metafields
  • Add Metafields actions to Company/Customer list and card pages.
  • Add owner type Company to GetOwnerType procedure in Shpfy Metafield table
  • Changed parameters in CollectMetafieldIds local procedure in Shpfy Metafield API codeunit to support all Ownet types in function

Fixes AB#556298

@tinestaric tinestaric requested a review from a team as a code owner October 25, 2024 08:58
@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label Oct 25, 2024
PromotedCategory = Process;
PromotedIsBig = true;
PromotedOnly = true;
ToolTip = 'Add metafields to a product. This can be used for adding custom data fields to products in Shopify.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ToolTip = 'Add metafields to a product. This can be used for adding custom data fields to products in Shopify.';
ToolTip = 'Add metafields to a company. This can be used for adding custom data fields to products in Shopify.';

PromotedCategory = Category4;
PromotedIsBig = true;
PromotedOnly = true;
ToolTip = 'Add metafields to a product. This can be used for adding custom data fields to products in Shopify.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ToolTip = 'Add metafields to a product. This can be used for adding custom data fields to products in Shopify.';
ToolTip = 'Add metafields to a company. This can be used for adding custom data fields to products in Shopify.';

PromotedCategory = Category4;
PromotedIsBig = true;
PromotedOnly = true;
ToolTip = 'Add metafields to a product. This can be used for adding custom data fields to products in Shopify.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ToolTip = 'Add metafields to a product. This can be used for adding custom data fields to products in Shopify.';
ToolTip = 'Add metafields to a customer. This can be used for adding custom data fields to products in Shopify.';

PromotedCategory = Process;
PromotedIsBig = true;
PromotedOnly = true;
ToolTip = 'Add metafields to a product. This can be used for adding custom data fields to products in Shopify.';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ToolTip = 'Add metafields to a product. This can be used for adding custom data fields to products in Shopify.';
ToolTip = 'Add metafields to a customer. This can be used for adding custom data fields to products in Shopify.';

onbuyuka
onbuyuka previously approved these changes Oct 30, 2024
@JesperSchulz JesperSchulz added the linked Issue is linked to a Azure Boards work item label Oct 30, 2024
@JesperSchulz JesperSchulz self-assigned this Oct 30, 2024
@JesperSchulz JesperSchulz added the processing-PR The PR is currently being reviewed label Oct 30, 2024
@JesperSchulz
Copy link
Contributor

Had to fix ID clashes:
30313->30366
139621->139541
139622->139543
139623->139548
139624->139549
139625->139547

@JesperSchulz
Copy link
Contributor

@tinestaric, could you update the objects IDs as stated above? You will also need to update the app.json of the test app, by adding the following range:
{
"from": 139541,
"to": 139549
}

When done, I'll merge this PR.

@petemchlk
Copy link
Contributor

Added additional requirements to edit Metafields. In case of import AllCompanies and AllCustomers metafields would be overwritten with values from Shopify before it would be exported.

@JesperSchulz
Copy link
Contributor

@petemchlk, I've already processed this PR internally. Your most recent changes won't be part of this PR 😟 Could you maybe create a new PR for that, once this one is merged? But for this to become merged, I need you to update the ID as instructed above.

@petemchlk
Copy link
Contributor

@JesperSchulz updated IDs, should I remove these additional changes?

@JesperSchulz
Copy link
Contributor

@JesperSchulz updated IDs, should I remove these additional changes?

No, I'll merge them in. Looks like it's a rather limited change 😊

@aholstrup1 aholstrup1 merged commit fe1fe17 into microsoft:main Nov 1, 2024
6 of 8 checks passed
@JesperSchulz
Copy link
Contributor

@JesperSchulz updated IDs, should I remove these additional changes?

No, I'll merge them in. Looks like it's a rather limited change 😊

@petemchlk, you may see that your last changes shortly disappear from this repo again, as we're force syncing the repo code with a version, which doesn't yet contains your last changes. But don't worry, they will be back in a later sync 😊

@petemchlk
Copy link
Contributor

@JesperSchulz updated IDs, should I remove these additional changes?

No, I'll merge them in. Looks like it's a rather limited change 😊

@petemchlk, you may see that your last changes shortly disappear from this repo again, as we're force syncing the repo code with a version, which doesn't yet contains your last changes. But don't worry, they will be back in a later sync 😊

@JesperSchulz thanks! so no need to create additional PR?

@JesperSchulz
Copy link
Contributor

@JesperSchulz updated IDs, should I remove these additional changes?

No, I'll merge them in. Looks like it's a rather limited change 😊

@petemchlk, you may see that your last changes shortly disappear from this repo again, as we're force syncing the repo code with a version, which doesn't yet contains your last changes. But don't worry, they will be back in a later sync 😊

@JesperSchulz thanks! so no need to create additional PR?

Nope, all done 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration GitHub request for Integration area linked Issue is linked to a Azure Boards work item processing-PR The PR is currently being reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Internal] Shopify Contributions
5 participants