Skip to main content

Hi Team,

We have some business scenarios where we are syncing the orders from BigCommerce, processing that in Acumatica, and Order gets completed and the order status in Acumatica is marked as ‘Completed’.

Now on BigCommerce, the order gets modified and we have to resync the order to get those updates reflected in Acumatica, but during this scenario the connector is not picking up this particular order as this is already marked as completed withing Acumatica.

Can you please suggest the best possible way to achieve this, to re-sync the orders even though those marked completed in Acumatica, through manual or Real Time or through a scheduler sync. The particular build where we are trying to achieve this is 21.119.0030.

 

Thank you in Advance!

 

Hi @vivekm, we got your SR recently about this problem. We will be working to fix it…

However, for now the best way will be to customize it. Here is one of the examples - 

 


Thank you @smarenich for the details, will verify with the suggested approach and reach back if any additional help required.


Hi @smarenich I have verified with the suggested approach but it is not working. Please find below details that I have tried with, please review and suggest the next steps:

  • Order gets synced from BigCommerce to Acumatica with Invoice order template and processed till Invoice, and order status gets updated to Completed.
  • I tried below code (as suggested) to re-sync the same order but with this the above order does not gets picked up.

>PXOverride]
        public FilterResult FilterImport(IMappedEntity record, Func<IMappedEntity, FilterResult> baseHandler)
        {
            FilterResult result = baseHandler(record);

            if (record?.Local?.SyncID != null)
            {
                SOOrder soOrder = PXSelect<SOOrder, Where<SOOrder.noteID, Equal<Required<SOOrder.noteID>>>>.Select(Base, record?.Local?.SyncID);
                if (soOrder != null && soOrder.Status == SOOrderStatus.Completed)
                    return new FilterResult(FilterStatus.None);
            }

            return result;
        }

 

  • I also tried below code as well to re-sync the order but with this also the order does not gets picked up.

public delegate FilterResult FilterImportRestrictorsDelegate(IMappedEntity record);
        uPXOverride]
        public FilterResult FilterImportRestrictors(IMappedEntity record, FilterImportRestrictorsDelegate baseMethod)
        {
            FilterResult result = baseMethod(record);
            MappedOrder order = record as MappedOrder;

            if (order != null && order.IsNew && order.Extern != null)
            {
                if (order.Extern.StatusId == OrderStatuses.Shipped.GetHashCode() || order.Extern.StatusId == OrderStatuses.Completed.GetHashCode())
                {
                    return new FilterResult(FilterStatus.None,
                      PXMessages.LocalizeFormatNoPrefixNLA(BCMessages.LogOrderSkippedExtStatusNotSupported, order.Extern.Id, order.Extern.Status.ToString()));
                }
            }

            return result;
        }

 


@vivekm I think I misunderstood you initially. Since the Order is Completed in Acumatica, it cannot be modified. You see that all the fields are disabled. So the connector cannot modify it too. 

How that happened that Completed order is modified?


Hi @smarenich here is some background on this requirement:

  • Client is using a third party app (Randem) on BigCommerce to fulfill their BigCommerce orders.
  • Using this app the order on BigCommerce gets updated to Shipped status, at this time we are bringing this order in Acumatica with Invoice order template and processing till Invoices, and as a result order status gets updated to completed within Acumatica.
  • After some time this app updates the order status to Completed in BigCommerce. Now the client wants to create a Note Activity to this order in Acumatica for tracking purposes (that this order is pick up etc.) and wants to update Order Description that indicates this Order gets Completed in BigCommerce.
  • At this point the core connector itself is not picking up this order in any of the methods, for example: MapBucketImport(), GetBucketForImport().
  • If we can get this completed order in above mentioned places, we can create the CRM activity, update the order description (using PXDatabase.Update<> operation, if not possible through objects) as required, and close the order process.

@vivekm 

  • At this point the core connector itself is not picking up this order in any of the methods, for example: MapBucketImport(), GetBucketForImport().

One of the ideas that I have here, is that BigCommerce Order date_modified is not updated, when you change Order status is changed. Could you please check it? Because if date_modified is updated connector should call GetBucketForImport. 

May be the option is to change something to trigger update for date_modified ?


Hi @smarenich I verified the suggested scenario and identified that when order is not completed in Acumatica, we are getting the order in respective sales order processor methods. But when it gets completed within Acumatica, we are not getting the order in processor methods.


@vivekm I’m really sorry, but if the date_modified is updated, I do not see any reason why GetBucketForImport is not called in 2021r1 version. May be there is something specific related to how this external application is working. 

We can look deeper, but in this case we need access to the application and review the date_modified field on client’s BigCommerce instance. 


Hi @smarenich shall we create a Developer support ticket and refer to this thread and arrange for access, so that you can assist, can you please suggest ?


Hi @vivekm were you able to find a solution? Thank you!


Reply