Sync Packet Examples

Example packets for Dynamics Mobile Field Sales application

Complete Push ( packet sent from the ERP )

The packet contains minimum info needed by the mobile app to run properly. The packet is provided in XML format and is supposed to be sent by the ERP to the mobile app via the ERP Push api

<NavMobileSync salesmanCode="DM010002">
  <table tablename="CompanyInfo">
    <r>
      <Country>UAE</Country>
      <City>Dubai</City>
      <Fax>Fax2933</Fax>
      <PhoneNo>23143444</PhoneNo>
      <Address>16 Main Street</Address>
      <Name>Mobile Affairs</Name>
      <VATNum>20090001</VATNum>
    </r>
  </table>
  <table tablename="Currency">
    <r>
      <CurrencyCode>EUR</CurrencyCode>
      <Txt>EUR</Txt>
    </r>
  </table>
  <table tablename="PaymentMethod">
    <r>
      <Description>CSH1</Description>
      <PaymentType>0</PaymentType>
      <Code>01</Code>
    </r>  
    <r>
      <Description>BNK1</Description>
      <PaymentType>1</PaymentType>
      <Code>03</Code>
    </r>  
    <r>
      <Description>CHE1</Description>
      <PaymentType>2</PaymentType>
      <Code>05</Code>
    </r>
  </table>
  <table tablename="SkipReason">
    <r>
      <Description>No fuel</Description>
      <Code>fuel</Code>
    </r>
    <r>
      <Description>Vehicle damage</Description>
      <Code>damage</Code>
    </r>
    <r>
      <Description>No time</Description>
      <Code>notime</Code>
    </r>
  </table>
  <table tablename="UOMConversion">
    <r status="inserted">
      <ItemNo>JOY-FG036</ItemNo>
      <Code>CS-24</Code>
      <Factor>24</Factor>
    </r>
    <r status="inserted">
      <ItemNo>601608</ItemNo>
      <Code>Pack24</Code>
      <Factor>24</Factor>
    </r>
  </table>
  <table tablename="Item">
    <r>
      <No>JOY-FG036</No>
      <Description>125g White Chocolate</Description>
      <SearchDescription>125g White Chocolate</SearchDescription>
      <UnitPrice>10.09</UnitPrice>
      <Inventory>241</Inventory>
      <PriceIncludesVAT>FALSE</PriceIncludesVAT>
      <VATProdPostingGroup>5</VATProdPostingGroup>
      <SalesUnitId>CS-24</SalesUnitId>
      <BaseUnitId>EA-1</BaseUnitId>
      <ItemCategoryCode>CANDY</ItemCategoryCode>
      <ProductGroupCode>SWEETS</ProductGroupCode>
    </r>
    <r>
      <No>601601</No>
      <Description>5 Gallon Water</Description>
      <UnitPrice>3.500000</UnitPrice>
      <SalesUnitId>Case8</SalesUnitId>
      <BaseUnitId>Bottle</BaseUnitId>
      <SuppItemGroupId>01</SuppItemGroupId>
      <VATProdPostingGroup>5</VATProdPostingGroup>
      <PrimaryVendorId>01</PrimaryVendorId>
    </r>
  </table>
  <table tablename="SalesPrice">
    <r>
      <SRT>2</SRT>
      <SRC>Special</SRC>
      <UP>5.200000</UP>
      <SD>1900-01-01T00:00:00+00:00</SD>
      <InventDimId>AllBlank</InventDimId>
      <InventWarehouseId/>
      <InventSiteId/>
      <ITRC>JOY-FG036</ITRC>
      <MINQ>0.000000</MINQ>
      <MAXQ>0.000000</MAXQ>
      <relation>4</relation>
      <ED>1900-01-01T00:00:00+00:00</ED>
      <inventLocationId/>
      <UOC>EA-1</UOC>
    </r>
    <r>
      <SRT>2</SRT>
      <SRC>Special</SRC>
      <UP>110.100000</UP>
      <SD>1900-01-01T00:00:00+00:00</SD>
      <InventDimId>AllBlank</InventDimId>
      <InventWarehouseId/>
      <InventSiteId/>
      <ITRC>JOY-FG036</ITRC>
      <MINQ>0.000000</MINQ>
      <MAXQ>0.000000</MAXQ>
      <relation>4</relation>
      <ED>1900-01-01T00:00:00+00:00</ED>
      <inventLocationId/>
      <UOC>CS-24</UOC>
    </r>
  </table>
  <table tablename="VATPostingSetup">
    <r>
      <TaxBase>0</TaxBase>
      <BPG>11</BPG>
      <PPG>5</PPG>
      <VAT>5.00</VAT>
    </r>
    <r>
      <TaxBase>1</TaxBase>
      <BPG>11</BPG>
      <PPG>5</PPG>
      <VAT>5.00</VAT>
    </r>
  </table>
  <table tablename="DeviceSetup">
    <r>
      <Code>DM010002</Code>
      <Currency>AED</Currency>
      <InventSiteId>S01</InventSiteId>
      <InventWarehouseId>W01</InventWarehouseId>
      <InventLocationId>L01</InventLocationId>
      <LoadSiteId>S02</LoadSiteId>
      <LoadWarehouseId>FG010002</LoadWarehouseId>
      <LoadLocationId>L02</LoadLocationId>
      <UnloadSiteId>S02</UnloadSiteId>
      <UnloadWarehouseId>FG010002</UnloadWarehouseId>
      <UnloadLocationId>L02</UnloadLocationId>
      <DamageSiteId>S02</DamageSiteId>
      <DamageWarehouseId>FG010002</DamageWarehouseId>
      <DamageLocationId>L02</DamageLocationId>
      <SalespersonCode>5637144578</SalespersonCode>
      <SalespersonName>Salesman 2</SalespersonName>
      <SalespersonPhone>122558451</SalespersonPhone>
      <SupportPersonName>Salesman 3</SupportPersonName>
      <BackEndType>apparea</BackEndType>
    </r>
  </table>
  <table tablename="PaymentTerms">
    <r>
      <CashLedgerDimension>5637145326</CashLedgerDimension>
      <Description>10 days</Description>
      <Code>01-10d</Code>
    </r>
    <r>
      <CashLedgerDimension>5637145327</CashLedgerDimension>
      <Description>30 days</Description>
      <Code>02-30d</Code>
    </r>
  </table>
  <table tablename="ReturnReason">
    <r>
      <Code>Damaged</Code>
      <Label>Damaged Goods</Label>
     </r>
    <r>
      <Code>Expired</Code>
      <Label>Expired Goods</Label>
    </r>
  </table>
  <table tablename="SuppItemTable">
    <r>
      <RecId>5637144571</RecId>
      <AccountCode>1</AccountCode>
      <AccountRelation>02</AccountRelation>
      <FromDate>1900-01-01T00:00:00+00:00</FromDate>
      <ToDate>1900-01-01T00:00:00+00:00</ToDate>
      <ItemCode>0</ItemCode>
      <ItemRelation>601601</ItemRelation>
      <MaximumQty>0.000000</MaximumQty>
      <MinimumQty>3.000000</MinimumQty>
      <MultipleQty>3.000000</MultipleQty>
      <SuppDiscPercent>50.000000</SuppDiscPercent>
      <SuppItemFree>0</SuppItemFree>
      <SuppItemId>601602</SuppItemId>
      <SuppItemOnlyOnce>0</SuppItemOnlyOnce>
      <SuppItemOptional>0</SuppItemOptional>
      <SuppItemQty>1.000000</SuppItemQty>
      <SuppLimitType>0</SuppLimitType>
      <SuppTaxItemGroup>Exempt</SuppTaxItemGroup>
      <UnitId>Case10</UnitId>
    </r>
    <r>
      <RecId>5637144572</RecId>
      <AccountCode>1</AccountCode>
      <AccountRelation>02</AccountRelation>
      <FromDate>1900-01-01T00:00:00+00:00</FromDate>
      <ToDate>1900-01-01T00:00:00+00:00</ToDate>
      <ItemCode>0</ItemCode>
      <ItemRelation>601602</ItemRelation>
      <MaximumQty>0.000000</MaximumQty>
      <MinimumQty>3.000000</MinimumQty>
      <MultipleQty>3.000000</MultipleQty>
      <SuppDiscPercent>50.000000</SuppDiscPercent>
      <SuppItemFree>0</SuppItemFree>
      <SuppItemId>601602</SuppItemId>
      <SuppItemOnlyOnce>0</SuppItemOnlyOnce>
      <SuppItemOptional>0</SuppItemOptional>
      <SuppItemQty>1.000000</SuppItemQty>
      <SuppLimitType>0</SuppLimitType>
      <SuppTaxItemGroup>Exempt</SuppTaxItemGroup>
      <UnitId>Case10</UnitId>
    </r>
  </table>
  <table tablename="Customer">
    <r>
      <No>0101923</No>
      <Address>Jeddah</Address>
      <BalanceLCY>0</BalanceLCY>
      <City>Sofia</City>
      <Country>BG</Country>
      <CreditLimitLCY>1000</CreditLimitLCY>
      <CustomerBalance>0</CustomerBalance>
      <Email>demo@dynamicsmobile.com</Email>
      <InvoiceAccount>0101923</InvoiceAccount>
      <Latitude>36.50</Latitude>
      <CustomerDiscGroup></CustomerDiscGroup>
      <Longitude>37.93</Longitude>
      <MultiLineDisc></MultiLineDisc>
      <Name>Yellow Shop</Name>
      <PaymentMethodCode>01-Cash</PaymentMethodCode>
      <PaymTermId>01-Cash</PaymTermId>
      <PhoneNo>0596236180</PhoneNo>
      <CustomerPriceGroup></CustomerPriceGroup>
      <RequireLocationUpdate>0</RequireLocationUpdate>
      <SupplementaryItem>02</SupplementaryItem>
      <VATBusPostingGroup>11</VATBusPostingGroup>
      <HomePage>http://www.dynamicsmobile.com</HomePage>
      <OrgNumber>BG200912</OrgNumber>
      <OverdueAmount>0</OverdueAmount>
      <PostCode></PostCode>
    </r>
    <r>
      <No>0100006</No>
      <Address>Jeddah</Address>
      <BalanceLCY>0</BalanceLCY>
      <City>Jeddah</City>
      <Country>SAU</Country>
      <CreditLimitLCY>0</CreditLimitLCY>
      <CustomerBalance>0</CustomerBalance>
      <Email>demo@dynamicsmobile.com</Email>
      <InvoiceAccount>0100006</InvoiceAccount>
      <Latitude>24.46</Latitude>
      <CustomerDiscGroup></CustomerDiscGroup>
      <Longitude>54.40</Longitude>
      <MultiLineDisc></MultiLineDisc>
      <Name>Marvin and Co</Name>
      <PaymentMethodCode>01-Cash</PaymentMethodCode>
      <PaymTermId>01-Cash</PaymTermId>
      <PhoneNo>966536498593</PhoneNo>
      <CustomerPriceGroup></CustomerPriceGroup>
      <RequireLocationUpdate>0</RequireLocationUpdate>
      <SupplementaryItem>02</SupplementaryItem>
      <VATBusPostingGroup>11</VATBusPostingGroup>
      <HomePage>http://www.dynamicsmobile.com</HomePage>
      <OrgNumber>VAT234222</OrgNumber>
      <VATNum></VATNum>
      <Blocked>1</Blocked>
      <PostCode></PostCode>
    </r>
    <r>
      <No>0100008</No>
      <Address>Jeddah</Address>
      <BalanceLCY>0</BalanceLCY>
      <City>Jeddah</City>
      <Country>SAU</Country>
      <CreditLimitLCY>900</CreditLimitLCY>
      <CustomerBalance>0.00</CustomerBalance>
      <Email>demo@dynamicsmobile.com</Email>
      <InvoiceAccount>0100008</InvoiceAccount>
      <Latitude>0.00</Latitude>
      <CustomerDiscGroup></CustomerDiscGroup>
      <Longitude>0.00</Longitude>
      <MultiLineDisc></MultiLineDisc>
      <Name>Janes Outlet</Name>
      <PaymentMethodCode>01-Cash</PaymentMethodCode>
      <PaymTermId>01-Cash</PaymTermId>
      <PhoneNo>0596236180</PhoneNo>
      <CustomerPriceGroup></CustomerPriceGroup>
      <RequireLocationUpdate>1</RequireLocationUpdate>
      <SupplementaryItem>02</SupplementaryItem>
      <VATBusPostingGroup></VATBusPostingGroup>
      <HomePage>http://www.dynamicsmobile.com</HomePage>
      <OrgNumber>BG2321111</OrgNumber>
      <OverdueAmount>0</OverdueAmount>
      <PostCode></PostCode>
    </r>
  </table>
 
  <table tablename="Inventory">
    <r>
      <InventLicensePlate></InventLicensePlate>
      <InventBatchId></InventBatchId>
      <InventLocationId>VAN01</InventLocationId>
      <InventSiteId></InventSiteId>
      <ItemId>JOY-FG036</ItemId>
      <SumOfAvailPhysical>240.000000</SumOfAvailPhysical>
    </r>
    <r>
      <InventLicensePlate>LP0001</InventLicensePlate>
      <InventBatchId>B001</InventBatchId>
      <WMSInventLocationId>BN1</WMSInventLocationId>
      <InventLocationId>W001</InventLocationId>
      <InventSiteId>Sofia</InventSiteId>
      <ItemId>601601</ItemId>
      <SumOfAvailPhysical>900.000000</SumOfAvailPhysical>
    </r>
    <r>
      <InventLicensePlate>LP0002</InventLicensePlate>
      <InventBatchId>B002</InventBatchId>
      <InventLocationId>BN2</InventLocationId>
      <InventLocationId>W001</InventLocationId>
      <InventSiteId>Sofia</InventSiteId>
      <ItemId>601601</ItemId>
      <SumOfAvailPhysical>120.000000</SumOfAvailPhysical>
    </r>
  </table>
  <table tablename="SalesLineDiscount">
    <r>
      <SalesType>2</SalesType>
      <SalesCode/>
      <LineDiscountAmount>0.0000000000000000</LineDiscountAmount>
      <Type>0</Type>
      <Code>601606</Code>
      <LineDiscountPercent>3.0000000000000000</LineDiscountPercent>
      <minQuantity>0.0000000000000000</minQuantity>
      <maxQuantity>5.0000000000000000</maxQuantity>
      <relation>5</relation>
      <UnitofMeasureCode>Pcs</UnitofMeasureCode>
    </r>
    <r>
      <SalesType>2</SalesType>
      <SalesCode/>
      <LineDiscountAmount>0.0000000000000000</LineDiscountAmount>
      <Type>0</Type>
      <Code>601606</Code>
      <LineDiscountPercent>5.0000000000000000</LineDiscountPercent>
      <minQuantity>6.0000000000000000</minQuantity>
      <maxQuantity>10.0000000000000000</maxQuantity>
      <relation>5</relation>
      <UnitofMeasureCode>Pcs</UnitofMeasureCode>
    </r>
  </table>
</NavMobileSync>

Sales Order (sent to the ERP)

The following example is a Synchronization packet sent from the Dynamics Mobile Field Sales application to the ERP as a result of a new Sales Order submitted from the mobile user. It contains:

  • One CustomerActivity record, which describes the event

  • One SalesHeader record, which describes the sales order totals

  • Two SalesLine records, which describes the two lines of the order

The CustomerActivity.Action field has value of 0, which means Sales Order

The SalesHeader.DocumentType field has value of 0, which means Sales Order

[
  {
    "DMS_ROWID": "a66afc01-34cc-479f-b62e-5b9d59788756",
    "CustomerNo": "C0004",
    "CustomerTitle": "Green Shop Ltd.",
    "DocumentNo": "1",
    "IsDistanceValid": true,
    "VisitNo": "V001",
    "OnDate": "2020-06-12T12:40:47.371Z",
    "InRoute": 1,
    "Distance": 5284754,
    "cLong": 23.2734631,
    "Lat": 42.6881074,
    "Action": 0,
    "Amount": 220,
    "state": 1,
    "objectTableName": "SLA_CustomerActivity",
    "className": "CustomerActivity",
    "Duration": 0,
    "Longitude": 23.2734631,
    "Latitude": 42.6881074
  },
  //header
  {
    "DMS_ROWID": "9bc93ff1-c6bf-4363-8df1-390a096e3edb",
    "no": "1",
    "documentType": 0,
    "dateCreated": "2020-06-12T12:40:39.993Z",
    "amount": 220,
    "vatAmount": 0,
    "totalAmount": 220,
    "customerNo": "C0004",
    "customerName": "Kaufland Barbu Vacarescu",
    "visitNo": "V001",
    "discountAmount": 0,
    "discountPercent": 0,
    "state": 1,
    "objectTableName": "SLA_SalesHeader",
    "className": "SalesHeader"
  },
  //lines
  {
    "DMS_ROWID": "3dd52052-ac8a-43f0-a440-24b25010944e",
    "dateCreated": "2020-06-12T12:40:44.303Z",
    "no": "601602",
    "lineNo": 1000,
    "documentNo": "1",
    "name": "0.3l Water",
    "quantity": 2,
    "unitOfMeasure": "Case10",
    "suppItemGroupId": "",
    "unitPrice": 55,
    "amount": 110,
    "vatAmount": 0,
    "lineDiscountPercent": 0,
    "lineDiscountAmount": 0,
    "vatPercent": 0,
    "totalAmount": 110,
    "isSuppItem": false,
    "salesUnitFactor": 10,
    "state": 1,
    "objectTableName": "SLA_SalesLine",
    "className": "SalesLine"
  },
  {
    "DMS_ROWID": "4cc63052-ac9a-55f0-a440-24b2501096e",
    "dateCreated": "2020-06-12T12:40:44.303Z",
    "no": "601603",
    "lineNo": 2000,
    "documentNo": "1",
    "name": "Orange Jiuce",
    "quantity": 31.00,
    "unitOfMeasure": "Case10",
    "suppItemGroupId": "",
    "unitPrice": 55,
    "amount": 110,
    "vatAmount": 0,
    "lineDiscountPercent": 0,
    "lineDiscountAmount": 0,
    "vatPercent": 0,
    "totalAmount": 110,
    "isSuppItem": false,
    "salesUnitFactor": 10,
    "state": 1,
    "objectTableName": "SLA_SalesLine",
    "className": "SalesLine"
  }
]

Invoice (sent to the ERP)

The following example is a Synchronization packet sent from the Dynamics Mobile Field Sales application to the ERP as a result of a new New Sale (invoice) submitted from the mobile user. It contains:

  • One CustomerActivity record, which describes the event

  • One SalesHeader record, which describes the sales order totals

  • Two SalesLine records, which describes the two lines of the order

  • Three SalesLineInventory records, which describes the inventory consumed as part of the sale

The CustomerActivity.Action field has value of 1, which means Invoice

The SalesHeader.DocumentType field has value of 1, which means Invoice

[
  {
    "DMS_ROWID": "a66afc01-34cc-479f-b62e-5b9d59788756",
    "CustomerNo": "C0004",
    "CustomerTitle": "Green Shop Ltd.",
    "DocumentNo": "1",
    "IsDistanceValid": true,
    "VisitNo": "V001",
    "OnDate": "2020-06-12T12:40:47.371Z",
    "InRoute": 1,
    "Distance": 5284754,
    "cLong": 23.2734631,
    "Lat": 42.6881074,
    "Action": 1,
    "Amount": 220,
    "state": 1,
    "objectTableName": "SLA_CustomerActivity",
    "className": "CustomerActivity",
    "Duration": 0,
    "Longitude": 23.2734631,
    "Latitude": 42.6881074
  },
  //header
  {
    "DMS_ROWID": "9bc93ff1-c6bf-4363-8df1-390a096e3edb",
    "no": "1",
    "documentType": 1,
    "dateCreated": "2020-06-12T12:40:39.993Z",
    "amount": 220,
    "vatAmount": 0,
    "totalAmount": 220,
    "customerNo": "C0004",
    "customerName": "Kaufland Barbu Vacarescu",
    "visitNo": "V001",
    "discountAmount": 0,
    "discountPercent": 0,
    "state": 1,
    "objectTableName": "SLA_SalesHeader",
    "className": "SalesHeader"
  },
  //lines
  {
    "DMS_ROWID": "3dd52052-ac8a-43f0-a440-24b25010944e",
    "dateCreated": "2020-06-12T12:40:44.303Z",
    "no": "601601",
    "lineNo": 1000,
    "documentNo": "1",
    "name": "0.3l Water",
    "quantity": 2,
    "unitOfMeasure": "Case10",
    "suppItemGroupId": "",
    "unitPrice": 55,
    "amount": 110,
    "vatAmount": 0,
    "lineDiscountPercent": 0,
    "lineDiscountAmount": 0,
    "vatPercent": 0,
    "totalAmount": 110,
    "isSuppItem": false,
    "salesUnitFactor": 10,
    "state": 1,
    "objectTableName": "SLA_SalesLine",
    "className": "SalesLine"
  },
  {
    "DMS_ROWID": "4cc63052-ac9a-55f0-a440-24b2501096e",
    "dateCreated": "2020-06-12T12:40:44.303Z",
    "no": "601602",
    "lineNo": 2000,
    "documentNo": "1",
    "name": "Orange Jiuce",
    "quantity": 31.00,
    "unitOfMeasure": "Case10",
    "suppItemGroupId": "",
    "unitPrice": 55,
    "amount": 110,
    "vatAmount": 0,
    "lineDiscountPercent": 0,
    "lineDiscountAmount": 0,
    "vatPercent": 0,
    "totalAmount": 110,
    "isSuppItem": false,
    "salesUnitFactor": 10,
    "state": 1,
    "objectTableName": "SLA_SalesLine",
    "className": "SalesLine"
  },
  //inventory
  {
    "DMS_ROWID": "99911q32-ac9a-55f0-a440-24b2501096e",
    "dateCreated": "2020-06-12T12:40:44.303Z",
    "itemNo": "601601",
    "lineNo": 1000,
    "documentNo": "1",
    "quantity": 2.00,
    "inventWarehouseId": "MAIN",
    "inventSiteId": "MAIN",
    "inventLocationId": "V001",
    "inventBatchId": "L001",
    "inventSerial": "S0001",    
    "state": 1,
    "objectTableName": "SLA_SalesLineInventory",
    "className": "SalesLineInventory"
  },
  {
    "DMS_ROWID": "99911q32-ac9a-55f0-a440-24b2501096e",
    "dateCreated": "2020-06-12T12:40:44.303Z",
    "itemNo": "601602",
    "lineNo": 2000,
    "documentNo": "1",
    "quantity": 30.00,
    "inventWarehouseId": "MAIN",
    "inventSiteId": "MAIN",
    "inventLocationId": "V001",
    "inventBatchId": "L001",
    "inventSerial": "S0001",    
    "state": 1,
    "objectTableName": "SLA_SalesLineInventory",
    "className": "SalesLineInventory"
  },
  {
    "DMS_ROWID": "99911q32-ac9a-55f0-a440-24b2501096e",
    "dateCreated": "2020-06-12T12:40:44.303Z",
    "itemNo": "601602",
    "lineNo": 2000,
    "documentNo": "1",
    "quantity": 1.00,
    "inventWarehouseId": "MAIN",
    "inventSiteId": "MAIN",
    "inventLocationId": "V001",
    "inventBatchId": "L001",
    "inventSerial": "S0001",    
    "state": 1,
    "objectTableName": "SLA_SalesLineInventory",
    "className": "SalesLineInventory"
  }
]

Last updated

Dynamics Mobile provided by Mobile Affairs Ltd. | 1712 Sofia, Bulgaria, Alexander Malinov 51 | sales@dynamicsmobile.com