Salesforce Order to SAP Business One Draft Order With Attachments


First published on: 08/18/2023/11:26 pm

 

Workflow Description

In this workflow, a scheduled job will call Salesforce at regular intervals (configurable) to retrieve sales orders newly created or updated since the last integration run.

 

When a sales order is added or updated in Salesforce and 'Order Status = Activated', the integration will check a UDF on the SAP Business One draft sales order document called ‘U_V33SB_SFOrderId’, which contains the Salesforce draft sales order ID.

 

If a value exists, the existing SAP Business One draft sales order will be updated. If the draft sales order doesn't exist, it will be created and the ‘sales order id’ from Salesforce will be saved on the draft sales order in SAP Business One in the UDF ‘U_V33SB_SFOrderId.’

 

When a new order is created in Salesforce with an attachment, the workflow will verify if the SAP Business One draft order already contains an attachment entry.

 

If the Salesforce order has attachments but no attachment entry is found in the SAP Business One draft order, the workflow creates a new attachment entry in the SAP Business One draft order.

 

For each attachment in Salesforce, the workflow will check the attachment title against the existing attachments on the SAP Business One draft order.

 

If the attachment doesn't exist on the SAP Business One draft order, the workflow will add the attachments to the draft order, ensuring that all attachments in Salesforce are accurately mirrored in the SAP Business One draft order.

 

Workflow Diagram

Mapping

The following mapping will be applied:

 

Salesforce Order

SAP Business One Draft Order

Comments

Header

 

 

EffectiveDate

DocDate

 

TargetDeliveryDate_c

DocDueDate

 

AccountId

CardCode

GetCardCodeByAccountId Query Result Based on AccountId

 

DocObjectCode

17

Id

U_V33SB_SFOrderId

 

Lines

 

 

Product2Id

ItemCode

GetItemCodeByProductId Query Result Based on Product2Id

Quantity

Quantity

 

ListPrice

Price

 

TotalPrice

LineTotal

 

Details.Id

U_V33SB_SFLinedId

Line Id

 

 

 

 

 

 

Previous

Next


  

Last modified: 08/30/2024/1:36 pm

 

-