Change XML contents during transfer

Answered

Comments

6 comments

  • Official comment
    Kathyana Rule Community moderator Technical Writer
    Engaged
    Celigo University Level 2: Seasoned

    Hello Deepak Sharma

    Here are the possible solutions provided by our Support staff in your support ticket. I've added these here if anyone else runs across the same issue. 

    Option 1:  This is the most straightforward solution. Use the #compare handlebar. 
     


    Option 2: Use a presave page hook to match the source data with the new values using a switch statement. 
    Example:

    for (let i = 0; i < options.folder.length; i++) { 
    let result = ""; 
    switch(true){ 
    case (options.folder[i].id === "TESTD03"): 
    result = "ON-015"; 
    break; 
    case (options.folder[i].id === "TESTD05"): 
    result = "BC-013"; 
    break; 
    case (options.folder[i].id === "TESTD06"): 
    result = "BC-010"; 
    break; 
    default: result = "No Code" 

    console.log(result); 

    options.folder[i].newfield = result 
    }


    Option 3: Have a dedicated lookup step that retrieves the correct code from a database before importing it into FTP, we gave google sheets a try while on a call, but it seems like we cannot reference the values in our sheet. We are only able to reference the specific cell.
     


    Option 4: Import the source data as a CSV file first, since when you import as a CSV file using FTP, you get the option to use the mapper and use the static lookup table. Then re-export the CSV file so it can be imported as an XML file with the new node value included.
     


  • Scott Henderson CTO
    Celigo University Level 1: Skilled
    Answer Pro
    Top Contributor

    Can the separate "old code -> new code" mappings be stored/managed directly in a field mapping in integrator.io? If so, please see pic below for guidance on how to set this up. Or, if you do really need the separate mappings to be managed completely from the external file on the FTP site, then it is also possible to build a separate flow to export the contents of the file, and update the main flow with the mappings. Everything that you do in the integrator.io UI can also be done via the integrator.io API, which means you can use flows to automate setting fields within other flows, etc... Office hours and/or support can help explain these options further.

     

    0
  • Deepak Sharma
    Engaged

    Thanks for the response Scott Henderson. Apologies for the delayed reply, I was out on holidays. It seems I could use field mapping to achieve the desired results but I am stuck on the very first step. When I go and try to create mappings I am getting the following message. 

    The flow "Octacom cXML Invoices - TEST", contains no imports.

    The "Import flow" does exists in the integration. Is there anything I am missing altogether?

    Thanks 

     

    0
  • Scott Henderson CTO
    Celigo University Level 1: Skilled
    Answer Pro
    Top Contributor

    Can you send a screenshot of your flow, and can you send a screenshot of the error you are getting (with the full page in view) so we can see what you are clicking and seeing, etc...?  Please send any other screenshots that you think might help.

    0
  • Deepak Sharma
    Engaged

    Hi Scott, 

    I just realized I am using "FTP Transfer" in my flow hence the "mapping" is not available. What should be the next step in my scenario? Your technical team has access to our flows and has helped me with the same flow in the past with a different issue. We have until end of next week to make it work and any help will be greatly appreciated. 

    Thanks.

     

     

    0
  • Scott Henderson CTO
    Celigo University Level 1: Skilled
    Answer Pro
    Top Contributor

    Can you please read this community post to see if it helps?  It is very hard to help you here without seeing lots of screenshots of your flow, and all the bubble drawers within your flow, etc...  I recommend working with support at this point.

    0

Please sign in to leave a comment.