Gigya Job Openings

Salesforce Dataflow

Skip to end of metadata
Go to start of metadata

The dataflow extracts data from Gigya, formats fields, and writes the data into Salesforce. For more information about the step for writing to Salesforce, see datasource.write.salesforce

  {
      "name": "Salesforce",
      "steps": [
        {
          "id": "account",
          "type": "datasource.read.gigya.account",
          "params": {
            "select": "UID,created,lastLogin,isVerified,profile.gender,profile.email,profile.firstName,profile.lastName,profile.address,profile.zip,profile.city,profile.country,profile.verified,profile.age,profile.bio,profile.birthDay,profile.birthMonth,profile.birthYear,profile.phones.number",
            "deltaField": "lastLoginTimestamp"
          },
          "next": [
            "rename"
          ]
        },
        {
          "id": "rename",
          "type": "field.rename",
          "params": {
            "fields": [
              {
                "sourceField": "profile.firstName",
                "targetField": "FirstName"
              },
              {
                "sourceField": "profile.lastName",
                "targetField": "LastName"
              },
              {
                "sourceField": "profile.zip",
                "targetField": "PersonMailingPostalCode"
              },
              {
                "sourceField": "profile.city",
                "targetField": "PersonMailingCity"
              },
              {
                "sourceField": "profile.country",
                "targetField": "PersonMailingCountry"
              },
              {
                "sourceField": "UID",
                "targetField": "ZZ00_rtl_id__c"
              },
              {
                "sourceField": "profile.email",
                "targetField": "Unique_Email_Gigya__c"
              },
              {
                "sourceField": "profile.address",
                "targetField": "AddressTest__c"
              },
              {
                "sourceField": "isVerified",
                "targetField": "Verified__c"
              },
              {
                "sourceField": "created",
                "targetField": "Create_time__c"
              },
              {
                "sourceField": "lastLogin",
                "targetField": "Last_login_time__c"
              },
              {
                "sourceField": "profile.age",
                "targetField": "Age__c"
              },
              {
                "sourceField": "profile.bio",
                "targetField": "Bio__c"
              },
              {
                "sourceField": "profile.birthDay",
                "targetField": "BirthDay__c"
              },
              {
                "sourceField": "profile.birthMonth",
                "targetField": "BirthMonth__c"
              },
              {
                "sourceField": "profile.birthYear",
                "targetField": "BirthYear__c"
              },
              {
                "sourceField": "profile.gender",
                "targetField": "Gender__c"
              },
              {
                "sourceField": "profile.phones.number",
                "targetField": "Phone"
              }
            ]
          },
          "next": [
            "remove"
          ]
        },
        {
          "id": "remove",
          "type": "field.remove",
          "params": {
            "fields": [
              "profile"
            ]
          },
          "next": [
            "clean"
          ]
        },
        {
          "id": "clean", //This step demonstrates handling "null" values using a JEXL expression.
          "type": "field.evaluate",
          "params": {
             "fields": [
                  {
                     "field": "Golf_Handicap_Number__pc",
                     "expression": "Golf_Handicap_Number__pc eq '' || Golf_Handicap_Number__pc eq null ? '#N/A' : Golf_Handicap_Number__pc"
                  }
              ],
              "language": "jexl"
          },
          "next": [
              "salesforce"
          ]
        },
		{
          "id": "salesforce",
          "type": "datasource.write.salesforce",
          "params": {
            "username": "...", // The username used to log on to Salesforce
            "password": "....", // The password used to log on to Salesforce
            "token": "....", // Salesforce API token
            "authEndpoint": "https://login.salesforce.com/services/Soap/u/41.0", // Salesforce authentication endpoint
            "objectType": "account", // The Salesforce object type. Possible values: account, contact, lead
            "primaryId": "...", // The field in Salesforce used as an identifier, to be matched with the UID sent from Gigya
            "lookupId": "..." // The field to be used as an index for the “upsert” process
          }
        }
      ]
    }

 

 

  • No labels